Commit graph

16264 commits

Author SHA1 Message Date
Jordan Justen
8841685896 intel/gen: Implement compact support
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:54:00 +00:00
Jordan Justen
d08e84c3e6 intel/gen: Add gen_compact_accessor for compact/uncompact
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Jordan Justen
381f9f56d1 intel/gen: Add gen_raw_compact_inst type
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Jordan Justen
bae944fc98 intel/gen/compact: Add compact tables from brw/brw_eu_compact.c
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Caio Oliveira
a07f953c2f intel/gen: Add gen_parse()
Assisted-by: Pi coding agent (GPT-5.5, Opus-4.7)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Caio Oliveira
4a178882e8 intel/gen: Add gen_print()
Assisted-by: Pi coding agent (gpt-5.5, opus-4.7)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Jordan Justen
a071dff770 intel/gen: Make use of generated instruction info
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Jordan Justen
558348d7ec intel/gen: Create gen_info_util.h
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Jordan Justen
068ea94ca3 intel/gen: Add gen_inst_info.py script to generate C++ headers
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:59 +00:00
Jordan Justen
8b59d133ec intel/gen: Add gen 9 through Xe2 instruction formats in JSON
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:58 +00:00
Caio Oliveira
11dde62fcc intel/gen: Add function to finish structured control flow
Given an array of gen_insts representing a structured program,
fill in the missing JIPs and UIPs to follow that structure.

