Commit graph

71025 commits

Author SHA1 Message Date
Karol Herbst
389577c8bb radeonsi: implement pipe_screen::semaphore_create
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
51d03ba1b9 zink: implement pipe_screen::semaphore_create
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
129f22140c zink: factor out fence creation function
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
64fb3c81af rusticl/mesa: wire up semaphores
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
cc32c5c2eb gallium: add pipe_screen::semaphore_create
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
9bacd232b8 gallium/noop: add fence_server_signal
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
712734d600 rusticl/util: add MultiValProperties
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
5d29acf23d rusticl/event: fix create_and_queue for deps in error states
Cc: mesa-stable
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Karol Herbst
a7966f693b rusticl/device: add DeviceCaps::has_create_fence_fd and use it
Device::is_gl_sharing_supported was calling helper_ctx() but that can
block randomly for any reason, so let's not do that.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36007>
2025-08-31 13:12:16 +00:00
Marek Olšák
9e16ed7a13 ac/nir: switch nir_load_smem_amd uses to ac_nir_load_smem wrapper
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
ac_nir_load_smem will use load_global_amd

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37101>
2025-08-30 15:04:32 -04:00
Marek Olšák
4c87d002e3 aco,radeonsi: expand 32-bit shader arg pointers to 64 bits for ACO
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37101>
2025-08-30 15:04:32 -04:00
Seán de Búrca
70794de792 rusticl/kernel: delay calculation of CSO info until kernel creation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37036>
2025-08-30 09:59:54 -07:00
Eric Engestrom
ba292ac34a zink+radv/ci: add traces job on gfx1201
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37010>
2025-08-30 14:53:55 +00:00
Eric Engestrom
e0417ea468 zink+radv/ci: add traces job on vangogh
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37010>
2025-08-30 14:53:55 +00:00
Karol Herbst
0478d83eae rusticl/kernel: rework KernelExecBuilder::get_resources_and_globals to reduce allocations
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:53 +00:00
Karol Herbst
0b80bf3ee0 rusticl/kernel: allocate the full input buffer at creation time
This should save us random reallocations of the input buffer lowering
kernel launch overhead by a bit.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:53 +00:00
Karol Herbst
cfbe6020dc rusticl/kernel: add KernelExecBuilder::input
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:53 +00:00
Karol Herbst
183cbb0862 rusticl/kernel: move workgroup id offset handling into KernelExecBuilder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:52 +00:00
Karol Herbst
3edb4daba2 rusticl/kernel: add KernelExecBuilder::get_resources_and_globals
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:52 +00:00
Karol Herbst
89f35e99a4 rusticl/kernel: add KernelExecBuilder::add_zero_padding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:52 +00:00
Karol Herbst
0dc2a8fc01 rusticl/kernel: add KernelExecBuilder::add_values
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:51 +00:00
Karol Herbst
f83cfe7b21 rusticl/kernel: move add_sysval into KernelExecBuilder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:51 +00:00
Karol Herbst
955c83992b rusticl/kernel: move add_global into KernelExecBuilder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:50 +00:00
Karol Herbst
a2ffc1db55 rusticl/kernel: move add_pointer into KernelExecBuilder
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:50 +00:00
Karol Herbst
fc6f646262 rusticl/kernel: reduce CPU overhead of set_global_binding
This gets rid of the slice conversion we had to do previously.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:49 +00:00
Karol Herbst
357299052a rusticl/mesa: add borrow/to_owned semantics to our pipe_resource wrapper
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:49 +00:00
Karol Herbst
10b3dcdadf rusticl/mesa: rename PipeResource to PipeResourceOwned
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36917>
2025-08-30 14:36:49 +00:00
Mike Blumenkrantz
352ca665cb zink: set can_bind_const_buffer_as_vertex
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37093>
2025-08-29 21:07:40 +00:00
Mike Blumenkrantz
6c1294ae1c zink: unset validate_all_dirty_states
whatever bug used to exist here with DOOM2016 has since been fixed

ref #8252

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37093>
2025-08-29 21:07:40 +00:00
Rob Clark
e9cd8ebb16 freedreno/a6xx: Require write support for images
is_format_supported() doesn't really differentiate between read and
write.  So require both.

