mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 05:51:27 +12:00
vk: Remove NVIDIA workaround for broken partial occlusion queries
- This bug has been fixed in the latest drivers.
This commit is contained in:
parent
8c847d3a4b
commit
69d90f6fec
1 changed files with 2 additions and 10 deletions
|
@ -3228,11 +3228,7 @@ public:
|
||||||
|
|
||||||
bool check_query_status(u32 index)
|
bool check_query_status(u32 index)
|
||||||
{
|
{
|
||||||
// NOTE: Keeps NVIDIA driver from using partial results as they are broken (always returns true)
|
return poke_query(query_slot_status[index], index, VK_QUERY_RESULT_PARTIAL_BIT);
|
||||||
const VkQueryResultFlags flags =
|
|
||||||
(vk::get_driver_vendor() == vk::driver_vendor::NVIDIA ? 0 : VK_QUERY_RESULT_PARTIAL_BIT);
|
|
||||||
|
|
||||||
return poke_query(query_slot_status[index], index, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 get_query_result(u32 index)
|
u32 get_query_result(u32 index)
|
||||||
|
@ -3240,13 +3236,9 @@ public:
|
||||||
// Check for cached result
|
// Check for cached result
|
||||||
auto& query_info = query_slot_status[index];
|
auto& query_info = query_slot_status[index];
|
||||||
|
|
||||||
// Wait for full result on NVIDIA to avoid getting garbage results
|
|
||||||
const VkQueryResultFlags flags =
|
|
||||||
(vk::get_driver_vendor() == vk::driver_vendor::NVIDIA ? VK_QUERY_RESULT_WAIT_BIT : VK_QUERY_RESULT_PARTIAL_BIT);
|
|
||||||
|
|
||||||
while (!query_info.ready)
|
while (!query_info.ready)
|
||||||
{
|
{
|
||||||
poke_query(query_info, index, flags);
|
poke_query(query_info, index, VK_QUERY_RESULT_PARTIAL_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
return query_info.any_passed ? 1 : 0;
|
return query_info.any_passed ? 1 : 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue