Commit Graph

209024 Commits

Author SHA1 Message Date
Samuel Pitoiset
9965a344ae radv: fix SQTT shaders relocation on GFX12
This fixes reporting ISA and instruction timing with RGP.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13525
Fixes: 098c15bfc9 ("radv: use paired shader registers for graphics on GFX12")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36188>
2025-07-22 05:52:10 +00:00
Erik Faye-Lund
72b96df409 docs: document new panfrost extensions
Something went wrong in a rebase, and these got dropped. Whoops, let's
add them to the docs.

Reviewed-by: Chris Healy <cphealy@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36272>
2025-07-21 23:14:22 +00:00
Emma Anholt
055d5759a7 wsi/display: Add error messages to some shouldn't-be-hit paths.
Maybe we could see objects without our required set of properties, but we
definitely should never fail at drmModeObjectGetProperties().

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6173>
2025-07-21 22:53:54 +00:00
Emma Anholt
3c302d29a4 wsi/display: Add some comments about what's going on in the code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6173>
2025-07-21 22:53:54 +00:00
Jonathan Marek
513ffea1d3 wsi/display: use atomic mode setting
Switch from legacy api to the atomic api.  Atomic support should be
standard at this point, and failing to get a KHR_display connector in its
absence seems reasonable (rather than retaining code that we don't expect
to use or test, as in
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4176)

This is a prerequisite for modifiers support, where we need to be able to
pick a specific plane in order to see its supported modifiers list.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6173>
2025-07-21 22:53:54 +00:00
Eric Engestrom
baa9b4225b wsi/display: also select a plane when selecting a crtc
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6173>
2025-07-21 22:53:54 +00:00
Eric Engestrom
09058ccbdb wsi/display: setup the connector earlier
Instead of setting it up when the swapchain is presented, set it up when
creating the swapchain. This means that multiple swapchains might use
the same crtc, but only one can be active at a time, and the connectors
are now refcounted.

This is necessary for the next commit.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6173>
2025-07-21 22:53:53 +00:00
Karol Herbst
15b4ecf104 rusticl/kernel: unbind trailing shader images
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:04 +00:00
Karol Herbst
aa5f8b9d35 rusticl/queue: cache samplers
OpenCL doesn't really allow a wide range of different samplers, so the
cache hit rate is pretty high across all applications.

This also allows us to stop unbinding samplers after each kernel launch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:04 +00:00
Karol Herbst
eb904cd51c rusticl/kernel: stop clearing sampler views on kernel launches
Instead we just unbind on the next launch by using the
unbind_num_trailing_slots parameter.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:03 +00:00
Karol Herbst
2e54e8e89e rusticl/queue: remove RefCell<QueueKernelState>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:03 +00:00
Karol Herbst
e6dc4ceaf1 rusticl/queue: commit lifetime crimes
For annoying reasons we need to add another layer of wrapping around the
queues PipeContext so that we can finally start to turn a few methods &mut
self.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:02 +00:00
Karol Herbst
b291ca1b65 rusticl/queue: pass a mut reference to QueueContext around
It better reflects the ownership, but also allows us to clean up a few
things.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:01 +00:00
Karol Herbst
dad43d6c4a rusticl/queue: clear shader images when destroying queues
The pipe_context might never be reused or the new queue won't ever reuse
all shader image slots leading to stale objects being referenced by the
driver.

Fixes: 50dbcb1d00 ("rusticl: stop clearing shader images after every dispatch")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:01 +00:00
Karol Herbst
a245ed462a rusticl/mesa: use pipe_sampler_view_reference
pipe_sampler_views are reference counted, so we shouldn't delete them
directly.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:01 +00:00
Karol Herbst
ff1c146453 zink: properly unbind sampler views with imported 2D resource
Fixes: 7167214cab ("zink: support crazy CL buffer-to-texture extension")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:00 +00:00
Karol Herbst
23be1f10e2 rusticl/kernel: fix clippy lint needless-question-mark
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
2025-07-21 22:37:00 +00:00
Mike Blumenkrantz
32937b8804 zink: simplify sampler bufferview change for non-db path
all bufferviews are deduplicated now, so this deref is unnecessary

Fixes: ef3f798957 ("zink: prune zink_surface down to the imageview and create/fetch on demand")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36269>
2025-07-21 21:48:31 +00:00
Jordan Justen
bca1acbb42 intel/dev: Add WCL PCI IDs
Tested with:

