1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00

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