summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2016-09-01 22:26:59 -0700
committerFrancisco Jerez <currojerez@riseup.net>2016-09-14 14:50:58 -0700
commit0e657b7b55bc7c83c8eb5258cd9522b0e5e581b7 (patch)
tree0f23267ae67050ee8c80f906422f54573465aade
parent8bed1adfc144d9ae8d55ccb9b277942da8a78064 (diff)
downloadexternal_mesa3d-0e657b7b55bc7c83c8eb5258cd9522b0e5e581b7.zip
external_mesa3d-0e657b7b55bc7c83c8eb5258cd9522b0e5e581b7.tar.gz
external_mesa3d-0e657b7b55bc7c83c8eb5258cd9522b0e5e581b7.tar.bz2
i965/vec4: Compare full register offsets in cmod propagation.
Cmod propagation would misoptimize the program if the destination offset of the generating instruction wasn't exactly the same as the source region offset of the copy instruction. In preparation for adding support for sub-GRF offsets to the VEC4 IR. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp
index 9977317..c531fba 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_cmod_propagation.cpp
@@ -71,7 +71,7 @@ opt_cmod_propagation_local(bblock_t *block)
if (regions_overlap(inst->src[0], inst->size_read(0),
scan_inst->dst, scan_inst->size_written)) {
if ((scan_inst->predicate && scan_inst->opcode != BRW_OPCODE_SEL) ||
- scan_inst->dst.offset / REG_SIZE != inst->src[0].offset / REG_SIZE ||
+ scan_inst->dst.offset != inst->src[0].offset ||
(scan_inst->dst.writemask != WRITEMASK_X &&
scan_inst->dst.writemask != WRITEMASK_XYZW) ||
(scan_inst->dst.writemask == WRITEMASK_XYZW &&