Commit graph

208966 commits

Author SHA1 Message Date
Ruijing Dong
32a2012975 radeonsi/vcn: vcn5 av1 decoding context buffer fix
In VCN5, the AV1 context buffer has changed to a bigger
one than VCN4. It fixed an AV1 decoding issue on VCN5.

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36208>
2025-07-18 16:45:42 +00:00
Valentine Burley
68871363b0 lavapipe/ci: Add Android Hardware Buffer test set
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:13 +00:00
Yiwei Zhang
209e402720 lavapipe: do not short-circuit AHB export alloc (non-import)
Per spec VUID-VkMemoryAllocateInfo-pNext-01874:

If the parameters do not define an import operation, and the pNext chain
includes a VkExportMemoryAllocateInfo structure with
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
included in its handleTypes member, and the pNext chain includes a
VkMemoryDedicatedAllocateInfo structure with image not equal to
VK_NULL_HANDLE, then allocationSize must be 0

- before: total 116, skip 66, pass 36, fail 14
- after:  total 116, skip 66, pass 50, fail 0

Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:13 +00:00
Yiwei Zhang
91c8372c67 lavapipe: populate AHB memory mapping
- before: total 116, skip 66, pass 36, fail 14
- after:  total 116, skip 66, pass 38, fail 12

Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:13 +00:00
Yiwei Zhang
faa71af431 lavapipe: properly handle AHB release
Need to release the AHB ref upon vkFreeMemory.

Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:13 +00:00
Yiwei Zhang
160cd3a317 lavapipe: do not close import fd on error and amend an error code
The implementation only takes the ownership after a successful import.
On import failure, the caller is going to handle the fd. Meanwhile,
amend a missing error code on an error path.

Fixes: 895d3399f7 ("lavapipe: add support for KHR_external_memory_fd")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:13 +00:00
Yiwei Zhang
f1af533b2c lavapipe: implement GetMemoryAndroidHardwareBufferANDROID
lvp hasn't used common device memory obj, and it allocates and imports
ahb on its own. Thus it has to implement the AHB export api itself.

- before: total 116, skip 66, pass 24, fail 26
- after:  total 116, skip 66, pass 36, fail 14

Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:12 +00:00
Yiwei Zhang
3167e30ee2 lavapipe: allow AHB export allocation
This fix came from below error log:

> E MESA    : lavapipe: unimplemented external memory type 1024

Fixes: cebb2bf266 ("lavapipe: Add AHB extension")
Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:12 +00:00
Yiwei Zhang
f5c1b74c66 vulkan/android: improve AHB image format check logging
Decimal is better for VkFormat. Also prefer the hex logging with 0x to
be intuitive.

Reviewed-by: Lucas Fryzek <lfryzek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36204>
2025-07-18 16:20:12 +00:00
Collabora's Gfx CI Team
46cbe95ccf Uprev Piglit to 0980079dcfb5adbad873d88e00181268f55cb8ef
a0a27e528f...0980079dcf

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35625>
2025-07-18 15:33:14 +00:00
David Rosca
b665bd21cb radeonsi/vcn: Correctly handle tile swizzle
Currently tile swizzle can only be non zero for single plane
formats, for multi plane formats we always set PIPE_BIND_SHARED.

Luma only (Y400) JPG decode and encode with RGB input surface (EFC)
are the only two cases where we can get surface with tile swizzle
and ignoring it would result in corrupted output.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13346
Acked-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35647>
2025-07-18 15:14:04 +00:00
Mike Blumenkrantz
f45778fbc7 zink: flag dmabuf exports on usage set, not synchronization
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
this should be a bit more accurate

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36220>
2025-07-18 12:33:47 +00:00
Christian Gmeiner
fdace1c6fa freedreno/rddecompiler: Make use of hash table helpers
There is no need to have an own copy

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36218>
2025-07-18 12:16:36 +00:00
Christian Gmeiner
8a1b1d8bd5 v3dv: Make use of hash table helpers
There is no need to have an own copy.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36218>
2025-07-18 12:16:36 +00:00
Karol Herbst
d8793e3874 rusticl/mem: relax flags validation for clGetSupportedImageFormats
While the API spec does describe which flags _may_ be passed in, the
overall CL working group agreement is, that implementations should expect
random flags to be passed in as other implementations _may_ use them to
further restrict or allow image formats.

