From aaf29ade1ca59120abb94591ff261f3673879ed9 Mon Sep 17 00:00:00 2001 From: John Anthony Date: Sat, 24 May 2025 12:08:22 +0200 Subject: [PATCH] panvk: Enable VK_ARM_shader_core_properties The extension allows returning 0 if a given rate is unknown, which allows us to support this on all GPUs, but since the extension depends on Vulkan 1.1, we only expose it on v10+ for now. Acked-by: Erik Faye-Lund Reviewed-by: Lars-Ivar Hesselberg Simonsen Reviewed-by: Boris Brezillon Part-of: --- docs/features.txt | 1 + docs/relnotes/new_features.txt | 1 + src/panfrost/vulkan/panvk_vX_physical_device.c | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/docs/features.txt b/docs/features.txt index 24a9882857d..975e9ff6e66 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -695,6 +695,7 @@ Khronos extensions that are not part of any Vulkan version: VK_AMD_shader_trinary_minmax DONE (radv) VK_AMD_texture_gather_bias_lod DONE (anv, radv) VK_ARM_rasterization_order_attachment_access DONE (lvp, tu, vn) + VK_ARM_shader_core_properties DONE (panvk/v10+) VK_EXT_mutable_descriptor_type DONE (anv, hk, lvp, nvk, radv, tu, vn) VK_EXT_swapchain_colorspace DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn) VK_EXT_depth_clamp_zero_one DONE (anv, nvk, panvk, radv, tu, v3dv/vc7+, vn) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 21a11de6e07..a9c860b92e1 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -62,3 +62,4 @@ CL_UNORM_INT_101010_2 and cl_ext_image_unorm_int_2_101010 timestamps on panvk/v10+ VK_KHR_calibrated_timestamps on panvk/v10+ VK_EXT_non_seamless_cube_map on panvk +VK_ARM_shader_core_properties on panvk/v10+ diff --git a/src/panfrost/vulkan/panvk_vX_physical_device.c b/src/panfrost/vulkan/panvk_vX_physical_device.c index 6c2c45a621b..bbb03e3ce76 100644 --- a/src/panfrost/vulkan/panvk_vX_physical_device.c +++ b/src/panfrost/vulkan/panvk_vX_physical_device.c @@ -175,6 +175,8 @@ panvk_per_arch(get_physical_device_extensions)( .GOOGLE_decorate_string = true, .GOOGLE_hlsl_functionality1 = true, .GOOGLE_user_type = true, + + .ARM_shader_core_properties = has_vk1_1, }; } @@ -935,6 +937,11 @@ panvk_per_arch(get_physical_device_properties)( /* VK_KHR_push_descriptor */ .maxPushDescriptors = MAX_PUSH_DESCS, + + /* VK_ARM_shader_core_properties */ + .pixelRate = device->model->rates.pixel, + .texelRate = device->model->rates.texel, + .fmaRate = device->model->rates.fma, }; snprintf(properties->deviceName, sizeof(properties->deviceName), "%s",