update parallel rdp

This commit is contained in:
Logan McNaughton committed 2023-02-12 11:46:06 -07:00
1 parent a9929dcdff
commit 84d05dd02d
89 files changed
+47413 -52063

No files matched your search

+12 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (c) 2017-2022 Hans-Kristian Arntzen
/* Copyright (c) 2017-2023 Hans-Kristian Arntzen
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -383,7 +383,7 @@ void QueryPool::add_pool()
pools.push_back(std::move(pool));
}
QueryPoolHandle QueryPool::write_timestamp(VkCommandBuffer cmd, VkPipelineStageFlagBits stage)
QueryPoolHandle QueryPool::write_timestamp(VkCommandBuffer cmd, VkPipelineStageFlags2 stage)
{
if (!supports_timestamp)
{
@@ -391,6 +391,8 @@ QueryPoolHandle QueryPool::write_timestamp(VkCommandBuffer cmd, VkPipelineStageF
return {};
}
VK_ASSERT((stage & (stage - 1)) == 0);
if (pools[pool_index].index >= pools[pool_index].size)
pool_index++;
@@ -404,7 +406,14 @@ QueryPoolHandle QueryPool::write_timestamp(VkCommandBuffer cmd, VkPipelineStageF
if (!device->get_device_features().host_query_reset_features.hostQueryReset)
table.vkCmdResetQueryPool(cmd, pool.pool, pool.index, 1);
table.vkCmdWriteTimestamp(cmd, stage, pool.pool, pool.index);
if (device->get_device_features().sync2_features.synchronization2)
table.vkCmdWriteTimestamp2KHR(cmd, stage, pool.pool, pool.index);
else
{
table.vkCmdWriteTimestamp(cmd, static_cast<VkPipelineStageFlagBits>(convert_vk_src_stage2(stage)),
pool.pool, pool.index);
}
pool.index++;
return cookie;