commit 3a252ff9d8b6dc22b20463bfcb31a4e8992b0e8f
Merge: 9800bf6fae3b 11895f375939
Author: Simona Vetter <simona.vetter@ffwll.ch>
Date:   Fri Jul 11 11:25:34 2025 +0200

Note that the kernel treats WCL similar to PTL, so 94de1dfd4729
("drm/xe/ptl: Drop force_probe requirement") also removed the
force_probe for WCL.

Backport-to: 25.1
Ref: 3c0f211bc8fc ("drm/xe: Add Wildcat Lake device IDs to PTL list")
Ref: 94de1dfd4729 ("drm/xe/ptl: Drop force_probe requirement")
Ref: drm/drm-next 3a252ff9d8b6dc22b20463bfcb31a4e8992b0e8f
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36148>
2025-07-21 21:22:05 +00:00
Jordan Justen
8b771e8937 intel/dev: Add WCL device info
Backport-to: 25.1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36148>
2025-07-21 21:22:05 +00:00
Jordan Justen
ffabca9101 intel/dev/mesa_defs.json: Add WCL WA entries
Backport-to: 25.1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36148>
2025-07-21 21:22:05 +00:00
Jordan Justen
23bc204faa intel/dev: Add WCL platform enum
Backport-to: 25.1
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36148>
2025-07-21 21:22:05 +00:00
Dave Airlie
477533ee00 nvk: add sm120 latencies via csv files.
Two difference from the initial B100 values:

all raw seem to need a +1
hmma seems to need a +7
and +1 for raw hmma for good luck makes 9.

Cc: 25.2
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36217>
2025-07-21 21:07:59 +00:00
Georg Lehmann
0fce848b54 radv: vectorize 8/16bit bitfield_select
No Foz-DB changes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Georg Lehmann
037c2532ab nir/opt_algebraic: create non 32bit bitfield_select
Foz-DB Navi21:
Totals from 68 (0.08% of 80255) affected shaders:
Instrs: 197878 -> 197709 (-0.09%); split: -0.09%, +0.00%
CodeSize: 1060700 -> 1060472 (-0.02%); split: -0.02%, +0.00%
Latency: 659865 -> 659673 (-0.03%); split: -0.03%, +0.00%
InvThroughput: 117010 -> 116985 (-0.02%); split: -0.03%, +0.00%
VClause: 3781 -> 3779 (-0.05%)
Copies: 15317 -> 15265 (-0.34%); split: -0.35%, +0.01%
PreVGPRs: 3251 -> 3250 (-0.03%)
VALU: 96800 -> 96799 (-0.00%); split: -0.00%, +0.00%
SALU: 57006 -> 56836 (-0.30%); split: -0.30%, +0.00%

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Georg Lehmann
6a16c504b8 nir/opt_generate_bfi: create vector and non 32bit bitfield_select
Foz-DB Navi21:
Totals from 1 (0.00% of 80255) affected shaders:
Instrs: 295 -> 293 (-0.68%)
CodeSize: 1588 -> 1572 (-1.01%)
InvThroughput: 350 -> 347 (-0.86%)
VALU: 231 -> 229 (-0.87%)

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Georg Lehmann
d906fa041a ac/nir: don't lower 8/16bit bitfield_select
This is just a bitwise operation, we can support all sizes.

No Foz-DB changes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Georg Lehmann
c80daf934c aco: supported 64bit or vectorized bitfield_select
No Foz-DB changes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Georg Lehmann
14b36fb790 aco/isel: don't create literal operands for SALU bitfield_select
Let the optimizer handle this.

No Foz-DB changes.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Georg Lehmann
10ec25b289 nir/lower_int64: lower 64bit bitfield_select
For r600.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36141>
2025-07-21 20:42:32 +00:00
Pierre-Eric Pelloux-Prayer
ae1aeafe49 radeonsi/gfx12: dont use HTILE for imported textures
Same as other chips.

Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36228>
2025-07-21 19:22:40 +00:00
Pierre-Eric Pelloux-Prayer
7c2a9e8d2a radeonsi: fix refcount with memobj
The existing refcounting code is correct, unless si_texture_from_winsys_buffer
fails in which case we get a refcount error.

