Commit graph

222711 commits

Author SHA1 Message Date
Karol Herbst
337018fcbb glsl/softfp: rename ffma to fmad
They were always implemented as unfused.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
2026-05-19 18:13:25 +00:00
Samuel Pitoiset
29b86874c3 radv: move radv_GetDeviceFaultInfoEXT() to radv_device.c
Because radv_debug.c will be moved to a subdirectory called tools/ and
this is entrypoint from VK_EXT_device_fault.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41598>
2026-05-19 17:48:46 +00:00
Samuel Pitoiset
4dc158a8cb radv: remove an outdated comment in radv_GetDeviceFaultInfoEXT()
The driver exports GPU hang reports already.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41598>
2026-05-19 17:48:46 +00:00
Samuel Pitoiset
d348e324da radv: advertise VK_EXT_device_fault by default
This is can still be useful if the kernel has no GPUVM query support
becuse it's possible to export GPU hang reports.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41598>
2026-05-19 17:48:45 +00:00
squidbus
840952cc35 kk: Enable maintenance extensions through VK_KHR_maintenance10
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Full CTS tests pass.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
8aae6232ab kk: Support new query pool and dynamic rendering flags
New flags allow for reseting query pools on create and configuring
new resolve options on render pass resolves.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
9027793074 kk: Fix image copies for depth/stencil<->color and differing subresources
The buffer copy path needs to account for depth/stencil aspect copies
to compatible color formats. It also must account for differing image
subresource ranges; for example the depth/stencil <-> color tests copy
from level 0 to level 3.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
7033dee54f kk: Support device without queue
Queue-less devices can be used for compiling pipelines.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
e503f8399a kk: Disable A8_UNORM format
Opaque black border does not work properly and needs working around.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
6b6a8cbe67 kk: Handle accurate OpSMod and default point size requirements
Reviewed-by: Arcady Goldmints-Orlov <arcady@lunarg.com>
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
a512fec6b9 kk: Implement index buffer robustness for BindIndexBuffer2
Re-uses unroll logic to create padded index buffer. We only need to
handle it when the bound range is a subset of the buffer.

This could be optimized, particularly for indirect case, by using
a separate shader program which creates an indirect command buffer
to issue the draw command. However, Metal 4 provides a command for
indexed draws that takes a GPU address and length, and is documented
to provide the robustness guarantees we need, so this solution is
only really needed short-term until Metal 4 encoders.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
squidbus
65acc110d4 kk: Create image layout from vk_image
`vk_image_init` sanitizes create info parameters for us, which we should
use instead.

For example, `maintenance5` blit-with-remaining-layers tests pass the layer
count in `depth` and later pull it out inside the test to set the `arrayLayers`.
They do not reset `depth` to 1, but `vk_image_create` sanitizes it for us.

While we're here, also pull out the extra stencil plane created from original
NVK code, as we don't use it.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41663>
2026-05-19 17:28:18 +00:00
Lionel Landwerlin
7882321d4f anv: only reprogram line-stipple if enabled
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41581>
2026-05-19 16:53:38 +00:00
Lionel Landwerlin
d6751f2a3b anv: further optimize dirty state after secondary emission
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41581>
2026-05-19 16:53:38 +00:00
Marc Alcala Prieto
94a7d50433 pan: Layer offset is not longer available starting on v14
Setting layer_offset would not cause any issues, but it's ignored by the
GPU. Therefore, removing it for correctness.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41645>
2026-05-19 16:26:00 +00:00
Nanley Chery
ec40c95385 anv: Add transfer_src usage for ANDROID_external_format_resolve
The android extension enables the driver to blit from single-sampled
color attachments.

Adding this image usage expressess that functionality and causes anv to
generate the ISL_FORMAT_RAW-formatted clear color during fast-clears.
This fixes an assert failure when anv tries to override the clear color
format used for a blorp_blit() call to ISL_FORMAT_RAW.

There are other ways to handle this, but this solution is consistent
with our handling of multisample images (which may be resolved as well).