The input array must provide JIPs for the WHILE instructions (the
"back-edges", since there's no DO in Gfx9+).  It optionally can
provide other JIPs or UIPs, their values will be used instead of
the calculated one.

The input JIPs and UIPs are absolute index values in the array,
and after finish they will be converted into relative byte offsets,
which is what the hardware will use.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:58 +00:00
Caio Oliveira
b35a6008e2 intel/gen: Add validation
Port the validation rules from brw_eu_validate.cpp.  This also
ports the tests of the validation, so we can check whether the
rules actually flag the cases.

Also include some new validation cases derived from asserts in
brw_eu encoding logic.

Assisted-by: Pi coding agent (gpt-5.5, opus-4.6)
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:58 +00:00
Caio Oliveira
596d18bbf7 intel/gen: Add various to_string/from_string functions
String with explicit size will be useful for the parser code later.

Assisted-by: Pi coding agent (Opus-4.7)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:58 +00:00
Caio Oliveira
03c32e90a9 intel/gen: Add gen encoding module
Add a new module that can produce the binary encoded representation of
the instructions.  Some key differences from existing encoding logic
in brw:

- Use a struct to represent the instructions before final encoding.
  This is similar to the struct we already use in validation.  This
  allows generator/validation code to ignore details of instruction
  formatting and just "set src0 to something".

- Split the encoding logic between Pre-Xe (Gfx9 and Gfx11) and Xe (from
  Gfx12 and up).  They are documented differently, so splitting makes
  both sides easier to deal with.

- Try to follow the bit range numbers as they are documented in the
  spec, programatically shifting them when needed.  This means numbers
  in code match PRMs / BSpec.

Later patches will add compaction and make use of the module in various
parts of the code.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41413>
2026-05-30 00:53:58 +00:00
Lionel Landwerlin
e24dc5bd1e anv: fake VK_EXT_image_compression_control on Xe2+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We're required to support this extension for Android VP17.

We've tried supporting it through the use of
CMF_DISABLE_WRITE_COMPRESSION but some regressions are measures
(-0.5~-1.0%).

We're not aware using CMF_DISABLE_WRITE_COMPRESSION would prevent any
application bug so it doesn't feel useful to implement.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41187>
2026-05-29 23:50:54 +03:00
Lionel Landwerlin
2218581c95 anv: move compression control drirc to feature section
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41187>
2026-05-29 23:49:48 +03:00
Lionel Landwerlin
b6a582cdf1 anv: move fake_sparse drirc to feature category
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41187>
2026-05-29 23:49:48 +03:00
Lionel Landwerlin
3c340e0b7c anv: rename drirc script
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41187>
2026-05-29 23:49:47 +03:00
Paulo Zanoni
2d3dc35d55 anv: implement VK_KHR_copy_memory_indirect
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This implements the extension on the Graphics and Compute queues using
Blorp OpenCL compute shaders. Support for the Transfer queue will come
in a later patch. We also don't support 24/48/96 bpp formats yet.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Paulo Zanoni
4b58b25e24 intel/blorp: prepare for usage of mi_builder.h
In the next patch we will use mi_builder.h from blorp code, so this
commit prepares the terrain for that by adding the necessary
definitions that the header requires.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Lionel Landwerlin
e3c00aa2e1 mi_builder: mi_umax2 tests
v2 (From Paulo): add more magic numbers.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Paulo Zanoni
70d22963f4 intel/mi_builder: add mi_umax2()
We're going to use this for indirect copies, as we need to iterate
through the indirect buffer checking the copy sizes, then pick the
maximum copy size in order to launch the indirect compute shader.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Paulo Zanoni
9f7623723e intel/mi_builder: add mi_ixor()
Just like mi_ior(), but for xor. We're going to use it in one of the
next commits.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39338>
2026-05-29 18:12:37 +00:00
Jhanani Thiagarajan
2a60e9e769 intel/mda: Change the default output directory
Directories are named using the process name and PID to avoid overwriting dumps from
subsequent runs of the same application.

v2 (Caio): Use util_get_process_name().  Change to be default behavior.
           Old behavior still accessible via MDA_OUTPUT_DIR="." env var.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39125>
2026-05-29 17:30:38 +00:00
Eric Engestrom
9be2f6ea57 Revert "drirc: move 00-$drv-defaults.conf to each driver's folder"
This reverts commit 97391328a3.

This broke devenv because DRIRC_CONFIGDIR doesn't point the folder that
contains everything anymore.

DRIRC_CONFIGDIR will be modified to take the standard `:`-separated list
of paths, but until then, revert this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41890>
2026-05-29 16:01:06 +00:00
Caio Oliveira
159dbc40e0 jay: Use TGL_PIPE_NONE when RegDist is zero
Avoids simulator complaining about invalid dependency.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41880>
2026-05-29 14:36:45 +00:00
Romaric Jodin
bb15c00343 anv: Declare 00-mesa-defaults.conf as an input to anv_dricrc_gen.py
The `libanv_drirc` custom target passes `00-mesa-defaults.conf` to the
generator script via the `--validate` flag, but it was hardcoded as a
path rather than being declared as an input dependency.

When translating the build to a hermetic build system, this missing
dependency causes the build to fail because the undeclared file is not
provisioned in the sandboxed build environment.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41886>
2026-05-29 14:05:30 +00:00
Caio Oliveira
d6ce874220 anv: Use empty_vs_input for default VERTEX_ELEMENT_STATE
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41790>
2026-05-29 04:48:20 +00:00
Caio Oliveira
c9dceab876 anv: Fill VERTEX_ELEMENT_STATE before further emissions
genX(batch_emit_vertex_input) reserves 3DSTATE_VERTEX_ELEMENTS and then
writes into that reserved memory.  Any later anv_batch_emit() may
allocate a new batch and finalize the previous one, running the valgrind
defined-memory check over it.

Fill the draw-parameter and dynamic VERTEX_ELEMENT_STATE entries before
emitting 3DSTATE_VF_INSTANCING.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41790>
2026-05-29 04:48:20 +00:00
Dylan Baker
4381ac9a91 intel/brw: Add assert for error case
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Coverity notices that there is an error case where
`nir_get_io_data_src_number` could return `-1`, and that is then used to
index into an array. Given that that is an exceptional case, we can just
assert here.

CID: 1681480
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40146>
2026-05-28 23:50:39 +00:00
Paulo Zanoni
c5942b4efb brw: evict memory for workgroup scope in Xe2 and newer
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
On Xe2 and Xe3, the flushing is necessary due to aliasing of TGM data
in L1 memory (HSD 14020414266). On newer platforms, it is necessary
for proper post-format data conversion handling (HSD 22020984324).

See the Instruction_Fence page (63969) for documentation on the fact
that the threadgroup scope ignores flushes.

Thanks to Francisco Jerez and Kenneth Graunke on their help for this
patch.

v2: restrict the flushing to TGM (Lionel).

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40732>
2026-05-28 22:07:01 +00:00
José Roberto de Souza
9f4358ee77 intel/dev: Add a Xe2+ table of URB min and max entries
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some values were wrong, so here adding the whole table with all fixed values.
Just to make easier to read and compare I have added all shader stages to
XEHP_URB_MIN_MAX_ENTRIES.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41789>
2026-05-28 20:27:23 +00:00
José Roberto de Souza
c1bb5e101e intel/dev: Use URB mesh/task min/max values in intel_device_info
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41789>
2026-05-28 20:27:23 +00:00
José Roberto de Souza
45d9c2c14b intel/dev: Add URB max entries values
Right now this value is not use but it will in the next patch.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41789>
2026-05-28 20:27:23 +00:00
José Roberto de Souza
0cc89ca03a intel/dev: Remove unused intel_get_device_info_for_build() function
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41789>
2026-05-28 20:27:23 +00:00
Eric Engestrom
97391328a3 drirc: move 00-$drv-defaults.conf to each driver's folder
Makes more send to put them there, and it means that modifying them will
only trigger the CI jobs for that driver and not everything.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41866>
2026-05-28 19:55:05 +00:00
Nanley Chery
6d0b1ebd3d intel/isl: Define a CMF for ASTC formats
These formats are not supported natively on gfx20+. However, with a
driconf option enabled, we do create surfaces with these formats and use
them for transfer and decompression operations. Provide a CMF for these
formats to avoid hitting the unreachable in
isl_get_render_compression_format().

Fixes: 27d515772e ("intel/isl: Replace mc_format with aux_format")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15547
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41830>
2026-05-28 18:31:00 +00:00
Alyssa Rosenzweig
feb9ac168b jay: allow npot operands in RA
As long as we round up the /alignments/ in RA, and pad to power-of-two when
calculating partitions (trivially true now, this informs future work though),
this is fine.

SIMD16:
   Totals from 1001 (37.82% of 2647) affected shaders:
   Instrs: 1897734 -> 1896157 (-0.08%); split: -0.25%, +0.16%
   CodeSize: 28330256 -> 28315472 (-0.05%); split: -0.30%, +0.25%
   Number of spill instructions: 1003 -> 999 (-0.40%)
   Number of fill instructions: 990 -> 986 (-0.40%)

SIMD32:
   Totals from 1230 (46.47% of 2647) affected shaders:
   Instrs: 3284649 -> 3277437 (-0.22%); split: -1.18%, +0.96%
   CodeSize: 48977696 -> 48907376 (-0.14%); split: -1.10%, +0.96%
   Number of spill instructions: 41004 -> 40582 (-1.03%); split: -1.05%, +0.02%
   Number of fill instructions: 39298 -> 38572 (-1.85%); split: -1.91%, +0.06%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:33 +00:00
Alyssa Rosenzweig
30c392fc55 jay: simplify uniformity checks
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:33 +00:00
Alyssa Rosenzweig
a39a4b189e jay: renumber reg files predictably
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:33 +00:00
Alyssa Rosenzweig
ac00e526ea jay: gate early EOT code behind =strict
Works fine on Xe2 Linux and fixes us for Xe3.

simd16:

   Totals from 2635 (99.55% of 2647) affected shaders:
   Instrs: 2722355 -> 2719307 (-0.11%)
   CodeSize: 40641680 -> 40605472 (-0.09%)

simd32:

   Totals from 2629 (99.32% of 2647) affected shaders:
   Instrs: 4052325 -> 4049578 (-0.07%); split: -0.07%, +0.00%
   CodeSize: 60360016 -> 60329392 (-0.05%); split: -0.05%, +0.00%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:33 +00:00
Alyssa Rosenzweig
0c376dde89 jay: hide MAD->MAC behind !JAY_DEBUG=strict
in case this comes back to bite us. nice to keep our nonconformances
programatically triaged.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:32 +00:00
Alyssa Rosenzweig
b2edda3037 jay: allow SIMD1 imageStore()
Totals:
Instrs: 2756797 -> 2755967 (-0.03%); split: -0.04%, +0.01%
CodeSize: 41155232 -> 41141520 (-0.03%); split: -0.04%, +0.00%

Totals from 130 (4.91% of 2647) affected shaders:
Instrs: 40095 -> 39265 (-2.07%); split: -2.46%, +0.39%
CodeSize: 618032 -> 604320 (-2.22%); split: -2.42%, +0.20%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:32 +00:00
Alyssa Rosenzweig
31e1e98ae3 jay: avoid overflow affinities with large UGPR vecs
Totals:
Instrs: 2759295 -> 2759035 (-0.01%); split: -0.01%, +0.00%
CodeSize: 41189376 -> 41185024 (-0.01%); split: -0.01%, +0.00%

Totals from 186 (7.03% of 2647) affected shaders:
Instrs: 422705 -> 422445 (-0.06%); split: -0.09%, +0.03%
CodeSize: 6313712 -> 6309360 (-0.07%); split: -0.09%, +0.03%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:32 +00:00
Alyssa Rosenzweig
67e3ee6fa9 jay: allow simd32 gl_SamplePosition
this should work fine now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:31 +00:00
Alyssa Rosenzweig
c78c2e03f4 jay: remove send split hack
The new partitioning code behaves sensibly here now.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:31 +00:00
Alyssa Rosenzweig
04236b3912 jay: merge partition blocks
The way we construct partitions, it is tricky to avoid empty blocks sometimes
leading to mergeable adjacent blocks. Simplify this at runtime.

Stats are kind of a mixed bag but this is the obvious right thing to do.

simd16:

   Totals:
   Instrs: 2752919 -> 2752284 (-0.02%); split: -0.03%, +0.01%
   CodeSize: 41105312 -> 41096640 (-0.02%); split: -0.03%, +0.01%

   Totals from 236 (8.92% of 2647) affected shaders:
   Instrs: 740015 -> 739380 (-0.09%); split: -0.12%, +0.04%
   CodeSize: 11076496 -> 11067824 (-0.08%); split: -0.11%, +0.04%

simd32:

   Totals:
   Instrs: 4121085 -> 4121638 (+0.01%); split: -0.01%, +0.02%
   CodeSize: 61394672 -> 61404720 (+0.02%); split: -0.00%, +0.02%

   Totals from 145 (5.48% of 2647) affected shaders:
   Instrs: 1104897 -> 1105450 (+0.05%); split: -0.02%, +0.07%
   CodeSize: 16845728 -> 16855776 (+0.06%); split: -0.02%, +0.08%

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:31 +00:00
Alyssa Rosenzweig
598931f653 jay: rewrite partition handling
Jay's novel SSA-based register allocator relies on a fixed partition of Intel
GRFs mapping to logical GPRs.

Previously, Jay used a simple partitioning scheme, which was good enough for
simple compute and fragment shaders, but has both limitations preventing new
feature bring-up and performance issues.

Here we rewrite the Jay partitioning code at the heart of the Jay RA in
order to lift these restrictions and allow fully flexible partitions. This
should be easier to reason about, fix a bunch of issues around simd32 payloads,
enable better performance, etc.

The # of stride 16 GRFs reserved is halved in simd32 mode here to match how
multisampling stuff works, which explains the large simd32-only instruction
count reduction.

While churning all this code, I took the opportunity to break off
jay_partition.c... I think that is better organized and the diff was garbage
otherwise.

SIMD16:
   Totals from 2189 (82.70% of 2647) affected shaders:
   Instrs: 2702159 -> 2670951 (-1.15%); split: -1.41%, +0.26%
   CodeSize: 40296128 -> 39850304 (-1.11%); split: -1.40%, +0.30%

SIMD32:
   Totals from 2373 (89.65% of 2647) affected shaders:
   Instrs: 4559418 -> 4072897 (-10.67%); split: -10.77%, +0.10%
   CodeSize: 68185488 -> 60635616 (-11.07%); split: -11.17%, +0.09%
   Number of spill instructions: 44069 -> 44055 (-0.03%)
   Number of fill instructions: 43292 -> 43278 (-0.03%)

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:31 +00:00
Alyssa Rosenzweig
1860e7af30 jay: drop unneeded #include
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:30 +00:00
Alyssa Rosenzweig
fc3fb1c3f9 jay/validate_ra: use jay_def_stride
higher level than jay_gpr_to_stride

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41808>
2026-05-28 16:23:30 +00:00