mesa: Throw error on glGetActiveUniform inside Begin/End.
authorEric Anholt <eric@anholt.net>
Thu, 10 May 2012 21:56:48 +0000 (14:56 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 17 May 2012 17:05:23 +0000 (10:05 -0700)
Fixes piglit GL_ARB_shader_objeccts/getactiveuniform-beginend.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/uniform_query.cpp

index 08d330a52cb4f5f12a6b8153a4268d42b436e99e..f5d998ffb221ead122c1cd040e2c347315fec3d1 100644 (file)
@@ -46,6 +46,8 @@ _mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
    struct gl_shader_program *shProg =
       _mesa_lookup_shader_program_err(ctx, program, "glGetActiveUniform");
 
+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
    if (!shProg)
       return;