From 29ceeeba2004f71ccb91ce67f518dc1bf0ca6b17 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 29 May 2011 18:58:45 +0200 Subject: [PATCH] mesa: forbid UseProgram to be called inside Begin/End 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. Reviewed-by: Brian Paul --- src/mesa/main/shaderapi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 03155b7ac04..1e237a95da1 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)"); -- 2.30.2