The error code path will use si_texture_reference(&tex, NULL), which
will drop a reference to the memobj buffer, but none was taken yet.

Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36228>
2025-07-21 19:22:40 +00:00
Pierre-Eric Pelloux-Prayer
7ed553ba09 radeonsi/tests: enable vk interop testing
Reviewed-by: Ganesh Belgur Ramachandra <ganesh.belgurramachandra@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36228>
2025-07-21 19:22:40 +00:00
Gurchetan Singh
e315917554 gfxstream: null-check in vulkan-mapper
Fixes an observed crash.

Reviewed-by: Jason Macnak <jmacnak@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36264>
2025-07-21 19:00:18 +00:00
Nanley Chery
e3503d3416 iris: Drop iris_resource_image_is_pat_compressible
The functionality is provided by isl_surf_supports_ccs().

Also, move the protected content restriction to
iris_resource_configure_aux(). I'm not aware of any reason protected
content wouldn't support CCS. However, to keep this series simple,
enabling that combination is left for another time.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
4de638ae1e intel: Enable CCS_E on linear surfaces on Xe2+
Allow CCS for non-display linear surfaces in isl_surf_supports_ccs().
We're going to rely more on the helper to determine CCS-enabling for Xe2
on iris.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
33795589ec intel/isl: Only set CMF on renderable views on Xe2+
The compression format is only used during rendering.

This prevents drivers from hitting an unreachable when we start enabling
CCS on linear surfaces which may have non-renderable and non-pow2 formats.

For now, continue to use the surface format instead of the view format
to look up the CMF. This strategy should return the optimal CMF for
compressed surfaces that undergo redescription during copies.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
c769790695 iris: Fix image reallocation for sharing
On XeKMD, BOs need to be created with a vm_id of zero in order to get
prime handles. That only occurs if the image was created with
PIPE_BIND_SHARED/BO_ALLOC_SHARED. Ensure that shareable images have this
flag in iris_flush_resource().

Fixes the dmabufshare demo on BMG with INTEL_DEBUG=noccs and mesa hacked
to disable suballocation.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13511
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
28938e2167 iris: Add PIPE_BIND_SCANOUT when exporting textures
I don't see anything preventing images from being used for display via
EGL_MESA_image_dma_buf_export. When CCS is enabled on linear surfaces in
a future patch, this will prevent exported DRM_FORMAT_MOD_LINEAR images
from being compressed.

On BMG, this fixes the mesa demo, dmabufshare:
https://gitlab.freedesktop.org/mesa/demos/-/blob/main/src/egl/opengl/dmabufshare.c

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
fa9f359b91 iris: Disable fast-clears on linear surfaces
Bspec 57340 does not have a fast-clear rectangle for linear surfaces.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
dd3b0de42c anv: Disable fast-clears on linear surfaces
Bspec 57340 does not have a fast-clear rectangle for linear surfaces.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Nanley Chery
93dbfea720 anv: Disable CCS if image bound to wrong heap on Xe2+
Avoids HIZ + CCS flushes and helps debug.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32120>
2025-07-21 18:36:31 +00:00
Yiwei Zhang
ab6141561d lavapipe: use common tracked size and override if needed
For lavapipe, there's no need for a separate internally tracked size.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:50 +00:00
Yiwei Zhang
addd65241a lavapipe: use common export and import info tracked
The AHB type is no longer needed there as the assert check is no longer
used on the export path. One less DETECT_OS_ANDROID.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:50 +00:00
Yiwei Zhang
a7beff896e lavapipe: use common host ptr info
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:49 +00:00
Yiwei Zhang
d360ea7762 lavapipe: drop redundant memory type index tracking
...since it's not used anywhere

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:49 +00:00
Yiwei Zhang
63aedb5922 lavapipe: use common vk_device_memory::ahardware_buffer
This drops most of the lavapipe specific codes for AHB handling.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:48 +00:00
Yiwei Zhang
0e77c3e44d lavapipe: do not early return for mem alloc size being zero
Per spec VUID-VkMemoryAllocateInfo-allocationSize-07897

> If the parameters do not define an import or export operation,
  allocationSize must be greater than 0.

So early return there is simply messing up with external memory.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:48 +00:00
Yiwei Zhang
7cd8510240 lavapipe: adopt common vk_device_memory
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:47 +00:00
Yiwei Zhang
44e6f0abaa lavapipe: amend missing object finish on mem alloc failure
Missed since it was still vallium.

Cc: mesa-stable
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36252>
2025-07-21 18:19:47 +00:00