From 8f0b3392c36a53cf0b6b472f22c47714d2b4b116 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Fri, 15 May 2020 11:48:00 +0100 Subject: [PATCH] Silence mulitple may be used uninitialized warnings in RenderingDeviceVulkan::uniform_set_create() --- drivers/vulkan/rendering_device_vulkan.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 71be891b1de..08865eef8c6 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -4500,6 +4500,12 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector &p_uniforms, write.pNext = nullptr; write.dstSet = VK_NULL_HANDLE; //will assign afterwards when everything is valid write.dstBinding = set_uniform.binding; + write.dstArrayElement = 0; + write.descriptorCount = 0; + write.descriptorType = VK_DESCRIPTOR_TYPE_MAX_ENUM; //Invalid value. + write.pImageInfo = nullptr; + write.pBufferInfo = nullptr; + write.pTexelBufferView = nullptr; uint32_t type_size = 1; switch (uniform.type) {