From 3d04c435766a1dc4946a2c5276e0116a5fbb67cd Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 17 Mar 2022 13:21:38 +0100 Subject: [PATCH] tu: Trivially implement VK_EXT_texel_buffer_alignment The previous alignment of 64 bytes, which we got from the blob, indicates that single-texel alignment isn't supported. So just do a trivial no-op implementation that returns the same alignment as before. This matches what newer blobs that expose this extension do. Part-of: --- docs/features.txt | 2 +- src/freedreno/vulkan/tu_device.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/features.txt b/docs/features.txt index a07f7b10b70..cb85d6fd875 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -490,7 +490,7 @@ Vulkan 1.3 -- all DONE: anv, radv VK_EXT_image_robustness DONE (anv, radv, tu) VK_EXT_shader_demote_to_helper_invocation DONE (anv, radv, tu) VK_EXT_subgroup_size_control DONE (anv, radv, tu) - VK_EXT_texel_buffer_alignment DONE (anv, radv) + VK_EXT_texel_buffer_alignment DONE (anv, radv, tu) Khronos extensions that are not part of any Vulkan version: diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 9fd93276038..0788b2c9616 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -825,6 +825,12 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, features->depthClipControl = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: { + VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *features = + (VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *)ext; + features->texelBufferAlignment = true; + break; + } default: break; @@ -1020,10 +1026,9 @@ tu_get_physical_device_properties_1_3(struct tu_physical_device *pdevice, p->integerDotProductAccumulatingSaturating64BitSignedAccelerated = false; p->integerDotProductAccumulatingSaturating64BitMixedSignednessAccelerated = false; - /* VK_EXT_texel_buffer_alignment is not implemented */ - p->storageTexelBufferOffsetAlignmentBytes = 0; + p->storageTexelBufferOffsetAlignmentBytes = 64; p->storageTexelBufferOffsetSingleTexelAlignment = false; - p->uniformTexelBufferOffsetAlignmentBytes = 0; + p->uniformTexelBufferOffsetAlignmentBytes = 64; p->uniformTexelBufferOffsetSingleTexelAlignment = false; /* TODO: find out the limit */