Browse Source

Revert

lizzie/force-flush-in-nce-invalidate
CamilleLaVey 1 month ago
committed by crueter
parent
commit
1ec388c01b
  1. 2
      src/core/memory.cpp
  2. 8
      src/video_core/gpu.cpp
  3. 5
      src/video_core/gpu.h

2
src/core/memory.cpp

@ -754,7 +754,7 @@ struct Memory::Impl {
};
auto& gpu = system.GPU();
gpu_device_memory->ApplyOpOnPointer(p, scratch_buffers[core], [&](DAddr addr) {
if (flush && gpu.MustFlushRegion(addr, size)) {
if (flush) {
void(gpu.OnCPURead(addr, size));
}
gpu.InvalidateRegion(addr, size);

8
src/video_core/gpu.cpp

@ -219,10 +219,6 @@ struct GPU::Impl {
return renderer->ReadRasterizer()->OnCPUWrite(addr, size);
}
bool MustFlushRegion(DAddr addr, u64 size) {
return renderer->ReadRasterizer()->MustFlushRegion(addr, size);
}
/// Notify rasterizer that any caches of the specified region should be flushed and invalidated
void FlushAndInvalidateRegion(DAddr addr, u64 size) {
gpu_thread.FlushAndInvalidateRegion(addr, size, is_async);
@ -484,10 +480,6 @@ void GPU::InvalidateRegion(DAddr addr, u64 size) {
impl->InvalidateRegion(addr, size);
}
bool GPU::MustFlushRegion(DAddr addr, u64 size) {
return impl->MustFlushRegion(addr, size);
}
bool GPU::OnCPUWrite(DAddr addr, u64 size) {
return impl->OnCPUWrite(addr, size);
}

5
src/video_core/gpu.h

@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
@ -246,9 +246,6 @@ public:
/// Notify rasterizer that any caches of the specified region should be invalidated
void InvalidateRegion(DAddr addr, u64 size);
/// Check if the specified memory area requires flushing to CPU memory
[[nodiscard]] bool MustFlushRegion(DAddr addr, u64 size);
/// Notify rasterizer that CPU is trying to write this area. It returns true if the area is
/// sensible, false otherwise, addr and size must be a valid combination
bool OnCPUWrite(DAddr addr, u64 size);

Loading…
Cancel
Save