Fixes: 465c186fc5 ("anv: Prepare for format width changes in blorp_copy()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15463
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41650>
2026-05-19 15:41:52 +00:00
Nanley Chery
da547a1a4d intel/blorp: Halve max bpp for some redescribed blits
We cannot use 128bpp formats with Y-tiling on gfx6 and prior.

Fixes: eb8883f3ef ("intel/blorp: Redescribe surfaces for copies")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15435
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41650>
2026-05-19 15:41:52 +00:00
Marek Olšák
8a68ae989d ac,radeonsi: remove all frag_coord_xy code
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is now dead code. This code is not used by RADV.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
e38203f02c radeonsi: don't treat sample_pos as using frag_coord
We always use sample_id to load the sample position from memory.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
7ff4454b41 radeonsi: enable nir_frag_coord_use_pixel_coord
no change in behavior other than getting pixel_coord from the beginning
unconditionally

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
159f22abbe radeonsi: switch to nir_frag_coord_xy_z_w_separate with w_rcp
FYI, ac_nir_lower_ps_early is only used by radeonsi.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:51 +00:00
Marek Olšák
cb66de3beb radv: switch to nir_frag_coord_xy_z_w_separate with w_rcp
Only Cyberpunk affected:

Totals from 10 (0.00% of 202429) affected shaders:
Latency: 337370 -> 337366 (-0.00%)

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
63deaf3bfe nir: add nir_frag_coord_use_pixel_coord for OpenGL
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
2d8d200c70 nir: change nir_frag_coord_form options to a bitmask
this makes it easier to add more options

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
7f5a307c12 nir: handle load_frag_coord_w_rcp in multiple passes, same as non-rcp
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Marek Olšák
cbdbdd50ad nir: add missing SYSTEM_VALUE_FRAG_COORD_W_RCP
for nir_intrinsic_load_frag_coord_w_rcp.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41461>
2026-05-19 15:03:50 +00:00
Valentine Burley
8b919f9979 panvk/ci: Mark dEQP-VK.subgroups.* as flaky on G925
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/100209404
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/100207249

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41677>
2026-05-19 14:43:11 +00:00
Jose Maria Casanova Crespo
e40989f451 v3dv: advertise VK_EXT_scalar_block_layout on V3D 7.1+
The scalarBlockLayout feature was already exposed via the Vulkan 1.2
feature struct, but Vulkan 1.1 clients (e.g. Dawn) need the EXT to
discover it.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41673>
2026-05-19 14:24:54 +00:00
Jose Maria Casanova Crespo
cd9f2648d3 v3dv: avoid 16F TLB usage for B10G11R11_UFLOAT copies
B10G11R11_UFLOAT_PACK32 maps to V3D_INTERNAL_TYPE_16F on the TLB,
which canonicalizes NaN bit patterns when arbitrary 32 bits are
reinterpreted as that format. The same canonicalization happens in
the blit shader when sampling a B10G11R11 source. Both break the
bit-exactness that vkCmdCopyImage, vkCmdCopyImageToBuffer and
vkCmdCopyBufferToImage require, since the spec defines them as raw
byte copies for any pair of texel-size compatible formats.

Fix it by aliasing the format to R32_UINT whenever B10G11R11 is
involved.

This fixes dEQP-VK.api.copy_and_blit.*b10g11r11*,
dEQP-VK.image.subresource_layout.*b10g11r11* and
dEQP-VK.api.image_clearing.*b10g11r11* failures on V3D 7.1.7 (rpi5)
and V3D 4.2 (rpi4).

Assisted-by: Claude Opus 4.7
Cc: mesa-stable
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41599>
2026-05-19 13:29:35 +00:00
Samuel Pitoiset
b1083190d0 radv: enable radv_wait_for_vm_map_updates for Forza Horizon 6
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It seems to have the same bug as Forza Horizon 5.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41637>
2026-05-19 12:33:10 +00:00
Georg Lehmann
4df9d03e7a spirv: always preserve infinities for FMin, FMax and FClamp
Don't ask me why these game engines do not use NMin and friends,
maybe they don't know those exist.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15481
Backport-to: 26.1

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41661>
2026-05-19 11:45:17 +00:00
Lionel Landwerlin
f19fc91c51 anv: bump max compute workgroup count
The HW can do up to UINT32_MAX but we're using that value to signal
indirect dispatch arguments.

A game like Resident Evil Requiem will use more than 64k on X
dimension.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41592>
2026-05-19 11:23:52 +00:00
Eric Engestrom
a554dd031a Revert "ci/build: restore riscv64 build as it works again"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit 3bb34744fc.

Apparently qemu is flaky now, neither working nor failing reliably,
that's going to be fun for whoever tries to ever re-enable it 🙃

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41672>
2026-05-19 11:34:42 +02:00
Eric Engestrom
3bb34744fc ci/build: restore riscv64 build as it works again
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
No idea what was changed on the runners, but they work now so let's
restore the coverage :)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41669>
2026-05-19 09:39:31 +02:00
Marek Olšák
2d44e1b907 nir/tests: use ASSERT_EQ instead of ASSERT_TRUE in nir_opt_varyings tests
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:55 +00:00
Marek Olšák
09edd9fea5 nir/opt_varyings: always report progress when calling nir_remove_varying
It changes IO semantics even if it doesn't remove the instruction.

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:55 +00:00
Marek Olšák
5dc54432d0 nir/tests: test new output deduplication cases
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:55 +00:00
Marek Olšák
24e0226058 nir/tests: don't leave "namespace {" unclosed in nir_opt_varyings_tests.h
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:55 +00:00
Marek Olšák
ca137e545c nir/opt_varyings: rewrite elimination of duplicated outputs
to strengthen it and fix a rare case of incorrect behavior.

This is the incorrect behavior that's fixed:

    if (invocation_id == 0)
       patch_output[0] = invocation_id;
    else if (invocation_id == 1)
       patch_output[1] = invocation_id;
    else
       patch_output[2] = invocation_id;

