From 174d44a9c4d39a030fe3528acf07f9ac9aa617a1 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 22 Aug 2012 00:43:14 -0700 Subject: mesa: Use a new, more specific hook for shader uniform changes. Gallium drivers and i965 don't require special notification when sampler uniforms change. They simply see the _NEW_TEXTURE and adjust their indirection tables. These drivers don't want ProgramStringNotify: it simply causes pointless recompiles. Unfortunately, i915 still requires shader recompiles and needs ProgramStringNotify. Rather than trying to fix that, simply change the hook to a new, more specific one: ShaderUniformChange. On i915, this translates to ProgramStringNotify; others simply ignore it. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i915/i915_fragprog.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 5b7e93ecc40..7a6e0673678 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -1303,6 +1303,13 @@ i915ProgramStringNotify(struct gl_context * ctx, return true; } +static void +i915SamplerUniformChange(struct gl_context *ctx, + GLenum target, struct gl_program *prog) +{ + i915ProgramStringNotify(ctx, target, prog); +} + void i915_update_program(struct gl_context *ctx) { @@ -1456,4 +1463,5 @@ i915InitFragProgFuncs(struct dd_function_table *functions) functions->DeleteProgram = i915DeleteProgram; functions->IsProgramNative = i915IsProgramNative; functions->ProgramStringNotify = i915ProgramStringNotify; + functions->SamplerUniformChange = i915SamplerUniformChange; } -- cgit v1.2.3