intel/fs: Specify number of data components of logical URB writes via control immediate.
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 28 Sep 2022 23:38:35 +0000 (16:38 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 27 Sep 2023 23:57:25 +0000 (23:57 +0000)
commit34a2c9ce358017faf2f095e886f7de1ce83cc97c
tree0ee89bc63e1f509e7df46c5776321b5b71b06658
parent74c9973c0b8337de726f3cf022010fc26e1c6106
intel/fs: Specify number of data components of logical URB writes via control immediate.

This is what most logical SEND messages do when they take a variable
number of components.  'inst->mlen' is expected to be zero for logical
SEND opcodes, which are expected to behave like plain arithmetic
operations, so certain automated transformations (like SIMD lowering)
can manipulate them without opcode-specific special-casing.

Guessing the number of components from 'inst->mlen' has other
disadvantages, because it requires duplicating the logic that infers
the message payload size in every use of the instruction -- Instead we
can just do the computation once during logical send lowering.  In
addition on LNL platform this causes the 'inst->mlen' field of URB
writes to have units inconsistent with every other SEND instruction,
which is likely to lead to confusion and bugs down the road.

Rework:
 * Marcin: update emit_urb_indirect_vec4_write

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25195>
src/intel/compiler/brw_eu_defines.h
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_fs_visitor.cpp
src/intel/compiler/brw_lower_logical_sends.cpp
src/intel/compiler/brw_mesh.cpp