actually set pool sizez properly
This commit is contained in:
@@ -29,11 +29,11 @@ const char* *vkGetGryphnDeviceExtensions(uint32_t* outCount, VkPhysicalDevice de
|
||||
}
|
||||
free(vkExtensions);
|
||||
|
||||
// if (supportsDescriptorPoolOverallocation) {
|
||||
// count++;
|
||||
// extensiosns = realloc(extensiosns, sizeof(const char*) * count);
|
||||
// extensiosns[(count - 1)] = VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME;
|
||||
// }
|
||||
if (supportsDescriptorPoolOverallocation) {
|
||||
count++;
|
||||
extensiosns = realloc(extensiosns, sizeof(const char*) * count);
|
||||
extensiosns[(count - 1)] = VK_NV_DESCRIPTOR_POOL_OVERALLOCATION_EXTENSION_NAME;
|
||||
}
|
||||
|
||||
*outCount = count;
|
||||
|
||||
|
@@ -66,10 +66,23 @@ gnUniform* gnUniformPoolAllocateUniformsFn(gnUniformPool pool, gnUniformAllocati
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t count = 0;
|
||||
VkDescriptorPoolSize poolSizes[2] = {};
|
||||
|
||||
if (uniformBufferSize.descriptorCount > 0) {
|
||||
poolSizes[count] = uniformBufferSize;
|
||||
count++;
|
||||
}
|
||||
|
||||
if (imageSize.descriptorCount > 0) {
|
||||
poolSizes[count] = imageSize;
|
||||
count++;
|
||||
}
|
||||
|
||||
VkDescriptorPoolCreateInfo poolInfo = {
|
||||
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
|
||||
.poolSizeCount = 2,
|
||||
.pPoolSizes = (VkDescriptorPoolSize[]){ uniformBufferSize, imageSize },
|
||||
.poolSizeCount = count,
|
||||
.pPoolSizes = poolSizes,
|
||||
.maxSets = allocInfo.setCount
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user