Module: Mesa
Branch: main
Commit: 6e020dff99e5f3fd6e059d158c46e16dc69ecc3e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e020dff99e5f3fd6e059d158c46e16dc69ecc3e

Author: Bas Nieuwenhuizen <[email protected]>
Date:   Sat Aug 20 20:19:19 2022 +0200

radv: Expose 3d sparse images.

Tested-By: Mike Blumenkrantz <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18165>

---

 src/amd/vulkan/radv_device.c                    | 2 ++
 src/amd/vulkan/radv_formats.c                   | 2 +-
 src/gallium/drivers/zink/ci/zink-radv-fails.txt | 5 -----
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index e2a66da272e..c1dcedb5804 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -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,
          },
    };
 
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index dfca8d9e59c..5251916a488 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -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;
    }
diff --git a/src/gallium/drivers/zink/ci/zink-radv-fails.txt 
b/src/gallium/drivers/zink/ci/zink-radv-fails.txt
index ede8f3666eb..08813fe5498 100644
--- a/src/gallium/drivers/zink/ci/zink-radv-fails.txt
+++ b/src/gallium/drivers/zink/ci/zink-radv-fails.txt
@@ -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
 

Reply via email to