[Mesa-dev] [PATCH] mesa: flip current tf object back to default if current is being deleted
Ilia Mirkin
imirkin at alum.mit.edu
Sun Mar 6 17:37:48 UTC 2016
In the rather unusual case of Bind + Delete, we need to make sure that
we unbind the current tf object.
Fixes dEQP-GLES3.functional.lifetime.delete_bound.transform_feedback
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/mesa/main/transformfeedback.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c
index 976b268..f73a89f 100644
--- a/src/mesa/main/transformfeedback.c
+++ b/src/mesa/main/transformfeedback.c
@@ -1136,6 +1136,11 @@ _mesa_DeleteTransformFeedbacks(GLsizei n, const GLuint *names)
}
_mesa_HashRemove(ctx->TransformFeedback.Objects, names[i]);
/* unref, but object may not be deleted until later */
+ if (obj == ctx->TransformFeedback.CurrentObject) {
+ reference_transform_feedback_object(
+ &ctx->TransformFeedback.CurrentObject,
+ ctx->TransformFeedback.DefaultObject);
+ }
reference_transform_feedback_object(&obj, NULL);
}
}
--
2.4.10
More information about the mesa-dev
mailing list