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 <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26585>
This commit is contained in:
Francisco Jerez 2022-06-22 16:17:21 -07:00 committed by Marge Bot
parent 2ed36050fb
commit 6bf99e6a45
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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;
}