Commit graph

223335 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
Karol Herbst
87b5340831 nir/opt_dead_write_vars: cache is_entrypoint of the function
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ends_program calls into nir_cf_node_get_function repeadtly to fetch the
same function and to check whether we are inside an entry point or not.

But we already got the information higher up the chain so use that
instead.

nir_cf_node_get_function is quite expensive, because it follows pointers
through the tree.

Speeds up compilation of more complex shaders by quite a bit. I am seeing
a 66% cut of compilation time spent in e.g. llama-bench.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41891>
2026-05-29 22:58:00 +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
Utku Iseri
2263576f59 v3dv: close display_fd on incompatible_driver path
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Currently, display_fd gets leaked during vulkan loader driver
probing on platforms where there's no v3dv device, as nothing
closes this fd before returning with INCOMPATIBLE_DRIVER. As
the display_fd also holds MASTER, this in turn prevents the
actual driver from becoming master on the display node.

Close the fd before returning to prevent this.

Fixes: bb532a7a ("v3dv: Fix assertion failure for not-found primary_fd during enumeration.")

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41058>
2026-05-29 19:55:33 +00:00
Job Noorman
e13c270d89 ir3/ra: fix killed src detection for spillall min limit
Same fix as in [1] but for the spillall min limit calculation.

[1]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41154

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41724>
2026-05-29 19:33:22 +00:00
Job Noorman
d782c40be6 ir3/ra: add ir3_ra_src_is_killed helper
The same logic is needed in RA and the spiller.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41724>
2026-05-29 19:33:22 +00:00
Emma Anholt
6ec23e6c27 freedreno/ci: Add more explanation of a trace failure that's not our fault.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
2026-05-29 19:05:39 +00:00
Emma Anholt
b104ff6ca9 freedreno/ci: Add restricted traces testing of D3D11 traces on a660.
Since the D3D11 traces were heavier, I needed to add support for traces
declaring about how much memory they use, so we can cut down the
parallelism and avoid hitting swap.  It's a bit of a nuisance to set up,
but it cut the job time after I'd added all the traces with necesstary
"singlehread" flags in half.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
2026-05-29 19:05:39 +00:00
Emma Anholt
d7a94b02f5 ci: Build the Vulkan screenshot layer as part of VK test builds.
We'll use this in order to capture renderdoc replay under wine for
D3D10/11 traces.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
2026-05-29 19:05:39 +00:00
Emma Anholt
ad8da52443 ci: Include Windows renderdoc in with wine and update gpu-trace-perf.
We'll use this for trace testing of the new D3D11 .rdc collection.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
2026-05-29 19:05:39 +00:00
Emma Anholt
5415e6779c weston: Run at a more reasonable 1920x1080 resolution, not 1024x640.
The headless backend's defaults are quite low, and it was preventing
renderdoc replays from running any larger than that, which in turn cut off
the screenshots we wanted to take.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
2026-05-29 19:05:38 +00:00
Emma Anholt
73234c7d71 screenshot-layer: Log when we can't open the output directory.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41662>
2026-05-29 19:05:38 +00: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
a84addd941 libcl/vk: add VkCopyMemoryToImageIndirectCommandKHR and its members
The members are all naturally aligned to 4, but other
naturally-aligned-to-4 structs in this file still have the attribute
declared (such as VkDispatchIndirectCommand), so I'm adding the
attributes to these as well.

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
d3c87303da libcl/vk: add aligned(4) to VkCopyMemoryIndirectCommandKHR
This structure, despite containing 8-bit members, can be 4-byte
aligned:

    "VUID-VkCopyMemoryIndirectInfoKHR-copyAddressRange-10942
     copyAddressRange.address must be 4 byte aligned"

So do it like we do with the other structures.

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
Georg Lehmann
36ad561fec aco/isel: never manually flush denorms after 32bit fma
This option is only meant for min/max, where gfx8 and older
didn't flush denorms. Fma flushes denorms on all hardware
and the optimizer removes the manual flushing again anyway.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41868>
2026-05-29 17:46:19 +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
Peyton Lee
04dfd3fe3f radeonsi/vpe: adjust message
Adjust debug message to display the correct format name

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41876>
2026-05-29 17:02:06 +00:00
Peyton Lee
5a088b1810 ac/gpu_info: add VPE_2_2 support
enable VPE_2_2 support

Signed-off-by: Peyton Lee <peytolee@amd.com>
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41876>
2026-05-29 17:02:05 +00:00
Peyton Lee
99c4cd205e amd/vpelib: support vpe 2.2
Update vpelib to support vpe 2.2.

Signed-off-by: Peyton Lee <peytolee@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41876>
2026-05-29 17:02:05 +00:00
Michel Dänzer
2b2dbcc13a egl/gbm: Eliminate max_age local variable
Use oldest_buffer->age instead.

Cleanup, no functional change intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41845>
2026-05-29 16:38:01 +00:00
Michel Dänzer
485919779d egl/gbm: Use local variable for better readability
No functional change intended.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41845>
2026-05-29 16:38:01 +00:00
Michel Dänzer
3999b5d680 egl/gbm: Do not destroy BO of current front buffer
It's not always locked. If it's not, and we destroy its BO,
lock_front_buffer will set dri2_surf->current->locked = true but then
return NULL, so release_buffer will never be called, preventing the
buffer from being used again.

Fixes: dd7ae41091 ("egl/gbm: Destroy excess BOs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41845>
2026-05-29 16:38:01 +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
Samuel Pitoiset
9dfc83079c radv: enable radv_force_64_byte_sampled_image for Crimson Desert
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Seems the same issue as FH6 after all.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15563
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41851>
2026-05-29 15:36:52 +00:00
Georg Lehmann
0f542c7049 radv: enable fp64 float controls on gfx6-7
There is no reason why these should be disabled.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
45532ad306 aco/gfx6: always use rtne adds for fround_even lowering
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
a3b4cf9f1f aco/gfx6: fix fround_even(-0.0)
We need to account for the sign bit after the add/sub trick,
otherwise -0.0 gets turned into +0.0.

Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
ed5ab76879 aco/gfx6: always use rtne for floor/ceil lowering
This fixes floor(-DBL_MIN) and ceil(DBL_MIN) with rtz.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:20 +00:00
Georg Lehmann
cbf3f4220c aco: add rtne pseudo opcodes for fp64 add and fract
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41852>
2026-05-29 15:09:19 +00:00