diff options
author | Marek Olšák <[email protected]> | 2011-05-31 14:59:44 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-06-01 16:10:49 +0200 |
commit | 9e1f40c1826af6d7f38db7c2061fbe9f956c28be (patch) | |
tree | f326b979660dff09690aa9867f515fdf61a97781 /src | |
parent | 4d08ca20ba26f5712556f54a6850ad1016c77be2 (diff) |
mesa: UseShaderProgramEXT and Uniform* shouldn't be allowed inside Begin/End
I couldn't find this being required by the spec.
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit d69dc2e20346397f4734a0760554a51fb4fbb3c0)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 | ||||
-rw-r--r-- | src/mesa/main/uniforms.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 37d185faffa..09bc079a310 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1781,6 +1781,8 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program) GET_CURRENT_CONTEXT(ctx); struct gl_shader_program *shProg = NULL; + ASSERT_OUTSIDE_BEGIN_END(ctx); + if (!validate_shader_target(ctx, type)) { _mesa_error(ctx, GL_INVALID_ENUM, "glUseShaderProgramEXT(type)"); return; diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 2b3dfa411ab..266808cd93d 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -1048,6 +1048,8 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg, struct gl_uniform *uniform; GLint elems, offset; + ASSERT_OUTSIDE_BEGIN_END(ctx); + if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)"); return; @@ -1221,6 +1223,8 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg, struct gl_uniform *uniform; GLint offset; + ASSERT_OUTSIDE_BEGIN_END(ctx); + if (!shProg || !shProg->LinkStatus) { _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix(program not linked)"); |