diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 4def8f076..9399bcfea 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h @@ -172,7 +172,7 @@ public: [[nodiscard]] bool IsRegionGpuModified(VAddr addr, size_t size); /// Return true when a region is registered on the cache - [[nodiscard]] bool IsRegionRegistered(VAddr addr, size_t size); + [[nodiscard]] bool IsRegionRegistered(VAddr addr, size_t size) const; /// Return true when a CPU region is modified from the CPU [[nodiscard]] bool IsRegionCpuModified(VAddr addr, size_t size); @@ -503,6 +503,11 @@ bool BufferCache
::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
auto& src_buffer = slot_buffers[buffer_a];
auto& dest_buffer = slot_buffers[buffer_b];
SynchronizeBuffer(src_buffer, *cpu_src_address, static_cast ::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
common_ranges.add(add_interval);
}
- if (dest_buffer.HasCachedWrites()) {
- dest_buffer.FlushCachedWrites();
- }
runtime.CopyBuffer(dest_buffer, src_buffer, copies);
- dest_buffer.UnmarkRegionAsCpuModified(*cpu_dest_address, amount);
if (atleast_1_download) {
dest_buffer.MarkRegionAsGpuModified(*cpu_dest_address, amount);
}
@@ -827,7 +828,7 @@ bool BufferCache ::IsRegionGpuModified(VAddr addr, size_t size) {
}
template ::IsRegionRegistered(VAddr addr, size_t size) {
+bool BufferCache ::IsRegionRegistered(VAddr addr, size_t size) const {
const VAddr end_addr = addr + size;
const u64 page_end = Common::DivCeil(end_addr, PAGE_SIZE);
for (u64 page = addr >> PAGE_BITS; page < page_end;) {