Also fix validation for importing GL objects while at it.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36216>
2025-07-18 11:47:15 +00:00
Mike Blumenkrantz
92811d9a56 zink: use maint9 implicit query resets when available
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36219>
2025-07-18 11:20:57 +00:00
Karol Herbst
5965f34b5d rusticl/queue: offload waiting on fences to another thread
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This unblocks the main worker thread to keep submitting work to the driver
while we still have something waiting on the completion of batches sent to
the hardware and to signal completion to the attached events.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36158>
2025-07-18 08:49:11 +00:00
Karol Herbst
70b9c88807 rusticl/mesa: add return status to PipeFence::wait
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36158>
2025-07-18 08:49:11 +00:00
Collabora's Gfx CI Team
5f13ab3ec3 Uprev ANGLE to 6a04a50f98cac71b25464d10289ce7a013841caf
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
c39f4a5c55...6a04a50f98

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35482>
2025-07-18 00:10:15 +00:00
Valentine Burley
5c5c464988 ci/angle: Update gn arg to avoid warning message
After this change
https://chromium-review.googlesource.com/c/chromium/src/+/6547915,
using android32_ndk_api_level and android64_ndk_api_level gn args
will results in a warning message:

WARNING Build argument has no effect.
android32_ndk_api_level = 26
                          ^-
Did you mean "android_ndk_api_level"?

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35482>
2025-07-18 00:10:02 +00:00
Mike Blumenkrantz
a333e7a6b8 lavapipe: VK_KHR_unified_image_layouts
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/35743>
2025-07-17 21:37:22 +00:00
Mike Blumenkrantz
e6f18bfb42 lavapipe: maintenance9
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35743>
2025-07-17 21:37:22 +00:00
Mike Blumenkrantz
6d2d4e9bbf lavapipe: call nir_lower_int64
otherwise the 64bit ops unsupported by llvmpipe will not be lowered

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35743>
2025-07-17 21:37:22 +00:00
Georg Lehmann
05ee3c6e0f ac/nir/lower_mem_access_bit_sizes: make 8/16bit access 32bit if possible
This also means we stop splitting 8/16bit vec8.

Foz-DB GFX1201:
Totals from 112 (0.14% of 80301) affected shaders:
Instrs: 219953 -> 218280 (-0.76%)
CodeSize: 1335916 -> 1325748 (-0.76%)
VGPRs: 10460 -> 10412 (-0.46%)
Latency: 1435629 -> 1432818 (-0.20%); split: -0.22%, +0.02%
InvThroughput: 733424 -> 733271 (-0.02%); split: -0.02%, +0.00%
VClause: 4178 -> 4182 (+0.10%)
SClause: 2191 -> 2196 (+0.23%)
Copies: 13911 -> 13784 (-0.91%); split: -1.06%, +0.14%
PreVGPRs: 7620 -> 7619 (-0.01%); split: -0.03%, +0.01%
VALU: 140400 -> 140167 (-0.17%); split: -0.17%, +0.01%
SALU: 18459 -> 18276 (-0.99%)
VMEM: 9219 -> 8944 (-2.98%)
VOPD: 4216 -> 4220 (+0.09%); split: +0.24%, -0.14%

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36164>
2025-07-17 21:00:06 +00:00
Yiwei Zhang
3cdaf55334 lvp: hook up AHB image and buffer properties queries
Hook up AHB support in below API calls:
- vkGetPhysicalDeviceImageFormatProperties2
- vkGetPhysicalDeviceExternalBufferProperties

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
64a4442090 v3dv: amend AHB buffer support
...via adopting vk_android_get_ahb_buffer_properties.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
4ee67ba967 v3dv: adopt vk_android_get_ahb_image_properties
The runtime vk_android.h header has proper android detection inside, so
no need to wrap it with redundant android detection. Meanwhile, the enum
VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID is
defined in the vulkan_core.h, so no need Android wrap either.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
7934c9ab78 vulkan/android: make vk_ahb_probe_format private to android runtime
...and drop duplicate docs.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
e733ac9314 turnip: amend AHB buffer support
...via adopting vk_android_get_ahb_buffer_properties.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
bdf9524e1c turnip: adopt vk_android_get_ahb_image_properties
No behavior change.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
cefda4eedb venus: clean up post vk_android_get_ahb_image_properties adoption
Make this a separate commit to ease review of the prior adoption.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
e4f9ce838a venus: adopt vk_android_get_ahb_image_properties
Now we can fully resolve the AHB image query on the driver side without
roundtrips.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
e33870d207 venus/wsi: move wsi image format info validation to vn_wsi
Added vn_wsi_validate_image_format_info helper to clean up query side
codes.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
89f5938930 venus: adopt vk_android_get_ahb_buffer_properties
Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
9fb91dfd93 vulkan/android: add vk_android_get_ahb_buffer_properties
This is to assist GetPhysicalDeviceExternalBufferProperties query.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Yiwei Zhang
850ede0970 vulkan/android: add vk_android_get_ahb_image_properties
This is to assist GetPhysicalDeviceImageFormatProperties2 query.

