Commit graph

206321 commits

Author SHA1 Message Date
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
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
Gurchetan Singh
1084ddd893 tu: kgsl: fix -Wgnu-alignof-expression warning with Clang
Fixes:

src/freedreno/vulkan/tu_knl_kgsl.cc:1455:16:
  error: 'alignof' applied to an expression is a GNU extension [-Werror,-Wgnu-alignof-expression]
  alignof(*objs), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND);

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
2026-05-18 18:30:45 +00:00
Gurchetan Singh
f9a5524b3b tu: fix implicit fallthrough
Fixes:

src/freedreno/vulkan/tu_cmd_buffer.cc:2162:10:
  error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]

The other option is the [[fallthrough]] annotation.

Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
2026-05-18 18:30:45 +00:00
Gurchetan Singh
b0e480d428 tu: fix -Wmissing-prototypes errors
Fixes:

src/freedreno/vulkan/tu_shader.cc:134:1: error:
  no previous prototype for function 'tu_init_softfloat32'[-Werror,-Wmissing-prototypes]
  134 | tu_init_softfloat32(struct tu_device *dev)
      | ^

Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
2026-05-18 18:30:45 +00:00
Gurchetan Singh
dd47c7c061 freedreno: fix ignored qualifier
Fixes:

src/freedreno/common/freedreno_dev_info.h:516:1:
  error: 'const' type qualifier on return type has no effect [-Werror,-Wignored-qualifiers]
  516 | const struct fd_dev_info fd_dev_info(const struct fd_dev_id *id);
      | ^~~~~

Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41518>
2026-05-18 18:30:45 +00:00
Sergi Blanch Torne
70bf937c89 Revert "ci: disable Collabora's farm due to maintenance"
This reverts commit aaec108637.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41635>
2026-05-18 17:00:39 +00:00
Marc Alcala Prieto
6b8d8a70de pan/decode: Support INTERLEAVED_64K Z/S target dumps
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Block format INTERLEAVED_64K is supported on v10+.

Fixes: 69d067fe1c ("pan/lib: introduce standard_sparse_mapping_granularity")
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41646>
2026-05-18 16:44:14 +00:00
Connor Abbott
4441ad835c tu: Zero out unused parts of descriptors
UBO and sampler descriptors are smaller than texture descriptors, but
the nature of Vulkan descriptor sets means we need to make them just as
big. Zero out the remaining dwords so that we don't get garbage that
trips up asserts in gfxrecon-replay.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41608>
2026-05-18 16:19:24 +00:00
Icenowy Zheng
ad14a81cc7 pvr: advertise VK_KHR_maintenance5
As most work for maintenance5 is already done in the common Vulkan
runtime, functions required by it are implemented in pvr driver and
blitting functions are changed to use common functions for acquiring
subresource layer count, advertise VK_KHR_maintenance5 now.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:43 +00:00
Icenowy Zheng
f5a3e02797 pvr: implement GetDeviceImageSubresourceLayout
It's implemented like GetDeviceImageMemoryRequirements by creating a
temporary image.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:43 +00:00
Icenowy Zheng
b5a22a43a6 pvr: implement GetImageSubresourceLayout2
As the functionality of GetImageSubresourceLayout was already a
dedicated function, simply changing the parameters for the function call
is enough to implement GetImageSubresourceLayout2.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:43 +00:00
Icenowy Zheng
9a7b785b60 pvr: implement GetRenderingAreaGranularity
As the implementation of GetRenderAreaGranularity does not reference the
render pass object, just move it to a new function and use it for both
functions.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:43 +00:00
Icenowy Zheng
201c2b781c pvr: implement CmdBindIndexBuffer2
As index buffer bound checking isn't yet supported by the driver, the
newly added size parameter is just assert-checked.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:43 +00:00
Icenowy Zheng
55b21dd459 pvr: prevent direct access to VkImageSubresourceLayers::layerCount
With VK_KHR_maintenance5, the layerCount member of
VkImageSubresourceLayers can be VK_REMAINING_ARRAY_LAYERS.

Change any direct access to this member to the common runtime function
vk_image_subresource_layer_count, which can handle the maint5 case.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:42 +00:00
Icenowy Zheng
582a791980 pvr: return FORMAT_NOT_SUPPORTED for unknown image types
VK_KHR_maintenance5 requires the driver to accept values beyond the
defined enumerants for physical-device-level functions. Although the
VkImageType enumeration hasn't received any new enumerants since
VK_VERSION_1_0, it's possible that it gets extended in the future.

