From a338694c50f6796f78a8a819e65f87faaa87ba91 Mon Sep 17 00:00:00 2001 From: Caterina Shablia Date: Thu, 20 Nov 2025 17:41:55 +0100 Subject: [PATCH] panvk: report support for sparseResidencyImage2D Reviewed-by: Boris Brezillon Part-of: --- docs/relnotes/new_features.txt | 2 ++ src/panfrost/vulkan/panvk_vX_physical_device.c | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index afee361f87b..75ac1aa24d4 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -12,3 +12,5 @@ VK_EXT_device_memory_report on panvk VK_VALVE_video_encode_rgb_conversion on radv VK_EXT_custom_resolve on RADV GL_EXT_shader_pixel_local_storage on Panfrost v6+ +sparseResidencyImage2D on panvk v10+ +sparseResidencyStandard2DBlockShape on panvk v10+ diff --git a/src/panfrost/vulkan/panvk_vX_physical_device.c b/src/panfrost/vulkan/panvk_vX_physical_device.c index 25b7a460df1..198d383ee53 100644 --- a/src/panfrost/vulkan/panvk_vX_physical_device.c +++ b/src/panfrost/vulkan/panvk_vX_physical_device.c @@ -242,6 +242,8 @@ panvk_per_arch(get_physical_device_features)( const struct panvk_instance *instance, const struct panvk_physical_device *device, struct vk_features *features) { + bool has_sparse = PAN_ARCH >= 10; + *features = (struct vk_features){ /* Vulkan 1.0 */ .robustBufferAccess = true, @@ -293,15 +295,15 @@ panvk_per_arch(get_physical_device_features)( .shaderInt16 = true, .shaderResourceResidency = false, .shaderResourceMinLod = false, - .sparseBinding = PAN_ARCH >= 10, - .sparseResidencyBuffer = PAN_ARCH >= 10, - .sparseResidencyImage2D = false, - .sparseResidencyImage3D = false, + .sparseBinding = has_sparse, + .sparseResidencyBuffer = has_sparse, + .sparseResidencyImage2D = has_sparse, + .sparseResidencyImage3D = false, /* https://gitlab.freedesktop.org/panfrost/mesa/-/issues/242 */ .sparseResidency2Samples = false, .sparseResidency4Samples = false, .sparseResidency8Samples = false, .sparseResidency16Samples = false, - .sparseResidencyAliased = false, + .sparseResidencyAliased = false, /* https://gitlab.freedesktop.org/panfrost/mesa/-/issues/237 */ .variableMultisampleRate = false, .inheritedQueries = false, @@ -807,7 +809,7 @@ panvk_per_arch(get_physical_device_properties)( /* Vulkan 1.0 sparse properties */ .sparseResidencyNonResidentStrict = false, .sparseResidencyAlignedMipSize = false, - .sparseResidencyStandard2DBlockShape = false, + .sparseResidencyStandard2DBlockShape = true, .sparseResidencyStandard2DMultisampleBlockShape = false, .sparseResidencyStandard3DBlockShape = false,