summaryrefslogtreecommitdiff
path: root/src/freedreno/vulkan/tu_device.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2021-08-20 18:48:45 -0700
committerMarge Bot <eric+marge@anholt.net>2021-08-23 18:30:22 +0000
commitc600494a8e7056b45a9a01413437d12125589ae7 (patch)
tree45fc99bfb2859bd2cbec0996f242312524e7b67d /src/freedreno/vulkan/tu_device.c
parent07cd30ca293d1eb6980f69f330f9d182652cf902 (diff)
tu: Enable VK_KHR_uniform_buffer_standard_layout
This extension relaxes the alignment requirements to allow the GL std430 layout to be used. freedreno/ir3 already supports this (via PIPE_CAP_LOAD_CONSTBUF). Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12495>
Diffstat (limited to 'src/freedreno/vulkan/tu_device.c')
-rw-r--r--src/freedreno/vulkan/tu_device.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 9b136c75719..985447f3351 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -147,6 +147,7 @@ get_device_extensions(const struct tu_physical_device *device,
.KHR_spirv_1_4 = true,
.KHR_storage_buffer_storage_class = true,
.KHR_swapchain = TU_HAS_SURFACE,
+ .KHR_uniform_buffer_standard_layout = true,
.KHR_variable_pointers = true,
.KHR_vulkan_memory_model = true,
#ifndef TU_USE_KGSL
@@ -643,6 +644,12 @@ tu_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
features->vertexAttributeInstanceRateZeroDivisor = true;
break;
}
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_UNIFORM_BUFFER_STANDARD_LAYOUT_FEATURES_KHR: {
+ VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR *features =
+ (VkPhysicalDeviceUniformBufferStandardLayoutFeaturesKHR *)ext;
+ features->uniformBufferStandardLayout = true;
+ break;
+ }
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIVATE_DATA_FEATURES_EXT: {
VkPhysicalDevicePrivateDataFeaturesEXT *features =
(VkPhysicalDevicePrivateDataFeaturesEXT *)ext;