Commit graph

191732 commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer
e8fc4546ff winsys/radeon: fill lds properties
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
2024-07-09 15:07:27 +02:00
Pierre-Eric Pelloux-Prayer
e7b200f20b ac/info: remove has_syncobj
syncobj support is now required so these features are always available.
This is the same as 02fe3c32cd, without the radeonsi parts
to not break radeonsi on radeon.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
2024-07-09 15:07:27 +02:00
Pierre-Eric Pelloux-Prayer
2021813450 Revert "ac, radeonsi: remove has_syncobj, has_fence_to_handle"
This reverts commit 02fe3c32cd.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11352
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
2024-07-09 15:07:27 +02:00
Pierre-Eric Pelloux-Prayer
84a563cf6f radeonsi: fix buffer_size in si_compute_shorten_ubyte_buffer
buffer_size is not the full buffer size, but the part of the
buffer that is accessed by the compute shader.

This fixes the assert hit in si_set_shader_buffer.

Fixes: 1a99f50c7f ("radeonsi: use a compute shader to convert unsupported indices format")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29876>
2024-07-09 15:07:27 +02:00
Connor Abbott
c84d1f5571 tu: Support bufferDeviceAddressCaptureReplay on kgsl
We use the method used by the blob, which sets the USE_CPU_MAP flag,
originally intended for SVM, to allocate from a separate address range
and to control the address by passing a preferred address to mmap().

With this we can capture and replay gfxreconstruct traces on kgsl for
apps that use BDA, and we can replay them on msm with a small hack to
increase the address space size:

echo 274877906944 > /sys/module/msm/parameters/address_space_size

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29251>
2024-07-09 09:01:57 +01:00
msizanoen
e5e108706c egl/wayland: Fix direct scanout with EGL_EXT_present_opaque
We select the feedback tranche according to the image format but not the
actual format that we will use for presentation. This breaks direct
scanout in cases where the application selected a visual with an alpha
channel but using EGL_EXT_present_opaque which previously worked as
expected.

Fix this by selecting the feedback tranche according to the actual
presentation format.

Fixes: 9ea9a963aa ("egl/wayland: Fix EGL_EXT_present_opaque")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153>
2024-07-09 06:42:33 +00:00
Alexandros Frantzis
4cac8468d4 egl/wayland: Fail EGL surface creation if opaque format is unsupported
When using the EGL_EXT_present_opaque extension we create wayland
buffers with the opaque variant of the surface format, while the
underlying image is created with the normal surface format. However,
there is no guarantee that the compositor supports that opaque format,
or that we can use that format with all the modifiers of the surface
format.

Since this is completely out of the control of the application, and the
compositor will disconnect the client with an error if the format is not
supported, this commit:

1. Fails EGL surface creation if it determines that the opaque format
   cannot be used, either because it's not present at all, or because
   it shares no modifier with the non-opaque format.
2. When creating the DRI image ensures that we use a modifier that's
   also supported by the opaque format.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153>
