diff mbox series

[FFmpeg-devel,4/5] vulkan: always enable GL_EXT_scalar_block_layout

Message ID 20240929094256.396352-4-dev@lynne.ee
State New
Headers show
Series [FFmpeg-devel,1/5] vulkan: merge FFVkSPIRVShader and FFVkPipeline into FFVkShader | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Lynne Sept. 29, 2024, 9:42 a.m. UTC
This makes std430 (which we use everywhere already) fully match C
layout.
Extension was made mandatory in 1.2.
---
 libavutil/hwcontext_vulkan.c | 1 +
 libavutil/vulkan.c           | 1 +
 2 files changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 6317ab7d0e..3a3aff75c0 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1501,6 +1501,7 @@  static int vulkan_device_create_internal(AVHWDeviceContext *ctx,
     p->device_features_1_1.uniformAndStorageBuffer16BitAccess = dev_features_1_1.uniformAndStorageBuffer16BitAccess;
 
     p->device_features_1_2.timelineSemaphore = 1;
+    p->device_features_1_2.scalarBlockLayout = dev_features_1_2.scalarBlockLayout;
     p->device_features_1_2.bufferDeviceAddress = dev_features_1_2.bufferDeviceAddress;
     p->device_features_1_2.hostQueryReset = dev_features_1_2.hostQueryReset;
     p->device_features_1_2.storagePushConstant8 = dev_features_1_2.storagePushConstant8;
diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c
index 8b1c1eb796..ab2519bf35 100644
--- a/libavutil/vulkan.c
+++ b/libavutil/vulkan.c
@@ -1473,6 +1473,7 @@  int ff_vk_shader_init(FFVulkanContext *s, FFVulkanShader *shd, const char *name,
     GLSLC(0,                                                                  );
 
     if (s->extensions & FF_VK_EXT_DESCRIPTOR_BUFFER) {
+        GLSLC(0, #extension GL_EXT_scalar_block_layout : require              );
         GLSLC(0, #extension GL_EXT_buffer_reference : require                 );
         GLSLC(0, #extension GL_EXT_buffer_reference2 : require                );
     }