summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-03-18 11:30:57 -0700
committerEric Anholt <eric@anholt.net>2013-04-01 16:17:26 -0700
commit3cf69b228404791cf15231321b6a18b5701be0a6 (patch)
tree41f9beb4a34b1daf4ccfe350d4a1d9818c038cea /src/mesa/drivers/dri/i965/brw_fs_cse.cpp
parent8edc7cbe645b650bcb4e7fa190c9322c289ec177 (diff)
i965/fs: Bake regs_written into the IR instead of recomputing it later.
For sampler messages, it depends on the target gen, and on gen4 SIMD16-sampler-on-SIMD8-execution we were returning 4 instead of 8 like we should. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> NOTE: This is a candidate for the 9.1 branch.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_cse.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_cse.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
index 5a50d45ddc..8a8616d39c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cse.cpp
@@ -130,7 +130,7 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
*/
bool no_existing_temp = entry->tmp.file == BAD_FILE;
if (no_existing_temp) {
- int written = entry->generator->regs_written();
+ int written = entry->generator->regs_written;
fs_reg orig_dst = entry->generator->dst;
fs_reg tmp = fs_reg(GRF, virtual_grf_alloc(written),
@@ -150,8 +150,8 @@ fs_visitor::opt_cse_local(bblock_t *block, exec_list *aeb)
}
/* dest <- temp */
- int written = inst->regs_written();
- assert(written == entry->generator->regs_written());
+ int written = inst->regs_written;
+ assert(written == entry->generator->regs_written);
assert(inst->dst.type == entry->tmp.type);
fs_reg dst = inst->dst;
fs_reg tmp = entry->tmp;