diff options
author | Iago Toral Quiroga <[email protected]> | 2016-01-18 10:44:20 +0100 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-05-16 09:55:32 +0200 |
commit | ac9b966aac4d0276de889990f3b170e0b939c542 (patch) | |
tree | 5762f1305e62edef861fbdbdc4daffc5636b07ce /src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | |
parent | 70dc19f9d628f0459db93466fbf65af1bfe75af1 (diff) |
i965/fs: Fix copy propagation of load payload for double operands
Specifically, consider the size of the data type of the operand to compute
the number of registers written.
v2 (Sam):
- Fix line width (Jordan).
- Add an assert (Jordan).
- Use REG_SIZE in the calculation of regs_written (Curro)
v3 (Sam):
- Fix assert and calculation of regs_written (Curro).
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Francisco Jerez <[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.cpp | 4 |
1 files changed, 3 insertions, 1 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 83791bfcfff..875928b0d30 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -775,7 +775,9 @@ fs_visitor::opt_copy_propagate_local(void *copy_prop_ctx, bblock_t *block, int offset = 0; for (int i = 0; i < inst->sources; i++) { int effective_width = i < inst->header_size ? 8 : inst->exec_size; - int regs_written = effective_width / 8; + assert(effective_width * type_sz(inst->src[i].type) % REG_SIZE == 0); + int regs_written = effective_width * + type_sz(inst->src[i].type) / REG_SIZE; if (inst->src[i].file == VGRF) { acp_entry *entry = ralloc(copy_prop_ctx, acp_entry); entry->dst = inst->dst; |