rotate uniform buffer if we run out of space
parent
1eb749ed10
commit
38ff5af448
|
@ -3381,7 +3381,6 @@ static void VULKAN_INTERNAL_CreateUniformBuffer(
|
|||
writeDescriptorSet.pImageInfo = NULL;
|
||||
writeDescriptorSet.pTexelBufferView = NULL;
|
||||
|
||||
/* FIXME: this needs a lock */
|
||||
renderer->vkUpdateDescriptorSets(
|
||||
renderer->logicalDevice,
|
||||
1,
|
||||
|
@ -6900,9 +6899,13 @@ static uint32_t VULKAN_PushVertexShaderUniforms(
|
|||
graphicsPipeline->vertexUniformBlockSize >=
|
||||
UBO_BUFFER_SIZE
|
||||
) {
|
||||
/* FIXME: rotate another UBO in */
|
||||
Refresh_LogError("Vertex UBO overflow!");
|
||||
return 0;
|
||||
/* We're out of space in this buffer, bind the old one and acquire a new one */
|
||||
VULKAN_INTERNAL_BindUniformBuffer(vulkanCommandBuffer->vertexUniformBuffer);
|
||||
vulkanCommandBuffer->vertexUniformBuffer = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
|
||||
renderer,
|
||||
renderer->vertexUniformBufferPool,
|
||||
graphicsPipeline->vertexUniformBlockSize
|
||||
);
|
||||
}
|
||||
|
||||
offset = vulkanCommandBuffer->vertexUniformBuffer->offset;
|
||||
|
@ -6948,9 +6951,13 @@ static uint32_t VULKAN_PushFragmentShaderUniforms(
|
|||
graphicsPipeline->fragmentUniformBlockSize >=
|
||||
UBO_BUFFER_SIZE
|
||||
) {
|
||||
/* FIXME: rotate another UBO in */
|
||||
Refresh_LogError("Fragment UBO overflow!");
|
||||
return 0;
|
||||
/* We're out of space in this buffer, bind the old one and acquire a new one */
|
||||
VULKAN_INTERNAL_BindUniformBuffer(vulkanCommandBuffer->fragmentUniformBuffer);
|
||||
vulkanCommandBuffer->fragmentUniformBuffer = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
|
||||
renderer,
|
||||
renderer->fragmentUniformBufferPool,
|
||||
graphicsPipeline->fragmentUniformBlockSize
|
||||
);
|
||||
}
|
||||
|
||||
offset = vulkanCommandBuffer->fragmentUniformBuffer->offset;
|
||||
|
@ -6995,9 +7002,13 @@ static uint32_t VULKAN_PushComputeShaderUniforms(
|
|||
computePipeline->uniformBlockSize >=
|
||||
UBO_BUFFER_SIZE
|
||||
) {
|
||||
/* FIXME: rotate a new uniform buffer in */
|
||||
Refresh_LogError("Compute UBO overflow!");
|
||||
return 0;
|
||||
/* We're out of space in this buffer, bind the old one and acquire a new one */
|
||||
VULKAN_INTERNAL_BindUniformBuffer(vulkanCommandBuffer->computeUniformBuffer);
|
||||
vulkanCommandBuffer->computeUniformBuffer = VULKAN_INTERNAL_AcquireUniformBufferFromPool(
|
||||
renderer,
|
||||
renderer->computeUniformBufferPool,
|
||||
computePipeline->uniformBlockSize
|
||||
);
|
||||
}
|
||||
|
||||
offset = vulkanCommandBuffer->computeUniformBuffer->offset;
|
||||
|
|
Loading…
Reference in New Issue