Vulkan: Add profiler for Vulkan API CPU cost

Disabled by default. Set VULKAN_API_CPU_BENCHMARK to 1 to enable
This commit is contained in:
Exzap 2023-09-27 08:11:57 +02:00
parent 3e925b7707
commit f9f6206929
5 changed files with 99 additions and 13 deletions

View file

@ -2768,6 +2768,8 @@ void VulkanRenderer::NotifyLatteCommandProcessorIdle()
SubmitCommandBuffer();
}
void VulkanBenchmarkPrintResults();
void VulkanRenderer::SwapBuffers(bool swapTV, bool swapDRC)
{
SubmitCommandBuffer();
@ -2777,6 +2779,9 @@ void VulkanRenderer::SwapBuffers(bool swapTV, bool swapDRC)
if (swapDRC && IsSwapchainInfoValid(false))
SwapBuffer(false);
if(swapTV)
VulkanBenchmarkPrintResults();
}
void VulkanRenderer::ClearColorbuffer(bool padView)