From a088e5631d21fa41e8218feead2933ab3d2ddba0 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 25 Aug 2009 17:43:54 -0600 Subject: mesa: validate shader before drawing (for debugging, disabled) --- src/mesa/main/context.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mesa/main/context.c') diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 38ec4188098..a9e520716d3 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) { -- cgit v1.2.3