From 87c7e5fb876bf280d8693ef3b0f4351b1d2eec3b Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Wed, 21 Dec 2011 11:03:11 -0800 Subject: mesa: Disable certain error checks when transform feedback is paused When transform feedback is paused, it is legal to change programs or to perform drawing operations using a drawing mode that doesn't match the transform feedback mode. Reviewed-by: Brian Paul Reviewed-by: Eric Anholt Reviewed-by: Kenneth Graunke --- src/mesa/main/shaderapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/main/shaderapi.c') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index c4d01abc705..b71b44b705d 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1436,7 +1436,7 @@ _mesa_UseProgramObjectARB(GLhandleARB program) ASSERT_OUTSIDE_BEGIN_END(ctx); - if (obj->Active) { + if (obj->Active && !obj->Paused) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgram(transform feedback active)"); return; @@ -1638,7 +1638,8 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program) return; } - if (ctx->TransformFeedback.CurrentObject->Active) { + if (ctx->TransformFeedback.CurrentObject->Active && + !ctx->TransformFeedback.CurrentObject->Paused) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUseShaderProgramEXT(transform feedback is active)"); return; -- cgit v1.2.3