Mesa (main): anv: Implement VK_EXT_image_view_min_lod

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 31 14:11:28 UTC 2022


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Jul  6 10:59:49 2021 -0500

anv: Implement VK_EXT_image_view_min_lod

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14129>

---

 src/intel/vulkan/anv_device.c | 8 ++++++++
 src/intel/vulkan/anv_image.c  | 1 +
 2 files changed, 9 insertions(+)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 8dc893972e9..224fd655155 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -280,6 +280,7 @@ get_device_extensions(const struct anv_physical_device *device,
       .EXT_image_2d_view_of_3d               = true,
       .EXT_image_robustness                  = true,
       .EXT_image_drm_format_modifier         = true,
+      .EXT_image_view_min_lod                = true,
       .EXT_index_type_uint8                  = true,
       .EXT_inline_uniform_block              = true,
       .EXT_line_rasterization                = true,
@@ -1592,6 +1593,13 @@ void anv_GetPhysicalDeviceFeatures2(
          break;
       }
 
+      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_MIN_LOD_FEATURES_EXT: {
+         VkPhysicalDeviceImageViewMinLodFeaturesEXT *features =
+            (VkPhysicalDeviceImageViewMinLodFeaturesEXT *)ext;
+         features->minLod = true;
+         break;
+      }
+
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT: {
          VkPhysicalDeviceIndexTypeUint8FeaturesEXT *features =
             (VkPhysicalDeviceIndexTypeUint8FeaturesEXT *)ext;
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index d905784a73f..5a30f8e5aaa 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -2584,6 +2584,7 @@ anv_CreateImageView(VkDevice _device,
          .levels = iview->vk.level_count,
          .base_array_layer = iview->vk.base_array_layer,
          .array_len = iview->vk.layer_count,
+         .min_lod_clamp = iview->vk.min_lod,
          .swizzle = {
             .r = remap_swizzle(iview->vk.swizzle.r, format.swizzle),
             .g = remap_swizzle(iview->vk.swizzle.g, format.swizzle),



More information about the mesa-commit mailing list