remove unused ubo management functions

pull/50/head
cosmonaut 2024-02-23 09:38:08 -08:00
parent 20c369845f
commit e5cd3c6fce
1 changed files with 0 additions and 41 deletions

View File

@ -748,21 +748,6 @@ typedef enum VulkanUniformBufferType
UNIFORM_BUFFER_COMPUTE UNIFORM_BUFFER_COMPUTE
} VulkanUniformBufferType; } VulkanUniformBufferType;
/* Yes, the pool is made of multiple pools.
* For some reason it was considered a good idea to make VkDescriptorPool fixed-size.
*/
typedef struct VulkanUniformDescriptorPool
{
VkDescriptorPool* descriptorPools;
uint32_t descriptorPoolCount;
/* Decremented whenever a descriptor set is allocated and
* incremented whenever a descriptor pool is allocated.
* This lets us keep track of when we need a new pool.
*/
uint32_t availableDescriptorSetCount;
} VulkanUniformDescriptorPool;
/* Uniform buffers are just one buffer that we carve slices out of. */ /* Uniform buffers are just one buffer that we carve slices out of. */
typedef struct VulkanUniformBufferObject typedef struct VulkanUniformBufferObject
{ {
@ -4260,32 +4245,6 @@ static VulkanBuffer* VULKAN_INTERNAL_CreateBuffer(
/* Uniform buffer functions */ /* Uniform buffer functions */
static uint8_t VULKAN_INTERNAL_AddUniformDescriptorPool(
VulkanRenderer *renderer,
VulkanUniformDescriptorPool *vulkanUniformDescriptorPool
) {
vulkanUniformDescriptorPool->descriptorPools = SDL_realloc(
vulkanUniformDescriptorPool->descriptorPools,
sizeof(VkDescriptorPool) * (vulkanUniformDescriptorPool->descriptorPoolCount + 1)
);
if (!VULKAN_INTERNAL_CreateDescriptorPool(
renderer,
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC,
DESCRIPTOR_POOL_STARTING_SIZE,
DESCRIPTOR_POOL_STARTING_SIZE,
&vulkanUniformDescriptorPool->descriptorPools[vulkanUniformDescriptorPool->descriptorPoolCount]
)) {
Refresh_LogError("Failed to create descriptor pool!");
return 0;
}
vulkanUniformDescriptorPool->descriptorPoolCount += 1;
vulkanUniformDescriptorPool->availableDescriptorSetCount += DESCRIPTOR_POOL_STARTING_SIZE;
return 1;
}
static VulkanUniformBufferObject* VULKAN_INTERNAL_CreateUniformBufferObject( static VulkanUniformBufferObject* VULKAN_INTERNAL_CreateUniformBufferObject(
VulkanRenderer *renderer, VulkanRenderer *renderer,
VulkanUniformBufferType uniformBufferType VulkanUniformBufferType uniformBufferType