Change the code to return a VK_ERROR_FORMAT_NOT_SUPPORTED instead of
using UNREACHABLE (which triggers an assert).

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41569>
2026-05-18 16:05:42 +00:00
Jose Maria Casanova Crespo
bd496a6aad broadcom/ci: skip SSBO tests close to the 60s threshold on rpi4
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Add them to the existing "Slow CTS tests" group in
broadcom-rpi4-skips.txt.

Assisted-by: Claude Opus 4.7
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41615>
2026-05-18 15:42:24 +00:00
Danylo Piliaiev
ebdcf84100 tu: Always lazy_init_vsc for tiler rendering
Apparently we emitted uninitialized values for VSC in tu6_emit_tile_select
when HW binning wasn't used, which Adreno 630 doesn't like and hangs.

Instead of adding even more conditions, just always init VSC state,
the rare cases where initializing it can be skipped - not worth
the complexity.

Fixes: 49191f46e6 ("tu/a6xx: Emit VSC addresses for each bin to restore after preemption")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41604>
2026-05-18 15:17:32 +00:00
Eric Engestrom
c5e413533f etnaviv: initialize value before calling etna_gpu_get_param(), in case it fails
We could add an error check instead, but we actually need `features` to be fully
initialized and we'd be setting it to `0` in the else, so let's just initialize
`val = 0` and not have to care whether etna_gpu_get_param() succeeds.

Fixes: 358e1f10c5 ("etnaviv: drm: Initialize etna_core_info based on kernel features")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41621>
2026-05-18 14:44:21 +00:00
Rob Clark
f8b61c96cf rusticl: Support/ignore -qcom-accelerate-16-bit
Some apps when they see adreno just blindly stuff in this compiler arg.
Just silently ignore it.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41520>
2026-05-18 14:26:50 +00:00
Rob Clark
185c89084a freedreno/a6xx: Expose subgroup ops
This is needed for cl31

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41520>
2026-05-18 14:26:50 +00:00
Timothy Arceri
45421292f1 ac/nir/lower_tex_coord: update cursor when moving wqm coordinates
We need to update the build cursor when moving a load otherwise
subsequent loads will be using a stale cursor.

Fixes: 0ff1650662 ("ac/nir/lower_tex_coord: fix moving wqm coordinates")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15494

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41629>
2026-05-18 14:03:20 +00:00
Jon Turney
90c47206c5 glx/windows: Drop static from driwindowsCreateScreen()
> ../src/glx/driwindows_glx.c:445:1: error: static declaration of ‘driwindowsCreateScreen’ follows non-static declaration
>   445 | driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred)
> ../src/glx/glxclient.h:160:20: note: previous declaration of ‘driwindowsCreateScreen’ with type ‘struct glx_screen *(int,  struct glx_display *, _Bool)’
>   160 | struct glx_screen *driwindowsCreateScreen(int screen, struct glx_display *priv, bool driver_name_is_inferred);

Since driwindowsCreateScreen() is now called directly, rather than via
function pointers in the _GLXDRIdisplay structure, it needs to be
public.

Fixes: 0d78711cfb ("glx: delete __GLXDRIdisplay")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
2026-05-18 13:33:35 +00:00
Jon Turney
d1d8902dcc glx/windows: Add GLX_USE_WINDOWSGL in new places it's needed to build libGL
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
2026-05-18 13:33:35 +00:00
Jon Turney
db26f34530 glx/windows: Fix compliation after code motion to put event base in 'dri' context
> ../src/glx/driwindows_glx.c: In function ‘driwindowsCreateScreen’:
> ../src/glx/driwindows_glx.c:479:48: error: ‘dpy’ undeclared (first use in this function)

08e2985e57 moved this code from driwindowsCreateDisplay to
driwindowsCreateScreen.

Unfortunately, dpy is no longer a parameter, so we need to look it up in
glx_display struct. (Looking it up in psc->base before it's initialized
here initialized would be incorrect).

