mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-08-15 21:19:47 +00:00
JUST a quick replacement
This commit is contained in:
@@ -1892,9 +1892,13 @@ bool BufferCache<P>::IntersectsInPlaceWrites(DAddr device_addr, u64 size) {
|
||||
template <class P>
|
||||
void BufferCache<P>::WaitForInPlaceWrites() {
|
||||
if constexpr (!IS_OPENGL) {
|
||||
if (in_place_write_tick > runtime.KnownGpuTick()) {
|
||||
runtime.Wait(in_place_write_tick);
|
||||
if (in_place_write_tick <= in_place_host_available_tick) {
|
||||
return;
|
||||
}
|
||||
runtime.UnifiedMemoryWriteBarrier();
|
||||
const u64 barrier_tick = runtime.CurrentTick();
|
||||
runtime.Wait(barrier_tick);
|
||||
in_place_host_available_tick = barrier_tick;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -554,6 +554,7 @@ private:
|
||||
Common::RangeSet<DAddr> gpu_modified_ranges;
|
||||
Common::RangeSet<DAddr> in_place_gpu_written_ranges;
|
||||
u64 in_place_write_tick = 0;
|
||||
u64 in_place_host_available_tick = 0;
|
||||
std::deque<Common::RangeSet<DAddr>> committed_gpu_modified_ranges;
|
||||
|
||||
// Async Buffers
|
||||
|
||||
Reference in New Issue
Block a user