[Mesa-dev] [PATCH 21/57] i965/fs: Compare full register offsets in cmod propagation pass.

Francisco Jerez currojerez at riseup.net
Thu Sep 8 01:48:48 UTC 2016


This could potentially have misoptimized a program in cases where
inst->src[0] had a non-zero sub-GRF offset.
---
 src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
index 7607d20..291ae4c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_cmod_propagation.cpp
@@ -90,8 +90,7 @@ opt_cmod_propagation_local(const gen_device_info *devinfo, bblock_t *block)
       foreach_inst_in_block_reverse_starting_from(fs_inst, scan_inst, inst) {
          if (scan_inst->overwrites_reg(inst->src[0])) {
             if (scan_inst->is_partial_write() ||
-                scan_inst->dst.offset / REG_SIZE !=
-                 inst->src[0].offset / REG_SIZE ||
+                scan_inst->dst.offset != inst->src[0].offset ||
                 scan_inst->exec_size != inst->exec_size)
                break;
 
-- 
2.9.0



More information about the mesa-dev mailing list