intel/compiler: Use more symbolic source names in components_read()
Rather than hardcoding source 1, source 2, etc. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Rohan Garg <rohan.garg@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20604>
This commit is contained in:

committed by
Marge Bot

parent
16b66ab659
commit
7092c1218a
@@ -747,13 +747,13 @@ fs_inst::components_read(unsigned i) const
|
||||
case SHADER_OPCODE_A64_UNTYPED_READ_LOGICAL:
|
||||
case SHADER_OPCODE_A64_OWORD_BLOCK_READ_LOGICAL:
|
||||
case SHADER_OPCODE_A64_UNALIGNED_OWORD_BLOCK_READ_LOGICAL:
|
||||
assert(src[2].file == IMM);
|
||||
assert(src[A64_LOGICAL_ARG].file == IMM);
|
||||
return 1;
|
||||
|
||||
case SHADER_OPCODE_A64_OWORD_BLOCK_WRITE_LOGICAL:
|
||||
assert(src[2].file == IMM);
|
||||
if (i == 1) { /* data to write */
|
||||
const unsigned comps = src[2].ud / exec_size;
|
||||
assert(src[A64_LOGICAL_ARG].file == IMM);
|
||||
if (i == A64_LOGICAL_SRC) { /* data to write */
|
||||
const unsigned comps = src[A64_LOGICAL_ARG].ud / exec_size;
|
||||
assert(comps > 0);
|
||||
return comps;
|
||||
} else {
|
||||
@@ -775,12 +775,13 @@ fs_inst::components_read(unsigned i) const
|
||||
}
|
||||
|
||||
case SHADER_OPCODE_A64_UNTYPED_WRITE_LOGICAL:
|
||||
assert(src[2].file == IMM);
|
||||
return i == 1 ? src[2].ud : 1;
|
||||
assert(src[A64_LOGICAL_ARG].file == IMM);
|
||||
return i == A64_LOGICAL_SRC ? src[A64_LOGICAL_ARG].ud : 1;
|
||||
|
||||
case SHADER_OPCODE_A64_UNTYPED_ATOMIC_LOGICAL:
|
||||
assert(src[2].file == IMM);
|
||||
return i == 1 ? lsc_op_num_data_values(src[2].ud) : 1;
|
||||
assert(src[A64_LOGICAL_ARG].file == IMM);
|
||||
return i == A64_LOGICAL_SRC ?
|
||||
lsc_op_num_data_values(src[A64_LOGICAL_ARG].ud) : 1;
|
||||
|
||||
case SHADER_OPCODE_BYTE_SCATTERED_READ_LOGICAL:
|
||||
case SHADER_OPCODE_DWORD_SCATTERED_READ_LOGICAL:
|
||||
|
Reference in New Issue
Block a user