Mesa (main): tu: Implement VK_EXT_image_2d_view_of_3d

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 15:35:20 UTC 2022


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

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Wed Jun  1 05:56:06 2022 +0200

tu: Implement VK_EXT_image_2d_view_of_3d

This is already allowed by the gallium driver, which uses the same code
for image layout and image views, so everything Just Works and the tests
pass. radv doesn't enable the sampler feature, but I don't see any
reason it wouldn't work and the tests pass.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16806>

---

 docs/features.txt                | 2 +-
 src/freedreno/vulkan/tu_device.c | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/docs/features.txt b/docs/features.txt
index 3fb31f1580e..9aef35cf66f 100644
--- a/docs/features.txt
+++ b/docs/features.txt
@@ -548,7 +548,7 @@ Khronos extensions that are not part of any Vulkan version:
   VK_EXT_global_priority                                DONE (anv, radv)
   VK_EXT_global_priority_query                          DONE (radv)
   VK_EXT_graphics_pipeline_library                      DONE (lvp)
-  VK_EXT_image_2d_view_of_3d                            DONE (anv, lvp)
+  VK_EXT_image_2d_view_of_3d                            DONE (anv, tu, lvp)
   VK_EXT_image_drm_format_modifier                      DONE (anv, radv/gfx9+, tu, v3dv, vn)
   VK_EXT_image_view_min_lod                             DONE (radv, tu)
   VK_EXT_index_type_uint8                               DONE (anv, lvp, radv/gfx8+, v3dv, tu)
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index e2edc972907..803b66f999d 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -230,6 +230,7 @@ get_device_extensions(const struct tu_physical_device *device,
 #endif
       .IMG_filter_cubic = device->info->a6xx.has_tex_filter_cubic,
       .VALVE_mutable_descriptor_type = true,
+      .EXT_image_2d_view_of_3d = true,
    };
 }
 
@@ -875,6 +876,13 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
          features->minLod = true;
          break;
       }
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: {
+         VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *features =
+            (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)ext;
+         features->image2DViewOf3D = true;
+         features->sampler2DViewOf3D = true;
+         break;
+      }
 
       default:
          break;



More information about the mesa-commit mailing list