mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-05 15:56:49 +00:00
rsx: Take empty queries into account for engines that spam report reads.
- Some games will spam the report queue with requests but have zpass statistics enabled.
This commit is contained in:
parent
2a8f2c64d2
commit
57d3c9e171
@ -3216,19 +3216,36 @@ namespace rsx
|
|||||||
|
|
||||||
const auto memory_end = memory_address + memory_range;
|
const auto memory_end = memory_address + memory_range;
|
||||||
u32 sync_address = 0;
|
u32 sync_address = 0;
|
||||||
occlusion_query_info* query;
|
occlusion_query_info* query = nullptr;
|
||||||
|
|
||||||
for (auto It = m_pending_writes.crbegin(); It != m_pending_writes.crend(); ++It)
|
for (auto It = m_pending_writes.crbegin(); It != m_pending_writes.crend(); ++It)
|
||||||
{
|
{
|
||||||
|
if (sync_address)
|
||||||
|
{
|
||||||
|
if (It->query)
|
||||||
|
{
|
||||||
|
sync_address = It->sink;
|
||||||
|
query = It->query;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (It->sink >= memory_address && It->sink < memory_end)
|
if (It->sink >= memory_address && It->sink < memory_end)
|
||||||
{
|
{
|
||||||
sync_address = It->sink;
|
sync_address = It->sink;
|
||||||
query = It->query;
|
|
||||||
break;
|
// NOTE: If application is spamming requests, there may be no query attached
|
||||||
|
if (It->query)
|
||||||
|
{
|
||||||
|
query = It->query;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sync_address)
|
if (!sync_address || !query)
|
||||||
return result_none;
|
return result_none;
|
||||||
|
|
||||||
if (!(flags & sync_defer_copy))
|
if (!(flags & sync_defer_copy))
|
||||||
|
Loading…
Reference in New Issue
Block a user