Commit graph

209728 commits

Author SHA1 Message Date
Eric Engestrom
d1eecf9441 docs/llvmpipe: fix links to defunct drdobbs.com website
The "optimizing pixomatic for modern x86" page was available on the web
archive but the "rasterization on larrabee" one was not, but fortunately
it had been copied onto another website, so link to that now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36555>
2025-08-04 16:52:13 +00:00
Patrick Lerda
e2fbf1f473 r600: refactor step 11 - change r600_aligned_buffer_create() return type
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:42 +00:00
Patrick Lerda
490abd0a26 r600: refactor step 10 - drop create_surface
This change removes create_surface, surface_destroy and
pipe_surface_reference which are no longer needed. Only
r600_create_surface_custom remains which returns now a
simple pipe_surface.

The arguments width0 and height0 of r600_create_surface_custom
are not used and are removed.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:42 +00:00
Patrick Lerda
c47382240e r600: refactor step 9 - remove util_framebuffer_init
This stage replaces r600_surface with pipe_surface.

The trick used to trigger the db_state update is not
working anymore and is removed.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:42 +00:00
Patrick Lerda
c41df6507a r600: refactor step 8 - pre-evergreen operations
This change splits the structures required between evergreen
and pre-evergreen which allows some clean up.

The possible problems could be tested on rv770 with:
piglit/bin/glx-multithread-texture -auto -fbo
piglit/bin/streaming-texture-leak -auto -fbo
piglit/bin/ext_texture_env_combine-combine -auto -fbo

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:42 +00:00
Patrick Lerda
13dd4c1a96 r600: refactor step 7 - split r600_surface
The function evergreen_init_color_surface_rat() is modified
with the reference "surf->base.texture" replaced by
"pipe_buffer" which is initialized as "surf->base.texture".

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:42 +00:00
Patrick Lerda
80c9da8850 r600: refactor step 6 - pre-evergreen clean up
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:41 +00:00
Patrick Lerda
a248dc4d47 r600: refactor step 5 - evergreen clean up an incompatible mechanism
These two elements: color_initialized and depth_initialized are not
compatible with the new refactoring.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:41 +00:00
Patrick Lerda
2bb97f6adc r600: refactor step 4 - clean up r600_surface width0 and height0 elements
These two elements are assigned and are not used.

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:41 +00:00
Patrick Lerda
31b9e509b0 r600: refactor step 3 - split r600_framebuffer
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:41 +00:00
Patrick Lerda
bb749d3e56 r600: refactor step 2 - r600_resource cast is replaced by a function
The function name is updated to r600_as_resource().

This is done with the command below with some manual adjustments:
find . -type f -name "*.c" -exec grep -lE " = [(]struct[[:space:]]+r600_resource[[:space:]]*\*[)]" {} + |\
xargs sed -r -i "s/[(]struct[[:space:]]+r600_resource[[:space:]]*\*[)]([^;]*);/r600_as_resource(\1);/"

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:40 +00:00
Patrick Lerda
43784efeba r600: refactor step 1 - r600_texture cast is replaced by a function
This is done with the command below with some manual adjustments:
find . -type f -name "*.c" -exec grep -lE " = [(]struct[[:space:]]+r600_texture[[:space:]]*\*[)]" {} + |\
xargs sed -r -i "s/[(]struct[[:space:]]+r600_texture[[:space:]]*\*[)]([^;]*);/r600_as_texture(\1);/"

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35967>
2025-08-04 16:26:39 +00:00
Faith Ekstrand
91a3cf4f58 nvk: Blackwell is now Vulkan 1.4 conformant
https://www.khronos.org/conformance/adopters/conformant-products#submission_935

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12961
Backport-to: 25.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36183>
2025-08-04 16:02:08 +00:00
Rhys Perry
d4b329219e nir/lower_memory_model: remove empty lowered barriers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36080>
2025-08-04 15:36:51 +00:00
Rhys Perry
0512ba8743 vtn: remove acquire/release around make visible/available barriers
These are not necessary and can be expensive. I think they were added
because of a misunderstanding of the informative descriptions in the
Vulkan memory model, or because the memory model requires make
visible/available barriers to have these semantics.

Because we use these to implement MakePointerVisible/MakePointerAvailable,
we can skip that requirement in NIR.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36080>
2025-08-04 15:36:51 +00:00
Rhys Perry
ae6e39a8f5 nir: don't move accesses across make visible/available barriers
Otherwise, the barrier would no longer affect the access.

