intel/brw: Enable constant propagation for a couple more logical sends
This prevents some regressions later in the MR. Once load_const operations are marked as is_scalar, they will cesase to get the automatic constant propagation that occurs in try_rebuild_source. No shader-db or fossil-db changes on any Intel platform. v2: Slightly relax source restrictions on SHADER_OPCODE_UNALIGNED_OWORD_BLOCK_READ_LOGICAL. Add a comment explaining the restriction. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30251>
This commit is contained in:
@@ -1216,6 +1216,7 @@ try_constant_propagate_value(brw_reg val, brw_reg_type dst_type,
|
||||
case SHADER_OPCODE_BYTE_SCATTERED_WRITE_LOGICAL:
|
||||
case SHADER_OPCODE_BYTE_SCATTERED_READ_LOGICAL:
|
||||
case FS_OPCODE_UNIFORM_PULL_CONSTANT_LOAD:
|
||||
case FS_OPCODE_VARYING_PULL_CONSTANT_LOAD_LOGICAL:
|
||||
case SHADER_OPCODE_BROADCAST:
|
||||
case BRW_OPCODE_MAD:
|
||||
case BRW_OPCODE_LRP:
|
||||
@@ -1225,6 +1226,17 @@ try_constant_propagate_value(brw_reg val, brw_reg_type dst_type,
|
||||
progress = true;
|
||||
break;
|
||||
|
||||
case SHADER_OPCODE_UNALIGNED_OWORD_BLOCK_READ_LOGICAL:
|
||||
/* The address of the send message cannot be immediate (see the
|
||||
* assertions in brw_set_src0 in brw_eu_emit.c). There is no mechanism
|
||||
* to legalize it later, so do not generate the invalid thing here.
|
||||
*/
|
||||
if (arg != SURFACE_LOGICAL_SRC_ADDRESS) {
|
||||
inst->src[arg] = val;
|
||||
progress = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user