Faith Ekstrand
650debdf40
anv: Stop picking our own blit queue
...
This reverts commit 1f0fdcb619 ("anv: always pick graphics queue to
execute prime blits on.") which was added to avoid prime blits on video
queues. However, this was fixed properly in d7938de8fe ("vulkan/wsi:
don't support present with queues where blit is unsupported") which
made us stop advertising presentation on video queues entirely. We no
longer need the code in ANV.
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:01 +00:00
Faith Ekstrand
4f56ff70ff
panvk: Use vk_drm_syncobj_copy_payloads
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:00 +00:00
Faith Ekstrand
eb421b6a9e
nvk: Use vk_drm_syncobj_copy_payloads
...
Acked-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:00 +00:00
Faith Ekstrand
e0c30b0fc2
anv,hasvk: Use vk_drm_syncobj_copy_payloads
...
Acked-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:00 +00:00
Faith Ekstrand
4827ba625d
vulkan/drm_syncobj: Add a vk_drm_syncobj_copy_payloads helper
...
This intentionally matches vk_device::copy_sync_payloads.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:00 +00:00
Faith Ekstrand
f4d00c1dbf
vulkan: Add a vk_device_copy_semaphore_payloads() helper
...
This acts as a vkQueueSubmit() except that it doesn't take any command
buffers or sparse binds and it doesn't act on a queue. Instead, it just
copies semaphore payloads around using a new copy_sync_payloads vfunc on
vk_device.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:00 +00:00
Faith Ekstrand
379cffc3bb
vulkan: Add a vk_sync_signal_unwrap() helper
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:05:00 +00:00
Faith Ekstrand
8cffa9a7fd
vulkan/queue: Move timeline point allocation to vk_queue_submit_final()
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:59 +00:00
Faith Ekstrand
3c7e973d40
vulkan: Add a vk_sync_wait_unwrap() helper
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:59 +00:00
Faith Ekstrand
b5045d6e42
vulkan/drm_syncobj: Implement signal/reset_many
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:58 +00:00
Faith Ekstrand
c203c5ba91
vulkan/sync: Add vk_sync_signal/reset_many()
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:57 +00:00
Faith Ekstrand
57368203a7
vulkan/sync: Make the can_wait_many() check faster
...
In the common case where drivers only support one sync type, we can make
this check a lot faster.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:57 +00:00
Faith Ekstrand
1f6209ba09
vulkan/drm_syncobj: Use SWAP() in vk_drm_syncobj_move()
...
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:56 +00:00
Faith Ekstrand
4a634a56bb
vulkan/sync: Return early in vk_sync_timeline_wait() if wait_value == 0
...
This is a trivial case so we don't even need to take the lock.
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36827 >
2025-08-22 23:04:56 +00:00
Jesse Natalie
415f4d7678
util: Disable inline asm for arm64 for MSVC
...
Fixes: b2761d14 ("util: Remove usage of USE_**_ASM macros")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36940 >
2025-08-22 22:33:50 +00:00
Jesse Natalie
5b3756f231
nir: Add missing #include for c99_alloca.h
...
Fixes: 3dd9a978 ("nir: add new pass nir_lower_io_indirect_loads")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36940 >
2025-08-22 22:33:50 +00:00
Yiwei Zhang
b76c556c59
panvk: support VK_ANDROID_external_memory_android_hardware_buffer
...
This last piece hooks up:
- GetPhysicalDeviceImageFormatProperties2
- GetPhysicalDeviceExternalBufferProperties
- GetImageMemoryRequirements2
Test:
- dEQP-VK.api.external.memory.android_hardware_buffer.*
- CtsNativeHardwareTestCases via ANGLE
- Android HWUI and SurfaceFlinger via skiavk (entirely AHB based)
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:12 +00:00
Yiwei Zhang
66bbd9eec8
panvk: implement AHB image deferred init and memory alloc
...
Implement as a layer on top, and can be resilient to core panvk changes
later. e.g. more and strict memory types, need dedicated info, etc.
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:12 +00:00
Yiwei Zhang
33ab9d8320
panvk: add shared image support and advertise VK_ANDROID_native_buffer
...
Now we have:
1. baseline ANB (pre ANB spec v8)
- basic vulkan wsi on Android
2. aliased ANB (ANB spec v8+)
- required for swapchain maintenance1 support, and is used by ANGLE
on Android for smooth swapchain recreation.
3. ANB shared image
- required for KHR_shared_presentable_image support.
Test:
- dEQP-VK.wsi.android.*
- dEQP-EGL.* via ANGLE
- CtsGraphicsTestCases via ANGLE
- CtsOpenGLTestCases via ANGLE
- Instagram via ANGLE
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:12 +00:00
Yiwei Zhang
8aa2f1a94f
panvk: add panvk_android_get_wsi_memory for AHB spec v8+
...
Android Vulkan loader relies on aliased ANB image support to advertise
KHR_swapchain spec v69+. This change adds panvk_android_get_wsi_memory
helper based on deep copied (and sanitized) image create info to perform
deferred image initialization and ANB memory alloc.
Also we switch to use VK_USE_PLATFORM_ANDROID_KHR instead.
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:12 +00:00
Yiwei Zhang
2f54020f29
panvk: ensure wsi memory is bound at offset 0
...
No apps or tests have hit the spec corner case yet, but in theory they
could pass invalid offset and expect the impl to ignore it for wsi alias
binding. This change ensures the offset is zero, which aligns with
common wsi side binding as well as obeying the dedicated allocation
requirement.
Fixes: 187956bd51 ("panvk: adopt wsi_common_get_memory")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:11 +00:00
Yiwei Zhang
075d78115e
panvk: implement deferred image creation
...
Implemented in the way without leaking concerns. The container
panvk_android_deferred_image will be freed up upon panvk_DestroyImage
with the strictly paired allocator obeying the spec.
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:11 +00:00
Yiwei Zhang
752ea7f6df
panvk: resolve ANB (pre spec v8)
...
Before ANB spec v8, all ANB images are created and fully initialized
upon panvk_CreateImage.
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:10 +00:00
Yiwei Zhang
63db388543
panvk: stub out Android ANB and AHB image handling
...
ANB and AHB image handling will be implemented on top of
VK_EXT_image_drm_format_modifier impl. To be specific, they will be
resolved to VkImageDrmFormatModifierExplicitCreateInfoEXT when the
backing gralloc image is available:
- ANB: upon ANB image creation
- ANB alias: upon binding image to memory
- AHB: upon dedicated memory import
So for ANB alias and AHB, the initial VkImage creation only needs to
allocate the image object while the create info has to be deferred till
later to help with actual image layouting.
Acked-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36603 >
2025-08-22 21:39:10 +00:00
Mel Henning
b5973bed78
zink: Add zink_check_requirements
...
This is a new tool that checks a driver against the vulkan profile and
complains about any missing features.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36061 >
2025-08-22 16:08:11 -04:00
Mel Henning
9d295f4e21
zink: Convert profile tabs to spaces
...
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36061 >
2025-08-22 15:17:51 -04:00
Mel Henning
acc6bae2a4
zink: Fix a few profile errors
...
Fixes some errors that gen_profiles_solution.py throws related to missing
extensions or incorrect api versions.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36061 >
2025-08-22 15:17:51 -04:00
Martin Krastev
76670f13da
Revert "ci: Disable vmware farm"
...
This reverts commit 7939e43cc8 .
Farm host experienced a power outage. Power restored.
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36935 >
2025-08-22 17:19:58 +00:00
Tapani Pälli
e09b4ff65e
iris: remove stage_from_pipe and pipe_from_stage helpers
...
Both simply take mesa_shader_stage and return it, pipe_shader_type was
renamed to mesa_shader_stage by f972e76148 .
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36918 >
2025-08-22 17:04:50 +00:00
Jose Maria Casanova Crespo
ecf8aa2700
vc4/simulator: avoid free simulator memory on destroy
...
The vc4 simulator only allows the memory to be initialized
once, as it would assert if simpenrose_init_hardware_supply_mem
is called twice.
So if a screen_create is called after all previous screens have been
destroyed this raises the assertion, and this happens with CTS
when using a surfaceless target.
To avoid the simulator assertion, we need to guarantee that
simpenrose_init_hardware_supply_mem is only called once
so we never can free the supplied memory to the simulator on
the screen_destroy of the last screen using the simulator.
It can be assumed that the simulator memory will be freed at
the end of the program execution.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36899 >
2025-08-22 16:50:12 +00:00
Jose Maria Casanova Crespo
99a5006a38
vc4/simulator: pass and return sim_file on vc4_simulator init/destroy
...
Just for being more homogeneous with v3d simulator.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36899 >
2025-08-22 16:50:12 +00:00
Autumn Ashton
ae6ea69c85
radv: Implement VK_KHR_video_encode_quantization_map
...
Implement VK_KHR_video_encode_quantization_map on < VCN5.
Passes CTS for `*quantization_map*`.
Signed-off-by: Autumn Ashton <misyl@froggi.es >
Reviewed-by: David Rosca <david.rosca@amd.com >
Closes : #13717
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36797 >
2025-08-22 16:31:59 +00:00
Gurchetan Singh
11a6a49534
vulkan: #if DETECT_OS_ANDROID --> #if defined(VK_USE_PLATFORM_ANDROID_KHR)
...
The use of the bionic toolchain (DETECT_OS_ANDROID) does not mean
that the typical set of Android libraries (nativewindow, gralloc)
are used on the system.
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36829 >
2025-08-22 16:09:38 +00:00
Rhys Perry
2d597b6919
nir/load_store_vectorize: use nir_def_num_lsb_zero in calc_alignment
...
fossil-db (gfx1201):
Totals from 20 (0.03% of 79839) affected shaders:
Instrs: 15370 -> 15251 (-0.77%)
CodeSize: 89764 -> 88952 (-0.90%)
Latency: 150295 -> 149963 (-0.22%)
InvThroughput: 210291 -> 210105 (-0.09%)
Copies: 1337 -> 1320 (-1.27%)
PreVGPRs: 589 -> 590 (+0.17%)
VALU: 7519 -> 7466 (-0.70%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
b03eeb12a9
nir/load_store_vectorize: use nir_def_num_lsb_zero in check_for_robustness
...
fossil-db (gfx1201):
Totals from 499 (0.63% of 79839) affected shaders:
MaxWaves: 14276 -> 14234 (-0.29%)
Instrs: 520883 -> 508159 (-2.44%); split: -2.45%, +0.01%
CodeSize: 2831220 -> 2731080 (-3.54%); split: -3.54%, +0.00%
VGPRs: 27156 -> 27348 (+0.71%)
SpillSGPRs: 360 -> 390 (+8.33%)
Latency: 4473898 -> 4414552 (-1.33%); split: -1.54%, +0.21%
InvThroughput: 494468 -> 493508 (-0.19%); split: -0.62%, +0.43%
VClause: 14211 -> 14060 (-1.06%); split: -1.16%, +0.10%
SClause: 14653 -> 14354 (-2.04%); split: -2.39%, +0.35%
Copies: 36772 -> 37056 (+0.77%); split: -0.65%, +1.42%
Branches: 11502 -> 11486 (-0.14%)
PreSGPRs: 22605 -> 22848 (+1.07%); split: -0.39%, +1.47%
PreVGPRs: 20571 -> 20833 (+1.27%)
VALU: 242982 -> 243151 (+0.07%); split: -0.08%, +0.14%
SALU: 91332 -> 88069 (-3.57%); split: -3.71%, +0.14%
VMEM: 32275 -> 29137 (-9.72%)
SMEM: 26239 -> 22400 (-14.63%)
VOPD: 345 -> 330 (-4.35%)
SClause: 14646 -> 14347 (-2.04%); split: -2.39%, +0.35%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
46da666205
nir/algebraic: allow non-const for iand(iadd()) -> iadd(iand())
...
fossil-db (gfx1201):
Totals from 596 (0.75% of 79839) affected shaders:
Instrs: 691926 -> 691819 (-0.02%); split: -0.11%, +0.09%
CodeSize: 3675216 -> 3675180 (-0.00%); split: -0.08%, +0.08%
VGPRs: 37464 -> 37452 (-0.03%)
Latency: 8566849 -> 8563162 (-0.04%); split: -0.09%, +0.05%
InvThroughput: 1068038 -> 1063279 (-0.45%); split: -0.46%, +0.01%
VClause: 17859 -> 17897 (+0.21%); split: -0.01%, +0.22%
SClause: 16704 -> 16735 (+0.19%); split: -0.07%, +0.26%
Copies: 45422 -> 45395 (-0.06%); split: -0.15%, +0.09%
PreSGPRs: 24345 -> 24351 (+0.02%)
PreVGPRs: 29121 -> 29128 (+0.02%)
VALU: 349959 -> 348117 (-0.53%); split: -0.54%, +0.01%
SALU: 105926 -> 107576 (+1.56%); split: -0.02%, +1.58%
VOPD: 252 -> 234 (-7.14%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
4f83059ac5
nir/algebraic: improve is_unsigned_multiple_of_4 and use it more
...
fossil-db (gfx1201):
Totals from 160 (0.20% of 79839) affected shaders:
MaxWaves: 4008 -> 3952 (-1.40%)
Instrs: 390073 -> 379834 (-2.62%); split: -2.63%, +0.00%
CodeSize: 2126020 -> 2053740 (-3.40%); split: -3.40%, +0.00%
VGPRs: 9492 -> 9612 (+1.26%)
Latency: 6746019 -> 6723893 (-0.33%); split: -0.33%, +0.00%
InvThroughput: 849571 -> 848942 (-0.07%); split: -0.42%, +0.35%
VClause: 11977 -> 11983 (+0.05%); split: -0.20%, +0.25%
SClause: 11828 -> 11824 (-0.03%); split: -0.14%, +0.11%
Copies: 30003 -> 30938 (+3.12%); split: -0.09%, +3.20%
PreSGPRs: 8914 -> 8938 (+0.27%)
PreVGPRs: 7352 -> 7514 (+2.20%); split: -0.04%, +2.24%
VALU: 171829 -> 168829 (-1.75%); split: -1.76%, +0.01%
SALU: 66503 -> 66543 (+0.06%); split: -0.01%, +0.07%
VMEM: 29365 -> 25327 (-13.75%)
VOPD: 864 -> 1013 (+17.25%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
09ab7ff01e
nir: add nir_def_num_lsb_zero
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
51dd513789
nir/search: reorder match_value to check constants first
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
84fe10f939
nir/search: don't clear empty hash tables
...
_mesa_hash_table_clear() memsets the entries, even if it's already empty.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Rhys Perry
2a12624532
nir/search: add nir_search_state
...
A future commit will add another hash table.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36760 >
2025-08-22 15:45:55 +00:00
Daniel Schürmann
219c53e6fc
aco/ra: don't clear lateKill operands in get_reg_create_vector()
...
Fixes: 08f088479a ('aco/ra: set late-kill for operands of temporary p_create_vector')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36871 >
2025-08-22 15:25:04 +00:00
Robert Mader
25fe82630a
gallium: Set and count all extra samplers
...
After the commit mentioned below the `extra` variable only holds the
last added extra sampler. For 3-plane formats this results in one extra
sampler being leaked.
Add the bits for each extra sampler instead.
Fixes: abcd02a07d (gallium: Properly handle non-contiguous used sampler view indexes)
Signed-off-by: Robert Mader <robert.mader@collabora.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Matthias Reichl <hias@horus.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36870 >
2025-08-22 14:20:11 +00:00
Georg Lehmann
996c07353b
nir/shrink_vec_array_vars: use range analysis for non constant indices
...
Foz-DB Navi21:
Totals from 84 (0.10% of 80255) affected shaders:
MaxWaves: 1700 -> 1806 (+6.24%); split: +6.59%, -0.35%
Instrs: 90479 -> 91278 (+0.88%); split: -0.15%, +1.04%
CodeSize: 499644 -> 504572 (+0.99%); split: -0.10%, +1.08%
VGPRs: 5400 -> 4912 (-9.04%); split: -9.93%, +0.89%
LDS: 292864 -> 152064 (-48.08%)
Latency: 2001405 -> 2002335 (+0.05%); split: -0.01%, +0.06%
InvThroughput: 545293 -> 543073 (-0.41%); split: -0.52%, +0.11%
VClause: 1510 -> 1508 (-0.13%)
SClause: 2096 -> 2097 (+0.05%); split: -0.05%, +0.10%
Copies: 6373 -> 6431 (+0.91%); split: -0.64%, +1.55%
Branches: 1648 -> 1686 (+2.31%); split: -0.36%, +2.67%
PreVGPRs: 3918 -> 3960 (+1.07%); split: -0.03%, +1.10%
VALU: 67591 -> 68107 (+0.76%); split: -0.14%, +0.90%
SALU: 8352 -> 8490 (+1.65%); split: -0.25%, +1.90%
VMEM: 2685 -> 2683 (-0.07%)
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26388 >
2025-08-22 13:47:47 +00:00
Georg Lehmann
8360c3e81c
radv: shrink shared arrays
...
Foz-DB Navi21:
Totals from 2 (0.00% of 80255) affected shaders:
No stat changes.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26388 >
2025-08-22 13:47:47 +00:00
Georg Lehmann
c7df3b4f64
nir/shrink_vec_array_vars: allow nir_var_mem_shared
...
This should just work.
Acked-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26388 >
2025-08-22 13:47:47 +00:00
Rhys Perry
2b5681f257
nir/opt_load_skip_helpers: always require helpers for handles
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36850 >
2025-08-22 13:15:05 +00:00
Rhys Perry
81dd60df95
nir/opt_load_skip_helpers: move divergence check earlier
...
This should fix a hypothetical issue such as:
address = load_global()
value = load_global(address, access=uses-smem)
where divergence analysis can't prove that 'address' is uniform, but can
prove that 'value' is uniform.
We might then add both load_global to the load_worklist, but only disable
helpers for the first because the second is uniform, making 'address'
divergent for real and potentially incorrect when used with
v_readfirstlane_b32.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36850 >
2025-08-22 13:15:05 +00:00
Rhys Perry
354df09c88
nir: add global_amd to nir_get_io_offset_src/nir_get_io_index_src
...
This is needed for nir_opt_load_skip_helpers.
fossil-db (gfx1201):
Totals from 5 (0.01% of 79839) affected shaders:
Instrs: 2288 -> 2286 (-0.09%); split: -0.13%, +0.04%
CodeSize: 12372 -> 12364 (-0.06%); split: -0.10%, +0.03%
Latency: 18378 -> 20044 (+9.07%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Fixes: 883b1ca364 ("aco: disable wqm for tex loads when not needed")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36850 >
2025-08-22 13:15:04 +00:00
David Rosca
8ac9a9afee
radv/video: Disable H264 encode 8x8 transform when CABAC is disabled
...
VCN5 only supports it with CABAC enabled.
Fixes: 960f63596f ("radv/video: Add VCN5 encode support")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36881 >
2025-08-22 12:38:23 +00:00