This commit is contained in:
CamilleLaVey
2026-07-01 21:40:40 -04:00
committed by crueter
parent 54ce017b10
commit 1ec388c01b
3 changed files with 2 additions and 13 deletions
+1 -1
View File
@@ -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
View File
@@ -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);
}
+1 -4
View File
@@ -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);