Properly size the set, so that no overrun happens.

This commit is contained in:
stolk
2020-02-04 11:36:13 -08:00
committed by Бранимир Караџић
parent 3002159da9
commit e7b8606146

View File

@@ -3651,8 +3651,9 @@ VK_IMPORT_DEVICE
VkDescriptorImageInfo imageInfo[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
VkDescriptorBufferInfo bufferInfo[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
VkWriteDescriptorSet wds[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS+2];
bx::memSet(wds, 0, sizeof(VkWriteDescriptorSet) * (BGFX_CONFIG_MAX_TEXTURE_SAMPLERS+2));
const int MAX_DESCRIPTOR_SETS = 2 * BGFX_CONFIG_MAX_TEXTURE_SAMPLERS + 2;
VkWriteDescriptorSet wds[MAX_DESCRIPTOR_SETS];
bx::memSet(wds, 0, sizeof(wds));
uint32_t wdsCount = 0;
uint32_t bufferCount = 0;
uint32_t imageCount = 0;