mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-26 04:49:30 -04:00
[query_cache] Reduction of synchronization within queries
This commit is contained in:
parent
c993bc01a4
commit
42d4c5dab7
1 changed files with 3 additions and 0 deletions
|
|
@ -287,6 +287,7 @@ void QueryCacheBase<Traits>::CounterReport(GPUVAddr addr, QueryType counter_type
|
|||
u32 value = static_cast<u32>(query_base->value);
|
||||
std::memcpy(pointer, &value, sizeof(value));
|
||||
}
|
||||
query_base->flags |= QueryFlagBits::IsGuestSynced;
|
||||
if (!is_synced) [[likely]] {
|
||||
impl->pending_unregister.push_back(query_location);
|
||||
}
|
||||
|
|
@ -569,10 +570,12 @@ bool QueryCacheBase<Traits>::SemiFlushQueryDirty(QueryCacheBase<Traits>::QueryLo
|
|||
auto* ptr = impl->device_memory.template GetPointer<u8>(query_base->guest_address);
|
||||
if (True(query_base->flags & QueryFlagBits::HasTimestamp)) {
|
||||
std::memcpy(ptr, &query_base->value, sizeof(query_base->value));
|
||||
query_base->flags |= QueryFlagBits::IsGuestSynced;
|
||||
return false;
|
||||
}
|
||||
u32 value_l = static_cast<u32>(query_base->value);
|
||||
std::memcpy(ptr, &value_l, sizeof(value_l));
|
||||
query_base->flags |= QueryFlagBits::IsGuestSynced;
|
||||
return false;
|
||||
}
|
||||
return True(query_base->flags & QueryFlagBits::IsHostManaged) &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue