From 6bf99e6a452beefd18772934988fe0d6b86f74fc Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 22 Jun 2022 16:17:21 -0700 Subject: [PATCH] intel/compiler: Don't change types for copies from ATTR file. Since the <8;8,0> regions they use in multipolygon mode could violate regioning restrictions in some cases, depending on the execution type of the instruction. Note that the assertion is removed from try_copy_propagate() since a more accurate check is used within that function than what fs_inst::can_change_types() can do. Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_fs.cpp | 4 ++-- src/intel/compiler/brw_fs_copy_propagation.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index f8884f765c6..90d9f939620 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -488,12 +488,12 @@ bool fs_inst::can_change_types() const { return dst.type == src[0].type && - !src[0].abs && !src[0].negate && !saturate && + !src[0].abs && !src[0].negate && !saturate && src[0].file != ATTR && (opcode == BRW_OPCODE_MOV || (opcode == BRW_OPCODE_SEL && dst.type == src[1].type && predicate != BRW_PREDICATE_NONE && - !src[1].abs && !src[1].negate)); + !src[1].abs && !src[1].negate && src[1].file != ATTR)); } void diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp index 5c577ae4711..4dacd3bc1d3 100644 --- a/src/intel/compiler/brw_fs_copy_propagation.cpp +++ b/src/intel/compiler/brw_fs_copy_propagation.cpp @@ -925,7 +925,6 @@ try_copy_propagate(const brw_compiler *compiler, fs_inst *inst, * type. If we got here, then we can just change the source and * destination types of the instruction and keep going. */ - assert(inst->can_change_types()); for (int i = 0; i < inst->sources; i++) { inst->src[i].type = entry->dst.type; }