Merge pull request #38750 from madmiraal/fix-vulkan-uninitialized-warning

Silence mulitple may be used uninitialized warnings in RenderingDeviceVulkan::uniform_set_create()
This commit is contained in:
Rémi Verschelde 2020-05-15 18:02:56 +02:00 committed by GitHub
commit 4f23215395
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4431,6 +4431,12 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &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) {