aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-04-01 18:15:42 -0700
committerJason Ekstrand <[email protected]>2015-05-06 10:29:30 -0700
commit7a75b55a01d355090d186357896e3cb141b9775e (patch)
treee4a6a06e0021fe8744d24bb46e5eadd35ea1b7ba /src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
parent41868bb6824c6106a55c8442006c1e2215abf567 (diff)
i965/fs_inst: Get rid of the effective_width field
The effective_width field was an ill-concieved hack to get around issues in the LOAD_PAYLOAD instruction. Now that the LOAD_PAYLOAD instruction is far more sane, this field can die. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index d926c1d0f21..c0f01190611 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -475,7 +475,6 @@ fs_visitor::try_constant_propagate(fs_inst *inst, acp_entry *entry)
continue;
fs_reg val = entry->src;
- val.effective_width = inst->src[i].effective_width;
val.type = inst->src[i].type;
if (inst->src[i].abs) {
@@ -699,13 +698,13 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block,
inst->dst.file == GRF) {
int offset = 0;
for (int i = 0; i < inst->sources; i++) {
- int regs_written = ((inst->src[i].effective_width *
- type_sz(inst->src[i].type)) + 31) / 32;
+ int effective_width = i < inst->header_size ? 8 : inst->exec_size;
+ int regs_written = effective_width / 8;
if (inst->src[i].file == GRF) {
acp_entry *entry = ralloc(copy_prop_ctx, acp_entry);
entry->dst = inst->dst;
entry->dst.reg_offset = offset;
- entry->dst.width = inst->src[i].effective_width;
+ entry->dst.width = effective_width;
entry->src = inst->src[i];
entry->regs_written = regs_written;
entry->opcode = inst->opcode;