From ee62a4c751ccc86d3a9e597e14586e3c2cb17e55 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Mon, 29 Aug 2022 10:22:31 +0200 Subject: [PATCH] v3dv: implement VK_EXT_texel_buffer_alignment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Alejandro PiƱeiro Part-of: --- docs/features.txt | 2 +- src/broadcom/vulkan/v3dv_device.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index 1a2bafbad43..a69aaedf7dd 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -491,7 +491,7 @@ Vulkan 1.3 -- all DONE: anv, radv, lvp VK_EXT_image_robustness DONE (anv, lvp, radv, tu, vn) VK_EXT_shader_demote_to_helper_invocation DONE (anv, lvp, radv, tu, vn) VK_EXT_subgroup_size_control DONE (anv, lvp, radv, tu) - VK_EXT_texel_buffer_alignment DONE (anv, lvp, radv, tu) + VK_EXT_texel_buffer_alignment DONE (anv, lvp, radv, tu, v3dv) Khronos extensions that are not part of any Vulkan version: diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 61c5a36fddd..91a9bca69da 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -176,6 +176,7 @@ get_device_extensions(const struct v3dv_physical_device *device, .EXT_private_data = true, .EXT_provoking_vertex = true, .EXT_separate_stencil_usage = true, + .EXT_texel_buffer_alignment = true, .EXT_vertex_attribute_divisor = true, #ifdef ANDROID .ANDROID_native_buffer = true, @@ -1328,6 +1329,13 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXEL_BUFFER_ALIGNMENT_FEATURES_EXT: { + VkPhysicalDeviceTexelBufferAlignmentFeaturesEXT *features = + (void *) ext; + features->texelBufferAlignment = true; + break; + } + default: v3dv_debug_ignored_stype(ext->sType); break; @@ -1715,6 +1723,15 @@ 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; + } default: v3dv_debug_ignored_stype(ext->sType); break;