[Fix] (MG_State, MG_Impl): a transform feedback name is only an object once it is bound

glIsTransformFeedback answered GL_TRUE for any name glGenTransformFeedbacks had handed
out. A generated name is reserved but does not denote an object until the first
glBindTransformFeedback (GL 4.6 core 13.2.1) - the same rule the other object types
follow - and KHR-GL40.api.coverage checks exactly the window in between.

The two questions are now asked separately: whether a name may be bound or deleted
(reserved, which is what the delete and bind paths need) and whether it is an object
(reserved and bound at least once).
This commit is contained in:
BZLZHH
2026-08-04 10:27:23 -04:00
parent 76f37a18e6
commit ff76af9df7
3 changed files with 14 additions and 2 deletions
@@ -909,8 +909,9 @@ namespace MobileGL::MG_Impl::GLImpl {
}
GLboolean IsTransformFeedback(GLuint id) {
// Name 0 is the default object, which glIsTransformFeedback reports as not an object.
return (id != 0 && MG_State::pGLContext->ValidateTransformFeedbackName(id)) ? GL_TRUE : GL_FALSE;
// Name 0 is the default object, and a name glGenTransformFeedbacks handed out only
// becomes the name of an object once it has been bound.
return MG_State::pGLContext->IsTransformFeedbackObject(id) ? GL_TRUE : GL_FALSE;
}
// glDrawTransformFeedback[Stream][Instanced]: replays the vertices the named object