rename to MAX_UBO_SECTION_SIZE

pull/50/head
cosmonaut 2024-02-21 23:12:39 -08:00
parent 6674076423
commit 578ac3634d
1 changed files with 5 additions and 5 deletions

View File

@ -80,7 +80,7 @@ typedef struct VulkanExtensions
#define TRANSFER_BUFFER_STARTING_SIZE 8000000 /* 8MB */ #define TRANSFER_BUFFER_STARTING_SIZE 8000000 /* 8MB */
#define POOLED_TRANSFER_BUFFER_SIZE 16000000 /* 16MB */ #define POOLED_TRANSFER_BUFFER_SIZE 16000000 /* 16MB */
#define UBO_BUFFER_SIZE 16777216 /* 16MB */ #define UBO_BUFFER_SIZE 16777216 /* 16MB */
#define UBO_SECTION_SIZE 4096 /* 4KB */ #define MAX_UBO_SECTION_SIZE 4096 /* 4KB */
#define DESCRIPTOR_POOL_STARTING_SIZE 128 #define DESCRIPTOR_POOL_STARTING_SIZE 128
#define DEFRAG_TIME 200 #define DEFRAG_TIME 200
#define WINDOW_DATA "Refresh_VulkanWindowData" #define WINDOW_DATA "Refresh_VulkanWindowData"
@ -4347,7 +4347,7 @@ static VulkanUniformBufferObject* VULKAN_INTERNAL_CreateUniformBufferObject(
/* Update the descriptor set for the first and last time! */ /* Update the descriptor set for the first and last time! */
descriptorBufferInfo.buffer = uniformBufferObject->buffer->buffer; descriptorBufferInfo.buffer = uniformBufferObject->buffer->buffer;
descriptorBufferInfo.offset = 0; descriptorBufferInfo.offset = 0;
descriptorBufferInfo.range = UBO_SECTION_SIZE; descriptorBufferInfo.range = MAX_UBO_SECTION_SIZE;
writeDescriptorSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
writeDescriptorSet.pNext = NULL; writeDescriptorSet.pNext = NULL;
@ -6941,7 +6941,7 @@ static void VULKAN_PushVertexShaderUniforms(
SDL_LockMutex(renderer->vertexUniformBufferObject->lock); SDL_LockMutex(renderer->vertexUniformBufferObject->lock);
if (renderer->vertexUniformBufferObject->currentOffset + graphicsPipeline->vertexUniformBlockSize + UBO_SECTION_SIZE >= UBO_BUFFER_SIZE) if (renderer->vertexUniformBufferObject->currentOffset + graphicsPipeline->vertexUniformBlockSize + MAX_UBO_SECTION_SIZE >= UBO_BUFFER_SIZE)
{ {
renderer->vertexUniformBufferObject->currentOffset = 0; renderer->vertexUniformBufferObject->currentOffset = 0;
} }
@ -6971,7 +6971,7 @@ static void VULKAN_PushFragmentShaderUniforms(
SDL_LockMutex(renderer->fragmentUniformBufferObject->lock); SDL_LockMutex(renderer->fragmentUniformBufferObject->lock);
if (renderer->fragmentUniformBufferObject->currentOffset + graphicsPipeline->fragmentUniformBlockSize + UBO_SECTION_SIZE >= UBO_BUFFER_SIZE) if (renderer->fragmentUniformBufferObject->currentOffset + graphicsPipeline->fragmentUniformBlockSize + MAX_UBO_SECTION_SIZE >= UBO_BUFFER_SIZE)
{ {
renderer->fragmentUniformBufferObject->currentOffset = 0; renderer->fragmentUniformBufferObject->currentOffset = 0;
} }
@ -7001,7 +7001,7 @@ static void VULKAN_PushComputeShaderUniforms(
SDL_LockMutex(renderer->computeUniformBufferObject->lock); SDL_LockMutex(renderer->computeUniformBufferObject->lock);
if (renderer->computeUniformBufferObject->currentOffset + computePipeline->uniformBlockSize + UBO_SECTION_SIZE >= UBO_BUFFER_SIZE) if (renderer->computeUniformBufferObject->currentOffset + computePipeline->uniformBlockSize + MAX_UBO_SECTION_SIZE >= UBO_BUFFER_SIZE)
{ {
renderer->computeUniformBufferObject->currentOffset = 0; renderer->computeUniformBufferObject->currentOffset = 0;
} }