2024-07-09 06:42:33 +00:00
Alexandros Frantzis
a271a34d59 egl/wayland: Pass dri2_wl_formats to create_dri_image
Make the dri2_wl_formats struct available in create_dri_image, in
preparation for upcoming changes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28153>
2024-07-09 06:42:33 +00:00
Samuel Pitoiset
d1c97a1a50 radv: rework generating all graphics state for compiling pipelines
This introduces a new helper that will be used to generate a graphics
pipeline hash from a pCreateInfo struct only. Similar to RT.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30049>
2024-07-09 05:48:31 +00:00
Samuel Pitoiset
8f102c9d61 radv: stop passing a pipeline to some graphics related helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30049>
2024-07-09 05:48:30 +00:00
Dave Airlie
fcf5946828 nvk: use 2k overallocation for shader heap.
NVIDIA has informed us via Arthur (and Ben) that 2K
is sufficient here, so move nvk to use that.

Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29746>
2024-07-09 15:10:30 +10:00
Faith Ekstrand
c7c3942786 nouveau/push: Cache the last header DW to avoid read-back
The pushbuf may live in VRAM in which case readback gets very expensive.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
1c5901c0dc nvk: Put descriptors in VRAM
This improves frame rates in The Witness by another 5% or so.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
a342379c56 nvk: Put CB0 in VRAM
This improves frame rates in The Witness by about 2%.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
68f1df5ebb nvk/nvkmd: Be a lot more pedantic about VA alignments
The VA alignment now has two pieces: The bind alignment and the base
address alignment.  The caller gets to request the later but not the
former.  The bind alignment is based entirely on whether or not we know
a priori that the given VA will only ever be used for GART.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
7f45d20d2b nvk/nvkmd: Be more specific about memory alignments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
1db57bb414 nvk/nvkmd: Rework memory placement flags
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
e04bb3dffa nvk: Drop nvk_buffer::is_local
It was always kinda BS and we aren't even using it anymore thanks to
alignment requirements.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
2689760e38 nvk/nvkmd: Flip the script on NO_SHARED
It's a positive flag in the kernel interface because it enables an
optimization and adds restrictions to the BO.  But from a userspace PoV,
NO_SHARE shoudd be the default with import/export being something we
expressly have to ask for.  This also reduces the number of flags we're
setting everywhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
1cee0c9cb7 nvk/nvkmd: Add real mem<->bo flag translation
This way we can start to disconnect nvkmd_mem_flags from
nouveau_ws_bo_flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
0c024da291 nvk: Do mem maps directly in nvkmd on nouveau
There's no point in the extra layer.  It's all just mmap() and friends.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
7bd9b9d96c nvk/nvkmd: Re-implement NVK_DEBUG=vm
This new implementation is hooked at the nvkmd level and also works for
queued binds via a bind ctx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
0abd7fa58a nvk/nvmkd: Plumb parent pointers through everywhere
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
d3264fdfb9 nvk: Move debug flags int nvk_debug.h
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
d96bf198b4 nvk: Move Heaps and BO binding into nvkmd
We may want to move this even higher, into NVK at some point.  However
the wrappers in the winsys layer really aren't doing us much.  If
anything, now that nvkdm_mem::va is an nvkmd_va *, this actually makes
everything simpler because it's allocated through exactly the same paths
as sparse VA.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
0856c27dd1 nouveau/mme: Use fixed BO addresses in the MME test
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
c6c4483d0f nouveau/mme: Don't leak data_bo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
7173ae1130 nouveau/mme: Don't dereference an empty vector
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
60c3c272ec nvk: Remove the last vestages of nouveau/winsys from core NVK
Everything now goes through NVKMD.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
8a516394f9 nvk: Use nvkmd_ctx for queue submit
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
996b152375 nvk: Use an nvkmd_ctx for sparse binding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
a8550862b5 nvk: Convert the upload queue to nvkmd_ctx
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
053b7f0f30 nvk/nvkmd: Implement nvkmd_ctx for nouveau
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
87ca92d881 nvk/nvkmd: Add a context interface
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
29e3b19860 nvk: Use nvkmd_mem for the zero page, VAB, and CB0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
92ac7db7c8 nvk: Use nvkmd_mem for the nvk_queue_state::push
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
d0593bb86c nvk: Drop extra_bos from nvk_queue_submit_simple()
We aren't using it anymore and the only reason it existed in the first
place was for providing BO lists to the old UAPI.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
b86079d61e nvk: Use an nvkmd_mem for the SLM area
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
d8d2ba9666 nvk: Use nvkmd_mem for query pools
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
d072bea5b7 nvk: Use nvkmd_mem for shader and event heaps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
17623bc8a9 nvk: Use nvkmd_mem for descriptor tables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
a87ee75737 nvk: Use nvkmd_mem in nvk_upload_queue
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
bf180d2bbf nvk: Use nvkmd_mem for nvk_descriptor_pool
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
586990f89e nvk: Use nvkmd_mem for nvk_cmd_pool
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
bf8115e3c2 nvk: Use nvkmd_mem for nvk_image::linear_tiled_shadow_mem
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
99ddddb18d nvk: Use nvkmd_mem for nvk_device_memory
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
93792b5ef2 nvk: Add static wrappers for image/buffer binding
This makes the looping and error handling more clear.  We're about to
make some of these ops capable of failing so getting that right is
really important.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
e63649da11 nvk/nvkmd: Implement the mem and va interfaces for nouveau
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
0b93c42ba1 nvk/nvkmd: Add memory and virtual address interfaces
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00
Faith Ekstrand
4323d2ac54 nvk: Use the NVKMD interface for device enumeration
We'll keep nvk_device::ws_dev for now because it's useful to not have to
change everything over at once.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
2024-07-09 01:22:23 +00:00