nir_opt_dead_write_vars should be fine, since it's removing stores, not
moving them.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36080>
2025-08-04 15:36:50 +00:00
Rhys Perry
d54f2ca84f vtn: fix placement of barriers for MakeAvailable/MakeVisible
From Vulkan 1.4.321 spec:
The implicit availability operation is program-ordered between the barrier
or atomic and all other operations program-ordered before the barrier or
atomic.
...
The implicit visibility operation is program-ordered between the barrier
or atomic and all other operations program-ordered after the barrier or
atomic.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36080>
2025-08-04 15:36:49 +00:00
Rhys Perry
76c96bf558 aco: fix possible scratch offset overflow
We split vector load/store, so consider that we might add to the constant
offset.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36406>
2025-08-04 15:06:44 +00:00
Rhys Perry
44ab4ad732 aco: align scratch size after isel
Make it safe for VGPR spilling if it's not a multiple of 4.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36406>
2025-08-04 15:06:43 +00:00
Rhys Perry
ab10604924 aco/gfx12: fix printing of temporal hints
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36406>
2025-08-04 15:06:41 +00:00
Valentine Burley
9c49138b1a ci/lava: Use init-stage1 from Mesa build instead of inlining it
We can use the init-stage1 script from the Mesa build artifacts instead of
keeping a copy in the lava-trigger container and inlining it into the
LAVA job definition.

v2 (Guilherme)
* Source the `init-stage1.sh` file instead of executing it
* Avoid hardcoding the run_steps asserts, check only the core parts

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Co-authored-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36549>
2025-08-04 14:31:35 +00:00
Valentine Burley
be15208cda ci/lava: Only keep structured_logger in lava-trigger container
LAVA doesn't use `custom_logger.py`.

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36549>
2025-08-04 14:31:35 +00:00
Patrick Lerda
d2be9f95e5 r600: fix arb_shader_image_load_store incomplete
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This change ensures a deterministic state compatible with
the expected ARB_shader_image_load_store behavior when an
incomplete shader image is detected.

Note: "spec/arb_shader_image_load_store/invalid/.*/address bounds test/.*"
are not addressed by this change.

This change was tested on cypress, palm, barts and cayman and
fixes the remaining issues concerning the following tests:
khr-gl4[2-6]/shader_image_load_store/incomplete_textures: fail pass
spec/arb_shader_image_load_store/invalid/.*/format mismatch test: fail pass
spec/arb_shader_image_load_store/invalid/.*/incompatible format test: fail pass
spec/arb_shader_image_load_store/invalid/.*/incomplete image test: fail pass
spec/arb_shader_image_load_store/invalid/.*/index bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/invalid format test: fail pass
spec/arb_shader_image_load_store/invalid/.*/layer bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/level bounds test: fail pass
spec/arb_shader_image_load_store/invalid/.*/target mismatch test: fail pass
spec/arb_shader_image_load_store/invalid/.*/unbound image test: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35685>
2025-08-04 13:57:56 +00:00
Patrick Lerda
f352491834 r600: fix remaining pbo issues
This functionality is working properly on rv770, but some
issues remain for the newer r600 gpus. These issues are not the
same for cypress and for palm and beyond.

As far as palm and beyond is concerned this change is consistent
with the radeonsi commit: 50c95d0c54 "radeonsi: reject some
3-component formats as buffer textures". This is explained
in a comment of this other commit.

This change assumes that all the real evergreen gpus (before
palm) behave like cypress.

This change was tested on palm, barts and cayman. Here are the tests fixed:
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16f_cube: fail pass
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16i_cube: fail pass
deqp-gles3/functional/texture/specification/teximage2d_pbo/rgb16ui_cube: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16f_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16i_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb16ui_cube_array: fail pass

This change was also tested on cypress. Here are the tests fixed:
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb565_cube: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgb5_a1_cube: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_2d: fail pass
deqp-gles3/functional/texture/specification/teximage[23]d_pbo/rgba4_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb565_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgb5_a1_cube: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_2d: fail pass
deqp-gles3/functional/texture/specification/texsubimage[23]d_pbo/rgba4_cube: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb565_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgb5_a1_cube_array: fail pass
deqp-gles31/functional/texture/specification/teximage3d_pbo/rgba4_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb565_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgb5_a1_cube_array: fail pass
deqp-gles31/functional/texture/specification/texsubimage3d_pbo/rgba4_cube_array: fail pass

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430>
2025-08-04 13:43:29 +00:00
Patrick Lerda
bf76e5bb38 r600: refactor r600_is_buffer_format_supported() for the next update
The variable "i" is updated to the type returned by
util_format_get_first_non_void_channel() which is int.

