v3dv: fix VK_EXT_texel_buffer_alignment
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 20 Sep 2022 08:48:19 +0000 (10:48 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 20 Sep 2022 12:52:31 +0000 (12:52 +0000)
This extension was promoted to Vulkan 1.3 so we should be setting its
properties directly in the VkPhysicalDeviceVulkan13Properties struct
which the common mesa code will use to populate outgoing properties.

Apparently, only the properties struct was promoted and not the features
struct.

Reviewed-by: Eric Engestrom <eric@igalia.com>
Tested-by: Eric Engestrom <eric@igalia.com>
Fixes: ee62a4c751c ('v3dv: implement VK_EXT_texel_buffer_alignment')
Fixes: dEQP-VK.api.info.get_physical_device_properties2.properties.basic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18697>

src/broadcom/vulkan/v3dv_device.c

index 4f9d5c8..c001046 100644 (file)
@@ -1621,6 +1621,10 @@ v3dv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
       .maxDescriptorSetUpdateAfterBindInlineUniformBlocks =
          MAX_INLINE_UNIFORM_BUFFERS,
       .maxBufferSize = V3D_MAX_BUFFER_RANGE,
+      .storageTexelBufferOffsetAlignmentBytes = V3D_TMU_TEXEL_ALIGN,
+      .storageTexelBufferOffsetSingleTexelAlignment = false,
+      .uniformTexelBufferOffsetAlignmentBytes = V3D_TMU_TEXEL_ALIGN,
+      .uniformTexelBufferOffsetSingleTexelAlignment = false,
    };
 
    VkPhysicalDeviceVulkan12Properties vk12 = {
@@ -1763,15 +1767,6 @@ v3dv_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
           * never provide this extension.
           */
          break;
-      case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_PROPERTIES_EXT: {
-         VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT *props =
-            (VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT *)ext;
-         props->storageTexelBufferOffsetAlignmentBytes = V3D_TMU_TEXEL_ALIGN;
-         props->storageTexelBufferOffsetSingleTexelAlignment = false;
-         props->uniformTexelBufferOffsetAlignmentBytes = V3D_TMU_TEXEL_ALIGN;
-         props->uniformTexelBufferOffsetSingleTexelAlignment = false;
-         break;
-      }
       case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MODULE_IDENTIFIER_PROPERTIES_EXT: {
          VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT *props =
             (VkPhysicalDeviceShaderModuleIdentifierPropertiesEXT *)ext;