From 4ac9c80e5beea26e13ccf12ce6bd9ee051c229f5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 4 Feb 2010 16:49:35 -0700 Subject: mesa: change ctx->Driver.ProgramStringNotify() to return GLboolean GL_TRUE indicates that the driver accepts the program. GL_FALSE indicates the program can't be compiled/translated by the driver for some reason (too many resources used, etc). Propogate this result up to the GL API: set GL_INVALID_OPERATION error if glProgramString() was called. Set shader program link status to GL_FALSE if glLinkProgram() was called. At this point, drivers still don't do any program checking and always return GL_TRUE. --- src/mesa/shader/shader_api.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/shader/shader_api.c') diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index d53580f5f6..e8eaa9c103 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -1715,7 +1715,11 @@ set_program_uniform(GLcontext *ctx, struct gl_program *program, */ FLUSH_VERTICES(ctx, _NEW_TEXTURE | _NEW_PROGRAM); _mesa_update_shader_textures_used(program); - ctx->Driver.ProgramStringNotify(ctx, program->Target, program); + /* Do we need to care about the return value here? + * This should not be the first time the driver was notified of + * this program. + */ + (void) ctx->Driver.ProgramStringNotify(ctx, program->Target, program); } } else { -- cgit v1.2.3