summaryrefslogtreecommitdiffstats
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-09-20 02:35:07 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-09-20 02:35:07 +0200
commit1ea8073783b3e12c10812192e34a5d557727fd34 (patch)
tree4201c0868d7feed955e0d68f372a43af15f17b7f /src/video_core/buffer_cache
parentMerge pull request #7019 from ameerj/videocore-jthread (diff)
downloadyuzu-1ea8073783b3e12c10812192e34a5d557727fd34.tar
yuzu-1ea8073783b3e12c10812192e34a5d557727fd34.tar.gz
yuzu-1ea8073783b3e12c10812192e34a5d557727fd34.tar.bz2
yuzu-1ea8073783b3e12c10812192e34a5d557727fd34.tar.lz
yuzu-1ea8073783b3e12c10812192e34a5d557727fd34.tar.xz
yuzu-1ea8073783b3e12c10812192e34a5d557727fd34.tar.zst
yuzu-1ea8073783b3e12c10812192e34a5d557727fd34.zip
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 7bfd57369..d350c9b36 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -570,13 +570,12 @@ bool BufferCache<P>::DMACopy(GPUVAddr src_address, GPUVAddr dest_address, u64 am
ForEachWrittenRange(*cpu_src_address, amount, mirror);
// This subtraction in this order is important for overlapping copies.
common_ranges.subtract(subtract_interval);
- bool atleast_1_download = tmp_intervals.size() != 0;
- for (const IntervalType add_interval : tmp_intervals) {
+ const bool has_new_downloads = tmp_intervals.size() != 0;
+ for (const IntervalType& add_interval : tmp_intervals) {
common_ranges.add(add_interval);
}
-
runtime.CopyBuffer(dest_buffer, src_buffer, copies);
- if (atleast_1_download) {
+ if (has_new_downloads) {
dest_buffer.MarkRegionAsGpuModified(*cpu_dest_address, amount);
}
std::vector<u8> tmp_buffer(amount);