Fixes a bunch of cl cts tests resulting from garbage (uninitialized)
storage_descriptor.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37089>
2025-08-29 19:57:35 +00:00
Aleksi Sapon
5d06b2ac64 draw: don't set the clipped window coordinate to NaN in debug
Setting the old window coordinate to NaN is more likely to hide the
problem in debug builds because the NaN vertices are dropped later in
the pipeline, either through explicit NaN checks or implicit line
length checks.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36653>
2025-08-29 13:35:12 +00:00
Aleksi Sapon
1eef08771f draw: fix missing line viewport transformation
Fixes: 00627b4f ("aux/draw: add guardband clipping for lines")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36653>
2025-08-29 13:35:12 +00:00
Gert Wollny
44c07c93d0 r600/sfn: try all possible configurations when splitting multi-slot instructions
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
With that we can better schedule these instructions into groups.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36921>
2025-08-29 12:03:55 +00:00
Gert Wollny
1cd125f982 r600/sfn: Pin registers to channel only after scheduling
Registers that don't need to be pinned to a channel right from the start
can be pinned when the instrcutions writing to them are scheduled.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36921>
2025-08-29 12:03:55 +00:00
Gert Wollny
7de75bafc6 r600/sfn/tests: Update source pinning when loading from string
Results of TEX and FETCH are pinned to group automatically when
creating instructions from string. With the new scheduling code
the channel pinning might be added and this needs to be handled
when reading the expectation shaders.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36921>
2025-08-29 12:03:54 +00:00
Faith Ekstrand
31f0d0732e lavapipe: Always use dma-buf for external memory when we can
This makes lavapipe act like other DRM drivers whenever we have udmabuf
and just make everything a dma-buf even if it doesn't strictly have to
be.  Without this we can end up in weird cases if the client asks to
allocate a memory object with multiple export types.  Before, if this
happened, we would allocate a memfd and then return that when the client
calls GetMemoryFd() even if they asked for a dma-buf.  In theory, we
could add additional plumbing to allow for using the memfd itself for
OPAQUE_FD and only wrap in a udmabuf if DMA_BUF is requested but this is
simpler and more in line with what hardware DRM drivers do.

Fixes: c1657de63c ("lavapipe: support VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13798
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37067>
2025-08-28 21:50:56 +00:00
Connor Abbott
16cd5e0244 zink: Make sparse always wait on pending gfx commands
We need to make sure that earlier gfx commands don't see the committed
resource. Also, the commit doesn't necessarily happen atomically,
because the kernel has to unmap the NULL page and then map the BO page,
so earlier gfx submits could race with the kernel an see an unmapped
page and fault. This is the same race when uncommitting but in reverse.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37065>
2025-08-28 21:28:24 +00:00
Mike Blumenkrantz
0bae67b02b zink: flag resources for layout eval in update_binds_for_samplerviews()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this ensures the used layout is in sync with the expected descriptor layout

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37066>
2025-08-28 20:24:34 +00:00
Mike Blumenkrantz
57399b5b8b zink: fix some weird indentation in update_binds_for_samplerviews()
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37066>
2025-08-28 20:24:33 +00:00
Antonio Ospite
18ef7b82c6 radv: don't include amdgpu.h directly
Don't include amdgpu.h directly in AMDGPU/RADV code, the only libdrm
pieces that are needed are handled in src/amd/common/ac_linux_drm.h
which already includes amdgpu.h

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36932>
2025-08-28 18:08:20 +00:00
Mike Blumenkrantz
b1d07ae43a zink: enable single-aspected blitting of mixed z/s formats
not sure anyone supports this, but zink should handle it alright

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37057>
2025-08-28 17:24:52 +00:00
Mike Blumenkrantz
e83c7f2912 zink: always flush clears when doing single-aspect blit to avoid data loss
if doing e.g., clear(DEPTH|STENCIL) -> blit(DEPTH), the stencil clear would
previously have been discarded

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37057>
2025-08-28 17:24:52 +00:00
Mike Blumenkrantz
817077276a zink: also set msrtss stencil
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37057>
2025-08-28 17:24:51 +00:00
Rob Clark
807644b864 freedreno/a6xx: Drop VPC table magic
It is a bit annoying to have the resulting increased duplication, but
the table magic doesn't play nicely with variant regs.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00
Rob Clark
0f2f247f91 freedreno: Name a few events
And add them to the gpu_event helper so we don't need to open-code these
packets.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00
Rob Clark
77c42c1a57 freedreno/registers: Make TPL1_BICUBIC_WEIGHTS_TABLE an array
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00
Rob Clark
acde75ba4e freedreno/registers: Prep for upcoming things
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00
Rob Clark
f4ca0093d5 freedreno/a6xx: Convert to variant reg packers
Convert the builders and drop the -DFD_NO_DEPRECATED_PACK

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00
Rob Clark
ae8907f270 freedreno/registers: Add a way to disable deprecated warnings
Intended for temporarily disabling the warnings when bringing up a new
gen.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00
Rob Clark
f31883c20c freedreno/registers: pm4 cleanup
Use <stripe> to handle 32b vs 64b gpu differences.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37009>
2025-08-28 16:59:28 +00:00