Acked-by: Rob Clark <robclark@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36151>
2025-07-17 20:12:23 +00:00
Mike Blumenkrantz
c768699a73 zink: fix valid contents check for adding new bind
the previous one didn't account for buffers

Fixes: b022cdc8a1 ("zink: only copy resource during add_bind if it is valid")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36201>
2025-07-17 19:54:23 +00:00
Danylo Piliaiev
6003a89b89 tu: Use safe-const binning VS when safe-const full VS is used
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Otherwise we can have a case where binning VS uses more consts than
full VS (when safe variant is used for full VS), that will result in
a rendering issue because SP_VS_CONST_CONFIG.CONSTLEN is shared between
full and binning VS in PROGRAM_CONFIG state and gets the value from the
full VS.

There are two alternative solutions that can allow binning VS to always
use maximum constlen:
- Move constlen emission to per-XS config. This interferes
  PROGRAM_CONFIG state which uploads consts and does SP_UPDATE_CNTL.
  Consts would need to be uploaded after constlen is defined, while
  SP_UPDATE_CNTL must be done before per-XS state is emitted.
  Also having SP_UPDATE_CNTL in a draw state that is always DIRTY
  isn't great.
  Something didn't work out on A6XX, so this idea was dropped.
- Emit constlen again in VS_BINNING draw state. This seem to work
  but also likely an undefined behaviour since constlen is changed
  after some consts are uploaded.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36203>
2025-07-17 19:33:42 +00:00
Karol Herbst
a0a9c12124 rusticl/mem: set swizzle for intensity images
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36199>
2025-07-17 19:13:37 +00:00
Karol Herbst
e03d23ddc9 zink: disable shader images for intensity formats
Vulkan only allows identity remapping on storage images descriptors.

Fixes: 475c43cf8a ("zink: translate intensity formats")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36199>
2025-07-17 19:13:37 +00:00
Karol Herbst
146e843254 zink: disallow intensity buffer images
Fixes: 475c43cf8a ("zink: translate intensity formats")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36199>
2025-07-17 19:13:37 +00:00
Karol Herbst
3a2f38cd44 vtn/opencl: set exact on all ffmas and mads
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36175>
2025-07-17 16:47:23 +00:00
Mike Blumenkrantz
10602f2ddd ci: bump VVL to 1.4.322ish
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35791>
2025-07-17 15:28:21 +00:00
Valentine Burley
b7f1f40bf4 ci: Always save the artifacts for performance traces
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We need the job artifacts in all cases to gather performance data.
Since commit b723bc80d2, we were only saving them on failures.

Fixes: b723bc80d2 ("ci/lava: inherit .piglit-traces-test in .lava-piglit-traces and deduplicate configs")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36195>
2025-07-17 14:55:41 +00:00
Antonio Ospite
0f09c9436b ci/android: update comment about ANDROID_CTS_MODULES
After commit 545727f97c (ci/android: Move ANDROID_CTS_MODULES to build
script, 2025-06-24) the comment about ANDROID_CTS_MODULES in
lvp-android-angle-android-cts-include.txt has become inaccurate.

Update the instructions to reflect the latest status.

Fixes: 545727f97c
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36187>
2025-07-17 14:31:40 +00:00
Samuel Pitoiset
12f77a833d Revert "ci: Disable Valve keywords farm"
Martin rebooted the gateway and it seems back now.

This reverts commit 75b92990a0.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36194>
2025-07-17 14:04:21 +00:00
Vignesh Raman
54fcb0e443 ci/init-stage1: avoid duplicate mounts
Check if filesystems are mounted before attempting to mount them,
and use mkdir -p to prevent errors if directories already exist.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35961>
2025-07-17 13:16:56 +00:00
Vignesh Raman
89ff124263 ci/lava: bump ALPINE_X86_64_LAVA_TRIGGER_TAG
Bump ALPINE_X86_64_LAVA_TRIGGER_TAG tag to rebuild the lava-trigger
container.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35961>
2025-07-17 13:16:56 +00:00
Vignesh Raman
c1898908a8 ci/lava: Move lava_job_submitter tests to lava folder
The `.gitlab-ci/tests/` directory contains LAVA-specific tests, not
general test code. To avoid confusion with `.gitlab-ci/test/`, move it
to `.gitlab-ci/lava/`.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35961>
2025-07-17 13:16:56 +00:00
Vignesh Raman
d67436c7ec ci/lava: make rootfs shell prompt configurable
Add support for setting rootfs shell prompt. This is optional and
defaults to "lava-shell:" if not specified.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35961>
2025-07-17 13:16:56 +00:00