mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[dxvk] Only time pipeline compile times if requested
Avoids some unnecessary calls to high_resolution_clock::now().
This commit is contained in:
parent
6ecb74d2c0
commit
e926ceb9cc
@ -124,7 +124,10 @@ namespace dxvk {
|
|||||||
info.basePipelineIndex = -1;
|
info.basePipelineIndex = -1;
|
||||||
|
|
||||||
// Time pipeline compilation for debugging purposes
|
// Time pipeline compilation for debugging purposes
|
||||||
auto t0 = std::chrono::high_resolution_clock::now();
|
std::chrono::high_resolution_clock::time_point t0, t1;
|
||||||
|
|
||||||
|
if (Logger::logLevel() <= LogLevel::Debug)
|
||||||
|
t0 = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
VkPipeline pipeline = VK_NULL_HANDLE;
|
VkPipeline pipeline = VK_NULL_HANDLE;
|
||||||
if (m_vkd->vkCreateComputePipelines(m_vkd->device(),
|
if (m_vkd->vkCreateComputePipelines(m_vkd->device(),
|
||||||
@ -134,9 +137,12 @@ namespace dxvk {
|
|||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto t1 = std::chrono::high_resolution_clock::now();
|
if (Logger::logLevel() <= LogLevel::Debug) {
|
||||||
|
t1 = std::chrono::high_resolution_clock::now();
|
||||||
auto td = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0);
|
auto td = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0);
|
||||||
Logger::debug(str::format("DxvkComputePipeline: Finished in ", td.count(), " ms"));
|
Logger::debug(str::format("DxvkComputePipeline: Finished in ", td.count(), " ms"));
|
||||||
|
}
|
||||||
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,7 +439,10 @@ namespace dxvk {
|
|||||||
info.pTessellationState = nullptr;
|
info.pTessellationState = nullptr;
|
||||||
|
|
||||||
// Time pipeline compilation for debugging purposes
|
// Time pipeline compilation for debugging purposes
|
||||||
auto t0 = std::chrono::high_resolution_clock::now();
|
std::chrono::high_resolution_clock::time_point t0, t1;
|
||||||
|
|
||||||
|
if (Logger::logLevel() <= LogLevel::Debug)
|
||||||
|
t0 = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
VkPipeline pipeline = VK_NULL_HANDLE;
|
VkPipeline pipeline = VK_NULL_HANDLE;
|
||||||
if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(),
|
if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(),
|
||||||
@ -449,9 +452,12 @@ namespace dxvk {
|
|||||||
return VK_NULL_HANDLE;
|
return VK_NULL_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto t1 = std::chrono::high_resolution_clock::now();
|
if (Logger::logLevel() <= LogLevel::Debug) {
|
||||||
|
t1 = std::chrono::high_resolution_clock::now();
|
||||||
auto td = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0);
|
auto td = std::chrono::duration_cast<std::chrono::milliseconds>(t1 - t0);
|
||||||
Logger::debug(str::format("DxvkGraphicsPipeline: Finished in ", td.count(), " ms"));
|
Logger::debug(str::format("DxvkGraphicsPipeline: Finished in ", td.count(), " ms"));
|
||||||
|
}
|
||||||
|
|
||||||
return pipeline;
|
return pipeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user