The function is refactored to handle "for_vbo" as false.

Cc: mesa-stable
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35430>
2025-08-04 13:43:28 +00:00
Eric Engestrom
79c0c828c7 ci: document image tag to bump for rust build changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
2025-08-04 13:14:37 +00:00
Eric Engestrom
8e71665468 ci: dedupe weston setup
We're doing almost the same thing 3 times; let's put that in a script.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
2025-08-04 13:14:37 +00:00
Eric Engestrom
812fad7065 llvmpipe/ci: document flakes seen during stress-testing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
2025-08-04 13:14:37 +00:00
Eric Engestrom
a53f2966b6 llvmpipe/ci: document two regressions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
2025-08-04 13:14:37 +00:00
Eric Engestrom
7e819b2619 llvmpipe/ci: use weston's Xwayland instead of broken Xvfb
`Xvfb` segfaults 100% of the time in the nightly `llvmpipe-full` job;
not sure why the merge job `llvmpipe` wasn't affected, but also we have
no reason to use Xvfb instead of Xwayland.

Note that in 3 out of 50 runs, Xwayland also crashed with the same
message; that's a much better percentage than the current state though 😇

    (EE) Backtrace:
    (EE) 0: /usr/local/bin/Xwayland (0x55f43181a000+0x1ece97) [0x55f431a06e97]
    (EE) 1: /usr/local/bin/Xwayland (0x55f43181a000+0x1f0ad9) [0x55f431a0aad9]
    (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (0x7f1270c6a000+0x3c050) [0x7f1270ca6050]
    (EE) 3: /usr/local/bin/Xwayland (0x55f43181a000+0x174f62) [0x55f43198ef62]
    (EE) 4: /usr/local/bin/Xwayland (0x55f43181a000+0x14dcfa) [0x55f431967cfa]
    (EE) 5: /usr/local/bin/Xwayland (0x55f43181a000+0x14ee17) [0x55f431968e17]
    (EE) 6: /usr/local/bin/Xwayland (0x55f43181a000+0x1529ae) [0x55f43196c9ae]
    (EE) 7: /usr/local/bin/Xwayland (0x55f43181a000+0x147192) [0x55f431961192]
    (EE) 8: /usr/local/bin/Xwayland (0x55f43181a000+0x14a025) [0x55f431964025]
    (EE) 9: /usr/local/bin/Xwayland (0x55f43181a000+0x11640e) [0x55f43193040e]
    (EE) 10: /usr/local/bin/Xwayland (0x55f43181a000+0x11bc5e) [0x55f431935c5e]
    (EE) 11: /usr/local/bin/Xwayland (0x55f43181a000+0x11fc04) [0x55f431939c04]
    (EE) 12: /lib/x86_64-linux-gnu/libc.so.6 (0x7f1270c6a000+0x2724a) [0x7f1270c9124a]
    (EE) 13: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x85) [0x7f1270c91305]
    (EE) 14: /usr/local/bin/Xwayland (0x55f43181a000+0xa2341) [0x55f4318bc341]
    (EE)
    (EE) Segmentation fault at address 0x4
    (EE)
    Fatal server error:
    (EE) Caught signal 11 (Segmentation fault). Server aborting
    (EE)
    [00:39:05.907] /usr/local/bin/Xwayland died on signal 6
    [00:39:05.908] xserver exited, will restart on demand

That "will restart on demand" is clearly not working btw, not sure if
that' Xwayland or weston doing something wrong, but I doubt it's
anything on our side.

