diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 92d8032..1083fb8 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -5178,19 +5178,6 @@ static void VULKAN_INTERNAL_EndCommandBuffer( ) { 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( 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(