summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-07-20 23:50:48 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2021-07-20 23:50:51 +0200
commit6e2ca7fbee8b7de964926da392ab0550b2a76475 (patch)
tree9e995922f6a8dcc74c5a0ea76d104cbc06461ce0 /src
parentMerge pull request #6629 from FernandoS27/accel-dma-2 (diff)
downloadyuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.tar
yuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.tar.gz
yuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.tar.bz2
yuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.tar.lz
yuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.tar.xz
yuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.tar.zst
yuzu-6e2ca7fbee8b7de964926da392ab0550b2a76475.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 7373cb62d..5a0b6f0c0 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -553,13 +553,9 @@ bool BufferCache<P>::DMAClear(GPUVAddr dst_address, u64 amount, u32 value) {
ClearDownload(subtract_interval);
common_ranges.subtract(subtract_interval);
- BufferId buffer;
- do {
- has_deleted_buffers = false;
- buffer = FindBuffer(*cpu_dst_address, static_cast<u32>(size));
- } while (has_deleted_buffers);
+ const BufferId buffer = FindBuffer(*cpu_dst_address, static_cast<u32>(size));
auto& dest_buffer = slot_buffers[buffer];
- const u32 offset = static_cast<u32>(*cpu_dst_address - dest_buffer.CpuAddr());
+ const u32 offset = dest_buffer.Offset(*cpu_dst_address);
runtime.ClearBuffer(dest_buffer, offset, size, value);
return true;
}