summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_wm_pass0.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_pass0.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_pass0.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_pass0.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_pass0.c b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
index 83152526b3..f78bdc3186 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_pass0.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_pass0.c
@@ -380,7 +380,7 @@ static void pass0_init_payload( struct brw_wm_compile *c )
GLuint i;
for (i = 0; i < 4; i++) {
- GLuint j = i >= (c->key.nr_payload_regs + 1) / 2 ? 0 : i;
+ GLuint j = i >= (c->nr_payload_regs + 1) / 2 ? 0 : i;
pass0_set_fpreg_value( c, PROGRAM_PAYLOAD, PAYLOAD_DEPTH, i,
&c->payload.depth[j] );
}