summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dd.h10
-rw-r--r--src/mesa/main/texenvprogram.c11
2 files changed, 16 insertions, 5 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 6705c901dd..d98a14e09c 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -581,9 +581,13 @@ struct dd_function_table {
struct gl_program * (*NewProgram)(GLcontext *ctx, GLenum target, GLuint id);
/** Delete a program */
void (*DeleteProgram)(GLcontext *ctx, struct gl_program *prog);
- /** Notify driver that a program string has been specified. */
- void (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
- struct gl_program *prog);
+ /**
+ * Notify driver that a program string (and GPU code) has been specified
+ * or modified. Return GL_TRUE or GL_FALSE to indicate if the program is
+ * supported by the driver.
+ */
+ GLboolean (*ProgramStringNotify)(GLcontext *ctx, GLenum target,
+ struct gl_program *prog);
/** Query if program can be loaded onto hardware */
GLboolean (*IsProgramNative)(GLcontext *ctx, GLenum target,
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 499b7330d0..414607e228 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -1535,8 +1535,15 @@ create_new_program(GLcontext *ctx, struct state_key *key,
/* Notify driver the fragment program has (actually) changed.
*/
if (ctx->Driver.ProgramStringNotify) {
- ctx->Driver.ProgramStringNotify( ctx, GL_FRAGMENT_PROGRAM_ARB,
- &p.program->Base );
+ GLboolean ok = ctx->Driver.ProgramStringNotify(ctx,
+ GL_FRAGMENT_PROGRAM_ARB,
+ &p.program->Base);
+ /* Driver should be able to handle any texenv programs as long as
+ * the driver correctly reported max number of texture units correctly,
+ * etc.
+ */
+ ASSERT(ok);
+ (void) ok; /* silence unused var warning */
}
if (DISASSEM) {