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/tnl/t_vb_program.c | 3 ++- src/mesa/tnl/tnl.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa/tnl') diff --git a/src/mesa/tnl/t_vb_program.c b/src/mesa/tnl/t_vb_program.c index 5396548666..44b64b17d1 100644 --- a/src/mesa/tnl/t_vb_program.c +++ b/src/mesa/tnl/t_vb_program.c @@ -203,13 +203,14 @@ vp_fetch_texel(GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda, * Called via ctx->Driver.ProgramStringNotify() after a new vertex program * string has been parsed. */ -void +GLboolean _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program) { /* No-op. * If we had derived anything from the program that was private to this * stage we'd recompute/validate it here. */ + return GL_TRUE; } diff --git a/src/mesa/tnl/tnl.h b/src/mesa/tnl/tnl.h index 9c66d3b019..2c0d1fef73 100644 --- a/src/mesa/tnl/tnl.h +++ b/src/mesa/tnl/tnl.h @@ -66,7 +66,7 @@ _tnl_allow_vertex_fog( GLcontext *ctx, GLboolean value ); extern void _tnl_allow_pixel_fog( GLcontext *ctx, GLboolean value ); -extern void +extern GLboolean _tnl_program_string(GLcontext *ctx, GLenum target, struct gl_program *program); struct _mesa_prim; -- cgit v1.2.3