Commit Graph

208239 Commits

Author SHA1 Message Date
Boris Brezillon d14f2df85a pan/kmod: Expose the raw GPU ID through pan_kmod_dev_props
Rather than splitting the GPU ID in two, let the GPU ID users do that
when they need.

We also rework the model detection to use a mask so we can customize
the mask if the version major/minor fields are required to differentiate
two GPUs with the same arch major/minor and product major.

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35155>
2025-07-09 08:40:12 +00:00
Yogesh Mohan Marimuthu e18da57276 radeonsi: replace fprintf stderr using mesa_log helper functions
radeonsi driver error and warnings fprintf will only use mesa_log
helper functions.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35862>
2025-07-09 07:43:13 +00:00
Georg Lehmann 9e8ba10447 aco/vn: remove dead instructions early
Dead p_create_vector/p_split_vector left behind by instruction selection slow down
the other passes and negatively affect extract labels in aco_optimizer.

Foz-DB GFX1201:
Totals from 964 (1.20% of 80251) affected shaders:
MaxWaves: 29206 -> 29030 (-0.60%); split: +0.08%, -0.68%
Instrs: 669369 -> 668842 (-0.08%); split: -0.16%, +0.09%
CodeSize: 3385192 -> 3383216 (-0.06%); split: -0.13%, +0.07%
VGPRs: 46788 -> 46848 (+0.13%); split: -0.85%, +0.97%
Latency: 3985660 -> 3892742 (-2.33%); split: -2.54%, +0.21%
InvThroughput: 538296 -> 536761 (-0.29%); split: -0.38%, +0.10%
VClause: 8336 -> 8418 (+0.98%); split: -0.17%, +1.15%
SClause: 17111 -> 17120 (+0.05%); split: -0.20%, +0.25%
Copies: 44393 -> 44239 (-0.35%); split: -1.25%, +0.91%
PreSGPRs: 45417 -> 45419 (+0.00%)
PreVGPRs: 30401 -> 31644 (+4.09%); split: -0.00%, +4.09%
VALU: 348282 -> 348167 (-0.03%); split: -0.15%, +0.12%
SALU: 121454 -> 121410 (-0.04%); split: -0.04%, +0.01%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35825>
2025-07-09 07:23:09 +00:00
Georg Lehmann 82af226690 aco: remove unused swap_srcs from emit_vop3p_instruction
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35825>
2025-07-09 07:23:09 +00:00
Georg Lehmann 96793fb0c1 aco/isel: implement 16bit vec2 shifts
The source bit size mismatch is a bit annoying, but it's still worth it to
vectorize these.

Foz-DB Navi48:
Totals from 85 (0.11% of 80251) affected shaders:
Instrs: 119073 -> 118827 (-0.21%); split: -0.21%, +0.00%
CodeSize: 669604 -> 667552 (-0.31%); split: -0.31%, +0.00%
VGPRs: 4796 -> 4736 (-1.25%)
Latency: 1907685 -> 1901983 (-0.30%); split: -0.32%, +0.02%
InvThroughput: 642603 -> 640680 (-0.30%); split: -0.33%, +0.03%
VClause: 2088 -> 2091 (+0.14%)
Copies: 18300 -> 18394 (+0.51%); split: -0.01%, +0.52%
Branches: 3452 -> 3440 (-0.35%)
VALU: 63378 -> 63144 (-0.37%); split: -0.37%, +0.00%
SALU: 23065 -> 23076 (+0.05%); split: -0.00%, +0.05%

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35825>
2025-07-09 07:23:08 +00:00
Konstantin Seurer 4e258f8579 radv/rra/gfx10_3: Fix acceleration structure addresses
RRA adds rra_accel_struct_chunk_header::header_offset to the address so we need to subtract it.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35985>
2025-07-09 07:04:37 +00:00
Vinson Lee 406066c6f6 subprojects: Update linux-raw-sys to 0.7.0
Fix build error with rustix-1.0.7.

error[E0425]: cannot find value `MAP_DROPPABLE` in module `linux_raw_sys::general`
   --> ../subprojects/rustix-1.0.7/src/backend/linux_raw/mm/types.rs:109:51
    |
109 |         const DROPPABLE = linux_raw_sys::general::MAP_DROPPABLE;
    |                                                   ^^^^^^^^^^^^^ not found in `linux_raw_sys::general`

