move compute reset to EndComputePass

pull/50/head
cosmonaut 2024-02-16 15:57:41 -08:00
parent 35d90f8dcb
commit 4ed50a96c9
1 changed files with 13 additions and 13 deletions

View File

@ -5178,19 +5178,6 @@ static void VULKAN_INTERNAL_EndCommandBuffer(
) { ) {
VkResult result; VkResult result;
/* Compute pipelines are not explicitly unbound so we have to clean up here */
if ( commandBuffer->computeUniformBuffer != renderer->dummyComputeUniformBuffer &&
commandBuffer->computeUniformBuffer != NULL
) {
VULKAN_INTERNAL_BindUniformBuffer(
renderer,
commandBuffer,
commandBuffer->computeUniformBuffer
);
}
commandBuffer->computeUniformBuffer = NULL;
commandBuffer->currentComputePipeline = NULL;
result = renderer->vkEndCommandBuffer( result = renderer->vkEndCommandBuffer(
commandBuffer->commandBuffer commandBuffer->commandBuffer
); );
@ -8704,6 +8691,19 @@ static void VULKAN_EndComputePass(
); );
} }
} }
if ( vulkanCommandBuffer->computeUniformBuffer != renderer->dummyComputeUniformBuffer &&
vulkanCommandBuffer->computeUniformBuffer != NULL)
{
VULKAN_INTERNAL_BindUniformBuffer(
renderer,
vulkanCommandBuffer,
vulkanCommandBuffer->computeUniformBuffer
);
}
vulkanCommandBuffer->computeUniformBuffer = NULL;
vulkanCommandBuffer->currentComputePipeline = NULL;
} }
static void* VULKAN_MapCpuBuffer( static void* VULKAN_MapCpuBuffer(