Fixes: 08e2985e57 ("glx: move driwindows_display::event_base to driwindows_context")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
2026-05-18 13:33:35 +00:00
Jon Turney
464daf978e glx/windows: Fix compilation of driwindows_glx after driscreen changed from pointer to member
> ../src/glx/driwindows_glx.c: In function ‘driwindows_create_context’:
> ../src/glx/driwindows_glx.c:122:8: error: wrong type argument to unary exclamation mark
>   122 |    if (!psc->base.driScreen)
>       |        ^
> ../src/glx/driwindows_glx.c: In function ‘driwindows_create_context_attribs’:
> ../src/glx/driwindows_glx.c:196:8: error: wrong type argument to unary exclamation mark
>   196 |    if (!psc->base.driScreen || !config_base)
>       |        ^

Since the driScreen member of driwindows_screen is now a struct, not a
pointer, checking it for non-NULL-ness like this is an error.

Fixes: 1ce9aa3d65 ("mesa_interface: replace opaque __DRIscreen with struct dri_screen everywhere")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
2026-05-18 13:33:35 +00:00
Jon Turney
2f05e96d16 glx/windows: Add stdbool.h include to 'direct GLX via WGL' implementation
These files make use of the constant 'false', but don't include
stdbool.h.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
2026-05-18 13:33:34 +00:00
Jon Turney
f9a7c50ed6 glx/windows: Avoid shadowing 'type' parameter of driwindowsCreateDrawable()
> ../src/glx/driwindows_glx.c: In function ‘driwindowsCreateDrawable’:
> ../src/glx/driwindows_glx.c:283:17: error: ‘type’ redeclared as different kind of symbol
>  283 |    unsigned int type;
>      |                 ^~~~
> ../src/glx/driwindows_glx.c:261:52: note: previous definition of ‘type’ with type ‘int’
>   261 |                          GLXDrawable drawable, int type,
>      |                                                ~~~~^~~~

Fixes: 887f5a6320 ("glx: add drawable type argument when create drawable")
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41421>
2026-05-18 13:33:34 +00:00
Matthieu Oechslin
4527b30a04 r600: Fix crash on R600/R700 with custom border color
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
r600_pipe_sampler_view may be NULL. This is properly checked
when emmiting samplers on EG+, but not on R600/R700.
Fix a crash on Tesseract

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Fixes: 5bee7c0b
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41432>
2026-05-18 13:17:05 +00:00
Simon Perretta
eda401cd9a pco: drop global path for null descriptor checking
Global I/O intrinsics don't have an index offset, and can't directly be
mapped to descriptors.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
2026-05-18 12:43:52 +00:00
Simon Perretta
124b30f7ba pco, pvr: finish and enable VK_KHR_workgroup_memory_explicit_layout
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
2026-05-18 12:43:52 +00:00
Simon Perretta
657ecb93b5 pco: conditionally spill shared memory to global memory
Spills shared memory based on a fixed threshold, currently set to 75%.
This is to account for other usage of the common store.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
2026-05-18 12:43:52 +00:00
Simon Perretta
cba2833e0d pvr, pco: store device runtime info in compiler context
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
2026-05-18 12:43:52 +00:00
Simon Perretta
1821309b54 pvr, pco: add support for spilling shared memory to global memory
Add a PCO_DEBUG option to force spilling to begin with.

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
2026-05-18 12:43:51 +00:00
Simon Perretta
0433247dc3 pvr: consider barriers when calculating compute instances
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41545>
2026-05-18 12:43:51 +00:00
Jose Maria Casanova Crespo
14b8d02130 v3dv: assert timestamp pool BO is disjoint from dst buffer BO
The two BOs come from distjoint allocation nowadays. So they
would never share the BO handle. In case this becomes false
in the future, the BO hanldes needs to be de-duped as happens
with TFU submisions.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41616>
2026-05-18 12:26:55 +00:00
Jose Maria Casanova Crespo
87a0eac718 v3dv: avoid duplicate bo_handles between cpu_job and CSD lists
v3d_submit_cpu_ioctl() takes a separate ww_acquire_ctx for the cpu_job's
bo_handles[] and any embedded CSD's bo_handles[]; a BO appearing in both
lists makes the second lock wait on a reservation held by the first
context, deadlocking the ioctl.

We avoid adding a duplicate BO handle when it's already in the cpu_job's
list. This collided when an app suballocates an indirect VkBuffer and a
CSD bind-group VkBuffer out of one VkDeviceMemory.

Fixes: e404ccba5b ("v3dv: use the indirect CSD user extension")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41616>
2026-05-18 12:26:55 +00:00