mesa/src/intel
Francisco Jerez 217d412360 intel/fs/gfx20+: Implement sub-dword integer regioning restrictions.
This patch introduces code to enforce the pages-long regioning
restrictions introduced by Xe2 that apply to sub-dword integer
datatypes (See BSpec page 56640).  They impose a number of
restrictions on what the regioning parameters of a source can be
depending on the source and destination datatypes as well as the
alignment of the destination.  The tricky cases are when the
destination stride is smaller than 32 bits and the source stride is at
least 32 bits, since such cases require the destination and source
offsets to be in agreement based on an equation determined by the
source and destination strides.  The second source of instructions
with multiple sources is even more restricted, and due to the
existence of hardware bug HSDES#16012383669 it basically requires the
source data to be packed in the GRF if the destination stride isn't
dword-aligned.

In order to address those restrictions this patch leverages the
existing infrastructure from brw_fs_lower_regioning.cpp.  The same
general approach can be used to handle this restriction we were using
to handle restrictions of the floating-point pipeline in previous
generations: Unsupported source regions are lowered by emitting an
additional copy before the instruction that shuffles the data in a way
that allows using a valid region in the original instruction.  The
main difficulty that wasn't encountered in previous platforms is that
it is non-trivial to come up with a copy instruction that doesn't
break the regioning restrictions itself, since on previous platforms
we could just bitcast floating-point data and use integer copies in
order to implement arbitrary regioning, which is unfortunately no
longer a choice lacking a magic third pipeline able to do the
regioning modes the integer pipeline is no longer able to do.

The required_src_byte_stride() and required_src_byte_offset() helpers
introduced here try to calculate parameters for both regions that
avoid that situation, but it isn't always possible, and actually in
some cases that involve the second source of ALU instructions a chain
of multiple copy instructions will be required, so the
lower_instruction() routine needs to be applied recursively to the
instructions emitted to lower the original instruction.

XXX - Allow more flexible regioning for the second source of an
      instruction if bug HSDES#16012383669 is fixed in a future
      hardware platform.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28698>
2024-04-22 18:02:07 -07:00
..
blorp intel/blorp: remove unused blorp batch flag 2024-04-10 05:38:24 +00:00
ci ci: uprev CTS to vulkan-cts-1.3.8.0 2024-04-17 21:22:36 +00:00
common intel/elk: Remove multi-polygon support 2024-03-07 15:53:19 +00:00
compiler intel/fs/gfx20+: Implement sub-dword integer regioning restrictions. 2024-04-22 18:02:07 -07:00
decoder intel/decoder: Fix binding table pointer entry being marked as invalid 2024-03-25 20:27:06 +00:00
dev intel/dev/mesa_defs.json: Add LNL WA entries 2024-04-04 21:03:51 -07:00
ds intel/ds: add pipe control reasons to perfetto flushes 2024-03-08 07:52:20 +00:00
genxml intel/genxml/xe2: Update definition of INTERFACE_DESCRIPTOR_DATA 2024-04-03 20:21:04 +00:00
isl intel/isl: Disable miptails to align LODs for CCS WA 2024-04-17 16:52:11 +00:00
nullhw-layer docs: replace references to the deprecated VK_INSTANCE_LAYERS with the new VK_LOADER_LAYERS_ENABLE 2024-04-02 18:08:52 +00:00
perf treewide: Replace usage of macro DEBUG with MESA_DEBUG when possible 2024-03-22 18:22:34 +00:00
shaders intel-clc: Use correct set of nir_options when building for Gfx8 2024-02-24 00:24:32 +00:00
tools intel/tools/error2hangdump: Add Xe KMD support 2024-04-18 19:12:41 +00:00
vulkan anv: Add missing ANV_BO_ALLOC_INTERNAL 2024-04-19 13:15:01 +00:00
vulkan_hasvk anv, hasvk: check requirements for USAGE_INPUT_ATTACHMENT properly 2024-04-18 20:04:39 +00:00
meson.build intel: Only build shaders with anv and iris 2024-02-21 20:53:36 +00:00