The stored SSA defs are the same, but each invocation writes a different
value to different outputs, so they are not duplicated, but the code
incorrectly treated them as duplicated and removed [1] and [2].

The requirement for correctness is that if an output is duplicated,
it must have stores in the same blocks as the output it duplicates.

To fix the incorrect behavior, awareness of blocks is added to the algorithm,
which leads to the following new cases that are optimized:

    1. Different blocks store different SSA defs, but equal in each block:
        if (..) {
           output[0] = a;
           output[1] = a; // eliminated
        } else {
           output[0] = b;
           output[1] = b; // eliminated
        }

    2. Different GS emit sections store different SSA defs, but equal in each
       section:
        output[0] = a;
        output[1] = a; // eliminated
        emit_vertex;
        output[0] = b;
        output[1] = b; // eliminated
        emit_vertex;

    3. A weird case that could be duplicated but is left alone due to
       the counterexample above:
        if (..)
           output[0] = a;
        else
           output[1] = a;

Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:54 +00:00
Marek Olšák
df54208fab util/set: add helper _mesa_set_equal
Reviewed-by: Aitor Camacho <aitor@lunarg.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41329>
2026-05-19 04:26:54 +00:00
Maaz Mombasawala
52d57d98a2 Revert "ci: vmware farm is offline, stop using it"
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This reverts commit dfa779c559.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41659>
2026-05-18 22:24:39 +00:00
Eric Engestrom
28f3f2569d meson/intel: only build libblorp_elk when requested
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
All users already depend on `idep_intel_blorp_elk`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
2026-05-18 19:09:03 +00:00
Eric Engestrom
dde7c7ed46 meson/freedreno: only build libfreedreno_common when requested
All users already `link_with` it, either directly or through
`idep_libfreedreno_common` (the latter should probably be preferred, but
I'll leave that to someone else).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
2026-05-18 19:09:03 +00:00
Eric Engestrom
7611673679 meson/asahi: only build libagx2_disasm when requested
All users already `link_with` it.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
2026-05-18 19:09:03 +00:00
Eric Engestrom
b52bb138e0 meson/amd: only build libaco when requested
Users all explicitly depend on `idep_aco`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
2026-05-18 19:09:03 +00:00
Eric Engestrom
8b7e44e2ef meson/libmesa: ensure shader_replacement.h is generated before using it
By adding it to the list of files needed to compile `libmesa` instead of
relying on the racy "build this no matter what" mechanism which is
intended only for root nodes (≈ the binaries that we provide to users).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41617>
2026-05-18 19:09:03 +00:00
Serdar Kocdemir
4cd9ccd943 gfxstream: allow VK_GOOGLE_display_timing
Test: atest VulkanFeaturesTest

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41656>
2026-05-18 18:54:08 +00:00
Serdar Kocdemir
e71d6dc06d Set driver ID for gfxstream
This is temporarily using the main software backend's driver id to
ensure a valid status on CTS. It'll be updated once the vulkan headers
are updated with mr 8272 on khronos side.

Test: dEQP-VK.api.driver_properties#driver_id_match

Reviewed-by: David Gilhooley <djgilhooley@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41656>
2026-05-18 18:54:08 +00:00
Gurchetan Singh
00261e5d00 freedreno: explicitly declare required depend_files, part 2
See "from freedreno_dev_info import *" statement.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
2026-05-18 18:30:45 +00:00
Gurchetan Singh
1fe5838568 freedreno: explicitly declare required depend_files, part 1
Fixes the following with meson2hermetic:

src/freedreno/registers/adreno/a6xx_perfcntrs.py/genrule.sbox.textproto

  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "gen_header.py", line 1220, in <module>
  File "gen_header.py", line 1216, in main
  File "gen_header.py", line 1177, in dump_py_defines
  File "gen_header.py", line 688, in parse
  File "gen_header.py", line 680, in do_parse
  File "external/python/cpython3/Modules/pyexpat.c", line 471, in StartElement
  File "gen_header.py", line 732, in start_element
  File "gen_header.py", line 673, in do_parse
FileNotFoundError:
  [Errno 2] No such file or directory: './out/src/freedreno/registers/adreno/adreno_common.xml'

Soong/Bazel `genrules` run in a separate sandbox, and require that
all dependencies be explicitly declared.  It is necessary for
reproducible, hermetic and distributed builds.

Meson prefers explicit dependency declaration too, but does not
require it.  For example, if `adreno_common.xml` is modified, and
it is in `depend_files` for the `adreno_pm4.xml.h` custom_target,
meson knows to re-gen `adreno_pm4.xml.h` during incremental builds.

For freedreno, the custom targets in `src/freedreno/registers/*`
don't declare all XML dependencies that are actually used.

This patch fixes this.  The other option is workaround this in
meson2hermetic, but being more explicit conceptually more correct.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
2026-05-18 18:30:45 +00:00