summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2015-12-06 15:30:34 +1100
committerTimothy Arceri <timothy.arceri@collabora.com>2015-12-07 21:41:09 +1100
commitad0262185420db03e8256ef20a0f5b1b1de003d8 (patch)
tree41f1fb2da26517b81ab550a94ff2c95345d46406 /src/mesa/main/context.c
parent4dd096d74178e66334089fb0ed01cbf2d6117fac (diff)
downloadexternal_mesa3d-ad0262185420db03e8256ef20a0f5b1b1de003d8.zip
external_mesa3d-ad0262185420db03e8256ef20a0f5b1b1de003d8.tar.gz
external_mesa3d-ad0262185420db03e8256ef20a0f5b1b1de003d8.tar.bz2
mesa: move GL_INVALID_OPERATION error to rendering call
The validation api doesn't trigger this error so just move it to the code called during rendering. Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index d6c14af..be983d4 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -2034,9 +2034,10 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
/* A pipeline object is bound */
if (ctx->_Shader->Name && !ctx->_Shader->Validated) {
- /* Error message will be printed inside _mesa_validate_program_pipeline.
- */
- if (!_mesa_validate_program_pipeline(ctx, ctx->_Shader, GL_TRUE)) {
+ if (!_mesa_validate_program_pipeline(ctx, ctx->_Shader)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glValidateProgramPipeline failed to validate the "
+ "pipeline");
return GL_FALSE;
}
}