mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-11-12 08:53:27 +00:00
Unify Vulkan RenderState tracking in Loading & Replay: QueryPool APIs
- Serialise_vkCmdCopyQueryPoolResults - Serialise_vkCmdCopyQueryPoolResultsToMemoryKHR
This commit is contained in:
1 parent
f801bcde8d
commit
117452e72d
1 file changed
+24
-40
@@ -4787,24 +4787,20 @@ bool WrappedVulkan::Serialise_vkCmdCopyQueryPoolResults(
|
||||
{
|
||||
m_LastCmdBufferID = GetResID(commandBuffer);
|
||||
|
||||
if(IsActiveReplaying(m_State))
|
||||
if(InRerecordRange(m_LastCmdBufferID))
|
||||
{
|
||||
if(InRerecordRange(m_LastCmdBufferID))
|
||||
bool loading = IsLoading(m_State);
|
||||
if(!loading)
|
||||
commandBuffer = RerecordCmdBuf(m_LastCmdBufferID);
|
||||
else
|
||||
commandBuffer = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
VulkanCreationInfo::QueryPool &qpInfo = m_CreationInfo.m_QueryPool[GetResID(queryPool)];
|
||||
VulkanCreationInfo::QueryPool &qpInfo = m_CreationInfo.m_QueryPool[GetResID(queryPool)];
|
||||
|
||||
// skip AS queries as we do not serialise them
|
||||
if(qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR ||
|
||||
qpInfo.queryType ==
|
||||
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR)
|
||||
{
|
||||
if(commandBuffer != VK_NULL_HANDLE)
|
||||
// skip AS queries as we do not serialise them
|
||||
if(qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR ||
|
||||
qpInfo.queryType ==
|
||||
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR)
|
||||
{
|
||||
const bool is64bit = (flags & VK_QUERY_RESULT_64_BIT) > 0;
|
||||
const bool hasAvailability = (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) > 0;
|
||||
@@ -4817,13 +4813,10 @@ bool WrappedVulkan::Serialise_vkCmdCopyQueryPoolResults(
|
||||
|
||||
ObjDisp(commandBuffer)
|
||||
->CmdFillBuffer(Unwrap(commandBuffer), Unwrap(destBuffer), destOffset, size, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(commandBuffer != VK_NULL_HANDLE)
|
||||
{
|
||||
ObjDisp(commandBuffer)
|
||||
->CmdCopyQueryPoolResults(Unwrap(commandBuffer), Unwrap(queryPool), firstQuery,
|
||||
queryCount, Unwrap(destBuffer), destOffset, destStride, flags);
|
||||
@@ -9958,26 +9951,20 @@ bool WrappedVulkan::Serialise_vkCmdCopyQueryPoolResultsToMemoryKHR(
|
||||
|
||||
if(IsReplayingAndReading())
|
||||
{
|
||||
m_LastCmdBufferID = GetResID(commandBuffer);
|
||||
|
||||
if(IsActiveReplaying(m_State))
|
||||
if(InRerecordRange(m_LastCmdBufferID))
|
||||
{
|
||||
if(InRerecordRange(m_LastCmdBufferID))
|
||||
bool loading = IsLoading(m_State);
|
||||
if(!loading)
|
||||
commandBuffer = RerecordCmdBuf(m_LastCmdBufferID);
|
||||
else
|
||||
commandBuffer = VK_NULL_HANDLE;
|
||||
}
|
||||
|
||||
VulkanCreationInfo::QueryPool &qpInfo = m_CreationInfo.m_QueryPool[GetResID(queryPool)];
|
||||
VulkanCreationInfo::QueryPool &qpInfo = m_CreationInfo.m_QueryPool[GetResID(queryPool)];
|
||||
|
||||
// skip AS queries as we do not serialise them
|
||||
if(qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR ||
|
||||
qpInfo.queryType ==
|
||||
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR)
|
||||
{
|
||||
if(commandBuffer != VK_NULL_HANDLE)
|
||||
// skip AS queries as we do not serialise them
|
||||
if(qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SIZE_KHR ||
|
||||
qpInfo.queryType == VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR ||
|
||||
qpInfo.queryType ==
|
||||
VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR)
|
||||
{
|
||||
const bool is64bit = (queryResultFlags & VK_QUERY_RESULT_64_BIT) > 0;
|
||||
const bool hasAvailability = (queryResultFlags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) > 0;
|
||||
@@ -9990,13 +9977,10 @@ bool WrappedVulkan::Serialise_vkCmdCopyQueryPoolResultsToMemoryKHR(
|
||||
|
||||
VkDeviceAddressRangeKHR range = {DstRange.address, size};
|
||||
ObjDisp(commandBuffer)->CmdFillMemoryKHR(Unwrap(commandBuffer), &range, dstFlags, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if(commandBuffer != VK_NULL_HANDLE)
|
||||
{
|
||||
ObjDisp(commandBuffer)
|
||||
->CmdCopyQueryPoolResultsToMemoryKHR(Unwrap(commandBuffer), Unwrap(queryPool), firstQuery,
|
||||
queryCount, &DstRange, dstFlags, queryResultFlags);
|
||||
|
||||
Reference in new issue
Block a user