Mesa (main): anv: expose VK_EXT_image_2d_view_of_3d

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 5 20:59:11 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Apr  5 08:40:34 2022 -0400

anv: expose VK_EXT_image_2d_view_of_3d

sampling only available on gen9+

Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15754>

---

 src/intel/vulkan/anv_device.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 6ff64130d94..f643c46adce 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -273,6 +273,7 @@ get_device_extensions(const struct anv_physical_device *device,
       .EXT_global_priority_query             = device->max_context_priority >=
                                                INTEL_CONTEXT_MEDIUM_PRIORITY,
       .EXT_host_query_reset                  = true,
+      .EXT_image_2d_view_of_3d               = true,
       .EXT_image_robustness                  = true,
       .EXT_image_drm_format_modifier         = true,
       .EXT_index_type_uint8                  = true,
@@ -1506,6 +1507,14 @@ void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_2D_VIEW_OF_3D_FEATURES_EXT: {
+         VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *features =
+            (VkPhysicalDeviceImage2DViewOf3DFeaturesEXT *)ext;
+         features->image2DViewOf3D = true;
+         features->sampler2DViewOf3D = pdevice->info.ver >= 9;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: {
          VkPhysicalDeviceComputeShaderDerivativesFeaturesNV *features =
             (VkPhysicalDeviceComputeShaderDerivativesFeaturesNV *)ext;



More information about the mesa-commit mailing list