[Mesa-dev] [PATCH 19/45] i965/fs: Update assertion on copy propagation

Alejandro PiƱeiro apinheiro at igalia.com
Thu Jul 13 14:35:23 UTC 2017


That assertion was checking that the effective_width * size_element
was a multiple of REG_SIZE. But for HF we are using the full REG_SIZE,
even if the element is smaller.

See "i965: need to allocate as minimum 32-bit register" for more info
---
 src/intel/compiler/brw_fs_copy_propagation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp
index cb11739..05691b4 100644
--- a/src/intel/compiler/brw_fs_copy_propagation.cpp
+++ b/src/intel/compiler/brw_fs_copy_propagation.cpp
@@ -796,7 +796,7 @@ fs_visitor::opt_copy_propagation_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;
-            assert(effective_width * type_sz(inst->src[i].type) % REG_SIZE == 0);
+            assert(effective_width * MAX2(4, type_sz(inst->src[i].type)) % REG_SIZE == 0);
             const unsigned size_written = effective_width *
                                           type_sz(inst->src[i].type);
             if (inst->src[i].file == VGRF) {
-- 
2.9.3



More information about the mesa-dev mailing list