From a238eac75b8fc3d35d70713a476c4459417fcd13 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 17 Aug 2023 12:52:30 +0900 Subject: [PATCH] [vulkan] Ensure the barriers array is initialized I'm not sure what's up, but arm gcc thinks the array isn't properly initialized even though x86_64 gcc does. Maybe something with padding. At least c23 makes it easy to 0-initialize VLAs. --- libs/video/renderer/vulkan/staging.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/video/renderer/vulkan/staging.c b/libs/video/renderer/vulkan/staging.c index af15a2b80..8329dd9fa 100644 --- a/libs/video/renderer/vulkan/staging.c +++ b/libs/video/renderer/vulkan/staging.c @@ -325,7 +325,7 @@ QFV_PacketScatterBuffer (qfv_packet_t *packet, VkBuffer dstBuffer, qfv_devfuncs_t *dfunc = packet->stage->device->funcs; qfv_bufferbarrier_t bb = bufferBarriers[qfv_BB_Unknown_to_TransferWrite]; VkBufferCopy copy_regions[count]; - VkBufferMemoryBarrier barriers[count]; + VkBufferMemoryBarrier barriers[count] = {};//FIXME arm gcc sees as uninit for (uint32_t i = 0; i < count; i++) { barriers[i] = bb.barrier; barriers[i].buffer = dstBuffer;