summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-12-31 17:38:05 -0800
committerKenneth Graunke <[email protected]>2015-01-04 21:31:40 -0800
commit1f1102c8349bd06d579e542ded32fb1aea8a27ab (patch)
tree226a22e2488982184bd35a2436edbcebcd365ec6 /src/mesa
parent0b98b2bf535d6e6b6b02c0d47ea03f98adf42f15 (diff)
i965: Copy shader->shadow_samplers to prog->ShadowSamplers.
ir_to_mesa does this - apparently we just forgot or something. Without this, we'll guess the wrong texture swizzle (XYZW for color instead of XXX1 for depth) when doing precompiles. This cuts 26 shader recompiles in a time demo of "Counter Strike: Global Offensive" (58 -> 32) on Sandybridge. Haswell still has 0 recompiles. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87886 Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index e38dfd6635d..d76134b8335 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -242,6 +242,7 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
do_set_program_inouts(shader->base.ir, prog, shader->base.Stage);
prog->SamplersUsed = shader->base.active_samplers;
+ prog->ShadowSamplers = shader->base.shadow_samplers;
_mesa_update_shader_textures_used(shProg, prog);
_mesa_reference_program(ctx, &shader->base.Program, prog);