summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-08-25 03:31:20 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-08-25 03:31:20 +0000
commit67fec45e6b5ec70b477c529fb2b1f4bd08682831 (patch)
tree7d9d66be7b83ced2e72228b69464301b163aad9b /Graphics/GraphicsEngineVulkan
parentFixed buffer creation test on Vulkan/Intel; improved texture test failure output (diff)
downloadDiligentCore-67fec45e6b5ec70b477c529fb2b1f4bd08682831.tar.gz
DiligentCore-67fec45e6b5ec70b477c529fb2b1f4bd08682831.zip
Added QUERY_TYPE_DURATION value and QueryDataDuration struct
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp b/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp
index ebc57289..f56f58f2 100644
--- a/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/QueryManagerVk.cpp
@@ -61,7 +61,8 @@ QueryManagerVk::QueryManagerVk(RenderDeviceVkImpl* pRenderDeviceVk,
static_assert(QUERY_TYPE_BINARY_OCCLUSION == 2, "Unexpected value of QUERY_TYPE_BINARY_OCCLUSION. EngineVkCreateInfo::QueryPoolSizes must be updated");
static_assert(QUERY_TYPE_TIMESTAMP == 3, "Unexpected value of QUERY_TYPE_TIMESTAMP. EngineVkCreateInfo::QueryPoolSizes must be updated");
static_assert(QUERY_TYPE_PIPELINE_STATISTICS== 4, "Unexpected value of QUERY_TYPE_PIPELINE_STATISTICS. EngineVkCreateInfo::QueryPoolSizes must be updated");
- static_assert(QUERY_TYPE_NUM_TYPES == 5, "Unexpected value of QUERY_TYPE_NUM_TYPES. EngineVkCreateInfo::QueryPoolSizes must be updated");
+ static_assert(QUERY_TYPE_DURATION == 5, "Unexpected value of QUERY_TYPE_DURATION. EngineVkCreateInfo::QueryPoolSizes must be updated");
+ static_assert(QUERY_TYPE_NUM_TYPES == 6, "Unexpected value of QUERY_TYPE_NUM_TYPES. EngineVkCreateInfo::QueryPoolSizes must be updated");
// clang-format on
auto& HeapInfo = m_Heaps[QueryType];
@@ -80,6 +81,7 @@ QueryManagerVk::QueryManagerVk(RenderDeviceVkImpl* pRenderDeviceVk,
break;
case QUERY_TYPE_TIMESTAMP:
+ case QUERY_TYPE_DURATION:
QueryPoolCI.queryType = VK_QUERY_TYPE_TIMESTAMP;
break;
@@ -114,6 +116,8 @@ QueryManagerVk::QueryManagerVk(RenderDeviceVkImpl* pRenderDeviceVk,
}
QueryPoolCI.queryCount = HeapInfo.PoolSize;
+ if (QueryType == QUERY_TYPE_DURATION)
+ QueryPoolCI.queryCount *= 2;
HeapInfo.vkQueryPool = LogicalDevice.CreateQueryPool(QueryPoolCI, "QueryManagerVk: query pool");