mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +01:00
[dxvk] Time pipeline creation in debug mode
This commit is contained in:
parent
5eefb8530d
commit
108bf2194f
@ -1,3 +1,4 @@
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
|
||||
#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<std::chrono::milliseconds>(t1 - t0);
|
||||
Logger::debug(str::format("DxvkComputePipeline: Finished in ", td.count(), " ms"));
|
||||
|
||||
m_cache->update();
|
||||
return pipeline;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
#include <chrono>
|
||||
#include <cstring>
|
||||
|
||||
#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<std::chrono::milliseconds>(t1 - t0);
|
||||
Logger::debug(str::format("DxvkGraphicsPipeline: Finished in ", td.count(), " ms"));
|
||||
|
||||
m_cache->update();
|
||||
return pipeline;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user