Mesa (main): turnip: Depth/stencil formats should not expose any bufferFeatures

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 9 20:41:44 UTC 2022


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

Author: Danylo Piliaiev <dpiliaiev at igalia.com>
Date:   Tue Feb  8 13:11:34 2022 +0200

turnip: Depth/stencil formats should not expose any bufferFeatures

>From the Vulkan 1.3.205 spec, section 19.3 "43.3. Required Format Support":

   Mandatory format support: depth/stencil with VkImageType
   VK_IMAGE_TYPE_2D
   [...]
   bufferFeatures must not support any features for these formats

See https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/4849

Fixes CTS tests: dEQP-VK.api.buffer.invalid_buffer_features.*

Signed-off-by: Danylo Piliaiev <dpiliaiev at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14927>

---

 src/freedreno/ci/freedreno-a618-fails.txt |  8 --------
 src/freedreno/ci/freedreno-a630-fails.txt |  6 ------
 src/freedreno/vulkan/tu_formats.c         | 10 ++++++++++
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/src/freedreno/ci/freedreno-a618-fails.txt b/src/freedreno/ci/freedreno-a618-fails.txt
index 4fcc40a2ac0..b279b89beeb 100644
--- a/src/freedreno/ci/freedreno-a618-fails.txt
+++ b/src/freedreno/ci/freedreno-a618-fails.txt
@@ -9,17 +9,9 @@ dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat4,Fail
 dEQP-VK.subgroups.multiple_dispatches.uniform_subgroup_size,Fail
 
 # CTS 1.3.1.0 uprev:
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d16_unorm,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d24_unorm_s8_uint,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d32_sfloat_s8_uint,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d32_sfloat,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_s8_uint,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_x8_d24_unorm_pack32,Fail
 dEQP-VK.image.sample_texture.128_bit_compressed_format_cubemap,Fail
 dEQP-VK.image.sample_texture.64_bit_compressed_format_cubemap,Fail
 
-gmem-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d16_unorm,Fail
-gmem-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_s8_uint,Fail
 spill-dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies,Fail
 
 # Fails when TU_DEBUG=forcebin is set
diff --git a/src/freedreno/ci/freedreno-a630-fails.txt b/src/freedreno/ci/freedreno-a630-fails.txt
index aad7899bb5e..dd2f2ce38a6 100644
--- a/src/freedreno/ci/freedreno-a630-fails.txt
+++ b/src/freedreno/ci/freedreno-a630-fails.txt
@@ -44,12 +44,6 @@ dEQP-VK.glsl.builtin.precision_fp16_storage16b.inverse.compute.mat4,Fail
 dEQP-VK.subgroups.multiple_dispatches.uniform_subgroup_size,Fail
 
 # Showed up with VK-GL-CTS 1.3.1.0:
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d32_sfloat,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_s8_uint,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_x8_d24_unorm_pack32,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d16_unorm,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d24_unorm_s8_uint,Fail
-dEQP-VK.api.buffer.invalid_buffer_features.vk_format_d32_sfloat_s8_uint,Fail
 spill-dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies,Fail
 
 # Fails when TU_DEBUG=forcebin is set
diff --git a/src/freedreno/vulkan/tu_formats.c b/src/freedreno/vulkan/tu_formats.c
index 91b5023fe0f..4ebc8ebcd5e 100644
--- a/src/freedreno/vulkan/tu_formats.c
+++ b/src/freedreno/vulkan/tu_formats.c
@@ -274,6 +274,16 @@ tu_physical_device_get_format_properties(
       buffer = 0;
    }
 
+   /* From the Vulkan 1.3.205 spec, section 19.3 "43.3. Required Format Support":
+    *
+    *    Mandatory format support: depth/stencil with VkImageType
+    *    VK_IMAGE_TYPE_2D
+    *    [...]
+    *    bufferFeatures must not support any features for these formats
+    */
+   if (vk_format_is_depth_or_stencil(vk_format))
+      buffer = 0;
+
    /* D32_SFLOAT_S8_UINT is tiled as two images, so no linear format
     * blob enables some linear features, but its not useful, so don't bother.
     */



More information about the mesa-commit mailing list