From 6333bf359bbe2ceaed7bfe16852cc970a028c4a6 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 5 Mar 2026 23:51:36 +0100 Subject: [PATCH] panvk: Advertise VK_KHR_shader_untyped_pointers on v9+ Enable the VK_KHR_shader_untyped_pointers extension and the shaderUntypedPointers feature for Valhall and newer (v9+). Bifrost (v6/v7) has issues with 8-bit vector loads through untyped pointers combined with 16-bit storage, so restrict the extension to architectures where it's fully functional. Signed-off-by: Christian Gmeiner Reviewed-by: Lars-Ivar Hesselberg Simonsen Part-of: --- docs/features.txt | 2 +- docs/relnotes/new_features.txt | 1 + src/panfrost/vulkan/panvk_vX_physical_device.c | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index 1fcc520ac9d..32692faff5d 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -583,7 +583,7 @@ Khronos extensions that are not part of any Vulkan version: VK_KHR_shader_relaxed_extended_instruction DONE (anv, hasvk, hk, kk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_subgroup_uniform_control_flow DONE (anv, hasvk, hk, kk, nvk, panvk/v10+, radv, tu, vn) VK_KHR_shader_quad_control DONE (anv, hk, lvp, nvk, panvk/v10+, radv, vn) - VK_KHR_shader_untyped_pointers DONE (anv, nvk, radv, vn) + VK_KHR_shader_untyped_pointers DONE (anv, nvk, panvk/v9+, radv, vn) VK_KHR_shared_presentable_image not started VK_KHR_surface DONE (anv, dzn, hasvk, hk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_surface_protected_capabilities DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 5e63d96dba8..e1f651e503c 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -40,3 +40,4 @@ VK_EXT_shader_atomic_float on panvk VK_KHR_device_address_commands on RADV VK_EXT_non_seamless_cube_map on pvr fragmentStoresAndAtomics on panvk/v6-7 +VK_KHR_shader_untyped_pointers on panvk diff --git a/src/panfrost/vulkan/panvk_vX_physical_device.c b/src/panfrost/vulkan/panvk_vX_physical_device.c index c257fe940d3..f5f59b85510 100644 --- a/src/panfrost/vulkan/panvk_vX_physical_device.c +++ b/src/panfrost/vulkan/panvk_vX_physical_device.c @@ -110,6 +110,7 @@ panvk_per_arch(get_physical_device_extensions)( .KHR_shader_subgroup_rotate = true, .KHR_shader_subgroup_uniform_control_flow = has_vk1_1, .KHR_shader_terminate_invocation = true, + .KHR_shader_untyped_pointers = PAN_ARCH >= 9, .KHR_spirv_1_4 = PAN_ARCH >= 10, .KHR_storage_buffer_storage_class = true, #ifdef PANVK_USE_WSI_PLATFORM @@ -555,6 +556,9 @@ panvk_per_arch(get_physical_device_features)( /* VK_KHR_shader_subgroup_uniform_control_flow */ .shaderSubgroupUniformControlFlow = true, + /* VK_KHR_shader_untyped_pointers */ + .shaderUntypedPointers = PAN_ARCH >= 9, + /* VK_EXT_shader_module_identifier */ .shaderModuleIdentifier = true,