From 578ac3634d9b3f812e9c9de5e21ad5c9628dac2a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 21 Feb 2024 23:12:39 -0800 Subject: [PATCH] rename to MAX_UBO_SECTION_SIZE --- src/Refresh_Driver_Vulkan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 7a8e6eb..aae3632 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -80,7 +80,7 @@ typedef struct VulkanExtensions #define TRANSFER_BUFFER_STARTING_SIZE 8000000 /* 8MB */ #define POOLED_TRANSFER_BUFFER_SIZE 16000000 /* 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 DEFRAG_TIME 200 #define WINDOW_DATA "Refresh_VulkanWindowData" @@ -4347,7 +4347,7 @@ static VulkanUniformBufferObject* VULKAN_INTERNAL_CreateUniformBufferObject( /* Update the descriptor set for the first and last time! */ descriptorBufferInfo.buffer = uniformBufferObject->buffer->buffer; descriptorBufferInfo.offset = 0; - descriptorBufferInfo.range = UBO_SECTION_SIZE; + descriptorBufferInfo.range = MAX_UBO_SECTION_SIZE; writeDescriptorSet.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSet.pNext = NULL; @@ -6941,7 +6941,7 @@ static void VULKAN_PushVertexShaderUniforms( 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; } @@ -6971,7 +6971,7 @@ static void VULKAN_PushFragmentShaderUniforms( 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; } @@ -7001,7 +7001,7 @@ static void VULKAN_PushComputeShaderUniforms( 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; }