Use PAUSE in vk::query_pool_manager::get_query_result

This commit is contained in:
Nekotekina 2021-12-17 16:40:39 +03:00
parent 262ff01619
commit 12e3c9e08b

View File

@ -2,6 +2,7 @@
#include "VKQueryPool.h"
#include "VKRenderPass.h"
#include "VKResourceManager.h"
#include "util/asm.hpp"
namespace vk
{
@ -157,9 +158,16 @@ namespace vk
{
// Check for cached result
auto& query_info = query_slot_status[index];
while (!query_info.ready)
if (!query_info.ready)
{
poke_query(query_info, index, result_flags);
while (!query_info.ready)
{
utils::pause();
poke_query(query_info, index, result_flags);
}
}
return query_info.data;