|
|
|
@ -257,13 +257,10 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type |
|
|
|
}; |
|
|
|
u8* pointer = impl->device_memory.template GetPointer<u8>(cpu_addr); |
|
|
|
u8* pointer_timestamp = impl->device_memory.template GetPointer<u8>(cpu_addr + 8); |
|
|
|
bool is_synced = !Settings::IsGPULevelHigh() && is_fence; |
|
|
|
std::function<void()> operation([this, is_synced, streamer, query_base = query, query_location, |
|
|
|
std::function<void()> operation([this, streamer, query_base = query, query_location, |
|
|
|
pointer, pointer_timestamp] { |
|
|
|
if (True(query_base->flags & QueryFlagBits::IsInvalidated)) { |
|
|
|
if (!is_synced) [[likely]] { |
|
|
|
impl->pending_unregister.push_back(query_location); |
|
|
|
} |
|
|
|
impl->pending_unregister.push_back(query_location); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (False(query_base->flags & QueryFlagBits::IsFinalValueSynced)) [[unlikely]] { |
|
|
|
@ -280,9 +277,7 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type |
|
|
|
u32 value = static_cast<u32>(query_base->value); |
|
|
|
std::memcpy(pointer, &value, sizeof(value)); |
|
|
|
} |
|
|
|
if (!is_synced) [[likely]] { |
|
|
|
impl->pending_unregister.push_back(query_location); |
|
|
|
} |
|
|
|
impl->pending_unregister.push_back(query_location); |
|
|
|
}); |
|
|
|
if (is_fence) { |
|
|
|
impl->rasterizer.SignalFence(std::move(operation)); |
|
|
|
@ -301,10 +296,6 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type |
|
|
|
} |
|
|
|
impl->rasterizer.SyncOperation(std::move(operation)); |
|
|
|
} |
|
|
|
if (is_synced) { |
|
|
|
streamer->Free(new_query_id); |
|
|
|
return; |
|
|
|
} |
|
|
|
auto [cont_addr, base] = gen_caching_indexing(cpu_addr); |
|
|
|
{ |
|
|
|
std::scoped_lock lock(cache_mutex); |
|
|
|
|