mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-06 04:06:58 +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>
|
template <class P>
|
||||||
void BufferCache<P>::WaitForInPlaceWrites() {
|
void BufferCache<P>::WaitForInPlaceWrites() {
|
||||||
if constexpr (!IS_OPENGL) {
|
if constexpr (!IS_OPENGL) {
|
||||||
if (in_place_write_tick > runtime.KnownGpuTick()) {
|
if (in_place_write_tick <= in_place_host_available_tick) {
|
||||||
runtime.Wait(in_place_write_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> gpu_modified_ranges;
|
||||||
Common::RangeSet<DAddr> in_place_gpu_written_ranges;
|
Common::RangeSet<DAddr> in_place_gpu_written_ranges;
|
||||||
u64 in_place_write_tick = 0;
|
u64 in_place_write_tick = 0;
|
||||||
|
u64 in_place_host_available_tick = 0;
|
||||||
std::deque<Common::RangeSet<DAddr>> committed_gpu_modified_ranges;
|
std::deque<Common::RangeSet<DAddr>> committed_gpu_modified_ranges;
|
||||||
|
|
||||||
// Async Buffers
|
// Async Buffers
|
||||||
|
|||||||
Reference in New Issue
Block a user