summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-08-25 17:43:54 -0600
committerBrian Paul <brianp@vmware.com>2009-08-25 17:46:10 -0600
commita088e5631d21fa41e8218feead2933ab3d2ddba0 (patch)
tree7e8763dd8325d0ec1c477ee150ac50ffc27a83c5 /src/mesa
parentd8b4f8c84884acdda40e01cfd9fd3c10aaab836e (diff)
mesa: validate shader before drawing (for debugging, disabled)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 38ec418809..a9e520716d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1595,6 +1595,16 @@ _mesa_valid_to_render(GLcontext *ctx, const char *where)
"%s(shader not linked), where");
return GL_FALSE;
}
+#if 0 /* not normally enabled */
+ {
+ char errMsg[100];
+ if (!_mesa_validate_shader_program(ctx, ctx->Shader.CurrentProgram,
+ errMsg)) {
+ _mesa_warning(ctx, "Shader program %u is invalid: %s",
+ ctx->Shader.CurrentProgram->Name, errMsg);
+ }
+ }
+#endif
}
else {
if (ctx->VertexProgram.Enabled && !ctx->VertexProgram._Enabled) {