A debug build of Xwayland would give us more info, but we don't want to
run CI on a debug build, so that will be something to do in a fork build
for whoever wants to investigate that:
```patch
diff --git ./.gitlab-ci/container/build-xwayland.sh ./.gitlab-ci/container/build-xwayland.sh
index 04072794727147baebf8..1b94b3c56d6948b1cece 100644
--- ./.gitlab-ci/container/build-xwayland.sh
+++ ./.gitlab-ci/container/build-xwayland.sh
@@ -23,7 +23,7 @@
 git clone https://gitlab.freedesktop.org/xorg/xserver
 cd xserver
 git checkout "$XWAYLAND_VERSION"
-meson setup _build ${EXTRA_MESON_ARGS:-}
+meson setup _build ${EXTRA_MESON_ARGS:-} --buildtype debug
 meson install -C _build
 cd ..
 rm -rf xserver
```

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
2025-08-04 13:14:37 +00:00
Eric Engestrom
62857757a9 ci: cleanup weston invocations
Specifically, set WAYLAND_DISPLAY only once and reuse the var, don't
export it to weston itself (even though it's ignored because we
explicitly select the headless backend instead of auto), use long option
names for added clarity, and replace deprecated `--use-gl` with
`--renderer=gl`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
2025-08-04 13:14:37 +00:00
Christian Gmeiner
b4791424b3 etnaviv: rs: Clear only requested color buffers
Fixes: 1ad37d42be ("etnaviv: rs: Extend to support MRTs")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36530>
2025-08-04 12:49:20 +00:00
Christian Gmeiner
c3aab93340 etnaviv: blt: Clear only requested color buffers
Fixes: d3a5306b91 ("etnaviv: blt: Extend to support MRTs")

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36530>
2025-08-04 12:49:20 +00:00
Mary Guillemard
f729bedf89 panvk: Parallelize min max index search on JM
This parallelize min max index search and avoid running that logic per
layer.

This should speed up indexed draw a bit.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:56 +00:00
Mary Guillemard
d936bb496c panvk: Make indexed draw use indirect indexed draw
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:56 +00:00
Mary Guillemard
e25064c026 panvk: Use indirect path for indexed draw on JM
Now that we know that indirect draw works, we can switch to the new
indexed draw codepath.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:55 +00:00
Mary Guillemard
a382e97339 panvk: Implement indirect draw for Bifrost on JM
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:55 +00:00
Mary Guillemard
3be34989e0 panvk: Prepare tiler and vertex dcd for JM indirect
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:54 +00:00
Mary Guillemard
e74372c1c4 panvk: Prepare panvk_draw_prepare_varyings for JM indirect
On JM hardware, we need to allocate a buffer depending on vertex count.

As a result, for indirect and indexed draw we allocate a large buffer with
alloc on fault set.

The size of that buffer is calculated assuming a max of 2 millions vertices
and 18 attributes per vertex (16 user attributes, 2 specials)

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:54 +00:00
Mary Guillemard
de41eaf2d8 panvk: Move JM draw preparation logic to prepare_draw
Most of cmd_draw logic could be shared, let's move what we can.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:53 +00:00
Mary Guillemard
897cc5db1c panvk: Prepare draw_emit_attrib_buf and draw_emit_attrib for indirect
We are going to integrate the helper CL shader.
This shader requires certain extra infos that we need to provide, this
patch adds logic to allocate and fill those infos.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:52 +00:00
Mary Guillemard
a152187f5d libpan: Add draw indexed and indirect helper for Bifrost
Will be used by panvk.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:52 +00:00
Mary Guillemard
b27cb444f2 panfrost: Allow to pass job dependencies in grid for precomp JM
For indirect draws, we need to depends on some previous job in the chain
so we use the grid info to pass this.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:51 +00:00
Mary Guillemard
440e0c283c libcl: Add stdatomic.h
Useful when using C11 atomics with CL C.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:51 +00:00
Mary Guillemard
641ad49ab2 panvk: Directly use index buffer tracked value in JM
Let's not be confusing here.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:51 +00:00
Mary Guillemard
ab0f0323e0 panvk: track oq write jobs in JM
Tracking for those jobs were missing and not reset when the batch was reissued.

Fixes: d1934e44fc ("panvk: Implement occlusion queries for JM")
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:51 +00:00
Mary Guillemard
a1a98d1dc5 panvk: Always use varying_count in emit_varying_attrs
We could end up in situations where the active count wouldn't match the
varying_count causing a memory corruption.

This fix it by not relying on the active count anymore.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Fixes: 05020699b9 ("panvk: Move the linking bits to panvk_shader")
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35724>
2025-08-04 12:12:51 +00:00
Mike Blumenkrantz
a71b6ac41a tc: also inline depth resolves
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this catches the case where an app resolves both color and depth buffers

previously the inlining would only catch the first color buffer, then the depth
resolve which followed would cause the whole of rp tracking to desync and
explode, as seen in Transport Fever 2

Fixes: 8933b3ed39 ("tc: add resolve resource to rp info")

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36521>
2025-08-04 11:45:20 +00:00
Mike Blumenkrantz
71c4f13660 zink: zero dynamic rendering resolve views on rp end
this can otherwise leave stale pointers and trigger broken behavior

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36521>
2025-08-04 11:45:20 +00:00
Samuel Pitoiset
5062f6196f radv: replace DGC before/after dispatch helpers with the new ones
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36355>
2025-08-04 11:05:46 +00:00