summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_pass1.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-11-11 09:30:16 -0800
committerEric Anholt <eric@anholt.net>2010-12-06 00:14:22 -0800
commit16f8c823898fd71a3545457eacd2dc31ddeb3592 (patch)
treed99a9f727839f5410d34c954dee5807cf6323e1a /src/mesa/drivers/dri/i965/brw_wm_pass1.c
parent8f2a974cf2c9b6c00dfac11be4316a7d121dfbb4 (diff)
i965: Move payload reg setup to compile, not lookup time.
Payload reg setup on gen6 depends more on the dispatch width as well as the uses_depth, computes_depth, and other flags. That's something we want to decide at compile time, not at cache lookup. As a bonus, the fragment shader program cache lookup should be cheaper now that there's less to compute for the hash key.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_pass1.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass1.c b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
index 3a2874b6dd..3aae5b3b65 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass1.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass1.c
@@ -128,8 +128,7 @@ void brw_wm_pass1( struct brw_wm_compile *c )
if (inst->opcode == WM_FB_WRITE) {
track_arg(c, inst, 0, WRITEMASK_XYZW);
track_arg(c, inst, 1, WRITEMASK_XYZW);
- if (c->key.source_depth_to_render_target &&
- c->key.computes_depth)
+ if (c->source_depth_to_render_target && c->computes_depth)
track_arg(c, inst, 2, WRITEMASK_Z);
else
track_arg(c, inst, 2, 0);