diff options
author | Ilia Mirkin <[email protected]> | 2016-03-06 12:36:19 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-03-07 00:36:08 -0500 |
commit | 0941ef3dd57e692ee1a897ed83bd887d0cebdc63 (patch) | |
tree | 044b87642c95ceb583acefa3724eb312e5371c02 /src | |
parent | f6827e20d12ab062440bc809b8f2338b68edac45 (diff) |
mesa: flip current tf object back to default if current is being deleted
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 <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/transformfeedback.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 976b2686a60..f73a89f6c0f 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); } } |