radv: Expose 3d sparse images.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Sat, 20 Aug 2022 18:19:19 +0000 (20:19 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 6 Sep 2022 23:16:26 +0000 (23:16 +0000)
Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18165>

src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_formats.c
src/gallium/drivers/zink/ci/zink-radv-fails.txt

index e2a66da..c1dcedb 100644 (file)
@@ -1278,6 +1278,7 @@ radv_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDevice
       .sparseBinding = true,
       .sparseResidencyBuffer = pdevice->rad_info.family >= CHIP_POLARIS10,
       .sparseResidencyImage2D = pdevice->rad_info.family >= CHIP_POLARIS10,
+      .sparseResidencyImage3D = pdevice->rad_info.family >= CHIP_POLARIS10,
       .sparseResidencyAliased = pdevice->rad_info.family >= CHIP_POLARIS10,
       .variableMultisampleRate = true,
       .shaderResourceMinLod = true,
@@ -2012,6 +2013,7 @@ radv_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
          {
             .residencyNonResidentStrict = pdevice->rad_info.family >= CHIP_POLARIS10,
             .residencyStandard2DBlockShape = pdevice->rad_info.family >= CHIP_POLARIS10,
+            .residencyStandard3DBlockShape = pdevice->rad_info.gfx_level >= GFX9,
          },
    };
 
index dfca8d9..5251916 100644 (file)
@@ -1612,7 +1612,7 @@ radv_get_image_format_properties(struct radv_physical_device *physical_device,
       if (physical_device->rad_info.gfx_level < GFX8)
          goto unsupported;
 
-      if (vk_format_get_plane_count(format) > 1 || info->type != VK_IMAGE_TYPE_2D ||
+      if (vk_format_get_plane_count(format) > 1 || info->type == VK_IMAGE_TYPE_1D ||
           info->tiling != VK_IMAGE_TILING_OPTIMAL || vk_format_is_depth_or_stencil(format))
          goto unsupported;
    }
index ede8f36..08813fe 100644 (file)
@@ -1,8 +1,3 @@
-# 3D isn't supported by radv yet: #5822
-KHR-GL46.sparse_texture_tests.InternalFormatQueries,Fail
-KHR-GL46.sparse_texture_tests.SparseTextureAllocation,Fail
-KHR-GL46.sparse_texture_tests.SparseTextureCommitment,Fail
-
 dEQP-GLES3.functional.shaders.texture_functions.textureprojlodoffset.sampler2dshadow_vertex,Fail
 dEQP-GLES3.functional.shaders.texture_functions.textureprojoffset.sampler2dshadow_vertex,Fail