Fixes: 8a2f43c9bd ("util: rust: update to rustix 1.0.7")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13460
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35930>
2025-07-09 06:16:43 +00:00
Mike Blumenkrantz 0f5c663513 vulkan/cmd_queue: don't null deref when freeing pNext
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36004>
2025-07-09 05:48:22 +00:00
Mike Blumenkrantz eed207e597 lavapipe: fix advertised depth resolve modes
only sample0 is actually supported

Fixes: 07956bbcae ("lavapipe: VK_KHR_depth_stencil_resolve support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36004>
2025-07-09 05:48:22 +00:00
Yiwei Zhang 48cd696213 venus: use common ANB swapchain gralloc usage query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:07 +00:00
Yiwei Zhang 374d97f24c hasvk: use AHARDWAREBUFFER_USAGE_CAMERA_MASK
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:07 +00:00
Yiwei Zhang e394d29a75 hasvk: use common ANB swapchain gralloc usage query
The usage bits issue probably isn't worth a separate backport for hasvk.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:07 +00:00
Yiwei Zhang 4f80b14d0c anv: use AHARDWAREBUFFER_USAGE_CAMERA_MASK
now that AHB header has it defined.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:07 +00:00
Yiwei Zhang eb567fefc9 anv: use common ANB swapchain gralloc usage query
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:07 +00:00
Yiwei Zhang 8f4c938c1e anv: fix ANB gralloc usage query to not append display usage bits
The consumer of the Android surface may or may not be display. e.g. it
can also be a media encoder. When BufferQueue makes the allocation, it
takes the gralloc usage bits from both the client API (EGL/Vulkan) and
the consumer side.

Cc: mesa-stable
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:06 +00:00
Yiwei Zhang fb77881262 radv: use AHARDWAREBUFFER_USAGE_CAMERA_MASK
Now AHB header has it defined.

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:06 +00:00
Yiwei Zhang 0d33739216 radv: use common ANB swapchain gralloc usage query
The additional usage bits added for rgba8 and rgb565 are not needed as
those are conditionally added based on the consumer side of the Android
surface (e.g. display, encoder, etc).

Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:06 +00:00
Yiwei Zhang 99eac81bb9 vulkan/android: fix and re-orgnize support before api level 26
The existing common ANB helpers are declared under DETECT_OS_ANDROID but
the implementations are hidden further behind ANDROID_API_LEVEL >= 26,
which is not right.

In addition, for the sanity, let's move front buffer usage query behind
api level 26, while moving baseline ANB entry points above the
conditional api level scope.

In the future, we should look to drop below 26 support (basically drop
Android N support where Vulkan 1.0.3 was initially supported).

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:05 +00:00
Yiwei Zhang a07306ad98 vulkan/android: rewrite swapchain gralloc usage query
Drop redundant validation and simplify code.

v2: error out for unknown image usages and preserve helper

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:05 +00:00
Yiwei Zhang 04570c14ea vulkan/android: drop redundant image format query
No need to check the baseline support since that's part of core, and the
extended support is checked from vkGetPhysicalDeviceSurfaceFormatsKHR by
the platform against both gralloc and the driver.

Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:05 +00:00
Yiwei Zhang 495156079c vulkan/android: fix to not append GRALLOC_USAGE_HW_COMPOSER bit
The composer usage bit is automatically added by the surface consumer
side when the consumer is SurfaceFlinger. e.g. if the swapchain is
connected with a media encoder surface, the consumer side would append
encoder usage bit instead.

Fixes: c406d53858 ("vulkan/android: Add common vkGetSwapchainGrallocUsage{2}ANDROID")
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35785>
2025-07-09 03:47:04 +00:00
Connor Abbott 63be5358c7 tu: Don't allow changing writeableness in a condition
We can't currently handle this. Assert instead of silently hanging the
GPU.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35993>
2025-07-09 02:49:44 +00:00
Connor Abbott 5d7e4ab405 tu/cs: Assert that the CS is not writeable when resetting
Leaving writeable on probably means that we forgot to disable
writeable somewhere, which is a bad idea. The existing code couldn't
handle this and would subtly crash somewhere else due to start not being
saved, but just assert instead to make the problem more clear.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35993>
2025-07-09 02:49:44 +00:00
Connor Abbott 336839bcd8 tu: Don't leave tile store CS writeable
A rebase problem meant that the hunk leaving the CS not writeable again
was dropped. This isn't what was intended and caused a crash in the CS
code.

Because tu6_emit_gmem_stores() is now called inside a condition, we have
to move the enable/disable outside of it because changing to a
read-write buffer inside of a condition isn't currently supported.

Fixes: ba9d0ba9a0 ("turnip: Emit tile stores at subpass end time.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35993>
2025-07-09 02:49:43 +00:00
Simon Perretta ad66ebb686 pvr: enable partial vertex input dmas
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/33998>
2025-07-08 23:10:59 +00:00
Simon Perretta 043e05768a pco: add support for more pack/unpack ops
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/33998>
2025-07-08 23:10:59 +00:00
Simon Perretta 2983d23e63 pvr: reorder device setup to create the compiler context earlier
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/33998>
2025-07-08 23:10:59 +00:00
Simon Perretta ba4628a094 pco: allow empty/nop vertex shaders
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/33998>
2025-07-08 23:10:59 +00:00
Simon Perretta f06e14cc6c pvr: setup vk pipeline cache
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/33998>
2025-07-08 23:10:59 +00:00
Simon Perretta a4500abc75 pvr: store device uuid and build sha
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/33998>
2025-07-08 23:10:59 +00:00
Simon Perretta 0751eb576d pco: enable translation of vs sysvals
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/33998>
2025-07-08 23:10:58 +00:00
Simon Perretta 410bba0463 pco: support flat interpolation varyings
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/33998>
2025-07-08 23:10:58 +00:00
Simon Perretta c386c2f9e8 pvr, pco: point size handling
Clamp point size to limits.
Emit default point size if required but none is provided.

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/33998>
2025-07-08 23:10:57 +00:00
Simon Perretta dc6ea99fde pco, pygen: add f{min,max} support
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/33998>
2025-07-08 23:10:57 +00:00
Simon Perretta 1cd2bb58fb pco: skip vector coalescing if ssa srcs are repeatedly referenced
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/33998>
2025-07-08 23:10:57 +00:00
Simon Perretta 9d23d92afa pco: handle frag/point coords sysvals
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/33998>
2025-07-08 23:10:56 +00:00
Simon Perretta 74d50d7720 pco: add support for load_ubo
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/33998>
2025-07-08 23:10:56 +00:00
Simon Perretta d17d97a867 pco: remove per-device specialization of SPIR-V/NIR options
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/33998>
2025-07-08 23:10:55 +00:00
Simon Perretta 6ff964dd03 pvr, pco: initial descriptor rework
Use more Vulkan runtime/common functions.
Properly use the descriptor pool.
Start to remove legacy/unused constructs from PDS generation.
Support for UBO 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/33998>
2025-07-08 23:10:55 +00:00
Simon Perretta 38d581d842 pvr: drop pvr_lower_nir
This pass can now remain in the compiler as Vulkan-specific data will be
abstracted into the compiler-driver interface.

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/33998>
2025-07-08 23:10:54 +00:00
Frank Binns 08222dc461 pvr: add missing refcounting for descriptor set layouts
Do this by switching to vk_descriptor_set_layout and making use of the helper
functions. This also has the bonus of less code in the driver.

Fixes a segfault seen when running glmark2-es2-wayland.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Co-authored-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/33998>
2025-07-08 23:10:54 +00:00
Simon Perretta 51a3372ff2 pvr: clarify image/sampler state word packing
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/33998>
2025-07-08 23:10:53 +00:00
Simon Perretta 8b8e33106d pco: additional helper functions for address refs
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/33998>
2025-07-08 23:10:53 +00:00
Simon Perretta e7d50a6781 pco: add pco nir algebraic pass boilerplate and basic lowering/opts
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/33998>
2025-07-08 23:10:53 +00:00
Simon Perretta 087d439a52 pco: run dce pass until no more progress is made
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/33998>
2025-07-08 23:10:52 +00:00
Luigi Santivetti 6ad0b59cc8 Revert "pvr: Implement VK_EXT_memory_budget"
This reverts commit 97efa57531.

Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33998>
2025-07-08 23:10:52 +00:00
Simon Perretta a22ad99bdd pvr: set device features/props/extensions to Vulkan 1.0 minimums (unless implemented)
The KHR_shader_expect_assume dEQP tests use dynamic rendering without
first checking that the driver supports 1.3 or the
KHR_dynamic_rendering extension

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/33998>
2025-07-08 23:10:52 +00:00
Simon Perretta ac2460bb3c pvr: commonize limits
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/33998>
2025-07-08 23:10:51 +00:00
Simon Perretta b13fe4e7a7 pco: commonise pass macro, use on opt subpasses
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/33998>
2025-07-08 23:10:51 +00:00
Simon Perretta 765e9d837d pco, pygen: validate phases and io allocations for ops
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/33998>
2025-07-08 23:10:50 +00:00