reset uniform buffer offset when acquiring

submit_rewrite
cosmonaut 2022-01-12 22:47:04 -08:00
parent 62789005dd
commit 8e04b357db
1 changed files with 2 additions and 0 deletions

View File

@ -3527,6 +3527,8 @@ static VulkanUniformBuffer* VULKAN_INTERNAL_AcquireUniformBufferFromPool(
VulkanUniformBuffer *uniformBuffer = bufferPool->availableBuffers[bufferPool->availableBufferCount - 1]; VulkanUniformBuffer *uniformBuffer = bufferPool->availableBuffers[bufferPool->availableBufferCount - 1];
bufferPool->availableBufferCount -= 1; bufferPool->availableBufferCount -= 1;
uniformBuffer->offset = 0;
SDL_UnlockMutex(bufferPool->lock); SDL_UnlockMutex(bufferPool->lock);
return uniformBuffer; return uniformBuffer;
} }