mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-13 14:48:32 +09:00
[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:
@@ -798,9 +798,16 @@ namespace MobileGL::MG_State {
|
||||
if (index == m_boundTransformFeedback) return;
|
||||
SaveBoundTransformFeedbackState();
|
||||
m_boundTransformFeedback = index;
|
||||
m_transformFeedbackObjects[index].everBound = true;
|
||||
RestoreBoundTransformFeedbackState();
|
||||
}
|
||||
|
||||
Bool GLContext::IsTransformFeedbackObject(Uint index) const {
|
||||
if (index == 0 || !m_transformFeedbackNames.IsValid(index)) return false;
|
||||
const auto it = m_transformFeedbackObjects.find(index);
|
||||
return it != m_transformFeedbackObjects.end() && it->second.everBound;
|
||||
}
|
||||
|
||||
void GLContext::MarkTransformFeedbackObjectForDeletion(Uint index) {
|
||||
if (index == 0 || !m_transformFeedbackNames.IsValid(index)) return;
|
||||
// Deleting the bound object reverts to the default one (GL 4.6 core 13.2.1);
|
||||
|
||||
Reference in New Issue
Block a user