summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniform_query.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2012-08-22 00:43:14 -0700
committerKenneth Graunke <[email protected]>2012-08-25 12:01:10 -0700
commit174d44a9c4d39a030fe3528acf07f9ac9aa617a1 (patch)
tree44d76d138c87c4a9f65b4c5b1519c4a6d78d3729 /src/mesa/main/uniform_query.cpp
parent85e8e9e000732908b259a7e2cbc1724a1be2d447 (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/uniform_query.cpp')
-rw-r--r--src/mesa/main/uniform_query.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp
index 816c2779cf3..bddb8f95e14 100644
--- a/src/mesa/main/uniform_query.cpp
+++ b/src/mesa/main/uniform_query.cpp
@@ -809,7 +809,8 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
sizeof(shProg->SamplerUnits));
_mesa_update_shader_textures_used(shProg, prog);
- (void) ctx->Driver.ProgramStringNotify(ctx, prog->Target, prog);
+ if (ctx->Driver.SamplerUniformChange)
+ ctx->Driver.SamplerUniformChange(ctx, prog->Target, prog);
}
}
}