diff --git a/src/dxvk/dxvk_compute.cpp b/src/dxvk/dxvk_compute.cpp index d56e21be..f6d543c9 100644 --- a/src/dxvk/dxvk_compute.cpp +++ b/src/dxvk/dxvk_compute.cpp @@ -1,3 +1,4 @@ +#include #include #include "dxvk_compute.h" @@ -91,6 +92,9 @@ namespace dxvk { info.basePipelineHandle = baseHandle; info.basePipelineIndex = -1; + // Time pipeline compilation for debugging purposes + auto t0 = std::chrono::high_resolution_clock::now(); + VkPipeline pipeline = VK_NULL_HANDLE; if (m_vkd->vkCreateComputePipelines(m_vkd->device(), m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) { @@ -98,6 +102,10 @@ namespace dxvk { return VK_NULL_HANDLE; } + auto t1 = std::chrono::high_resolution_clock::now(); + auto td = std::chrono::duration_cast(t1 - t0); + Logger::debug(str::format("DxvkComputePipeline: Finished in ", td.count(), " ms")); + m_cache->update(); return pipeline; } diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp index 782d0017..80d077b0 100644 --- a/src/dxvk/dxvk_graphics.cpp +++ b/src/dxvk/dxvk_graphics.cpp @@ -1,3 +1,4 @@ +#include #include #include "dxvk_device.h" @@ -248,6 +249,9 @@ namespace dxvk { if (tsInfo.patchControlPoints == 0) info.pTessellationState = nullptr; + // Time pipeline compilation for debugging purposes + auto t0 = std::chrono::high_resolution_clock::now(); + VkPipeline pipeline = VK_NULL_HANDLE; if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(), m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) { @@ -255,6 +259,10 @@ namespace dxvk { return VK_NULL_HANDLE; } + auto t1 = std::chrono::high_resolution_clock::now(); + auto td = std::chrono::duration_cast(t1 - t0); + Logger::debug(str::format("DxvkGraphicsPipeline: Finished in ", td.count(), " ms")); + m_cache->update(); return pipeline; }