[Mesa-dev] [PATCH] mesa: forbid UseProgram to be called inside Begin/End
Marek Olšák
maraeo at gmail.com
Mon May 30 02:17:58 PDT 2011
The spec doesn't state it should be an error, but. We have this piglit test
useprogram-inside-begin that passes with this commit. No idea what's correct.
NOTE: This is a candidate for the 7.10 branch.
---
src/mesa/main/shaderapi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 03155b7..1e237a9 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1593,6 +1593,8 @@ _mesa_UseProgramObjectARB(GLhandleARB program)
struct gl_transform_feedback_object *obj =
ctx->TransformFeedback.CurrentObject;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
if (obj->Active) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUseProgram(transform feedback active)");
--
1.7.4.1
More information about the mesa-dev
mailing list