summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2023-08-27 02:13:40 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2023-08-27 03:45:43 +0200
commitacc99433c7c0e527424828452c978d7a69f8b52a (patch)
treeb496d9f9f432cb0c1bdec246807cf7f90b477533
parentMerge pull request #11377 from BenjaminHalko/reverse-slider-input (diff)
downloadyuzu-acc99433c7c0e527424828452c978d7a69f8b52a.tar
yuzu-acc99433c7c0e527424828452c978d7a69f8b52a.tar.gz
yuzu-acc99433c7c0e527424828452c978d7a69f8b52a.tar.bz2
yuzu-acc99433c7c0e527424828452c978d7a69f8b52a.tar.lz
yuzu-acc99433c7c0e527424828452c978d7a69f8b52a.tar.xz
yuzu-acc99433c7c0e527424828452c978d7a69f8b52a.tar.zst
yuzu-acc99433c7c0e527424828452c978d7a69f8b52a.zip
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index f0f450edb..8be7bd594 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -289,8 +289,11 @@ std::pair<typename P::Buffer*, u32> BufferCache<P>::ObtainBuffer(GPUVAddr gpu_ad
MarkWrittenBuffer(buffer_id, *cpu_addr, size);
break;
case ObtainBufferOperation::DiscardWrite: {
- IntervalType interval{*cpu_addr, size};
+ VAddr cpu_addr_start = Common::AlignDown(*cpu_addr, 64);
+ VAddr cpu_addr_end = Common::AlignUp(*cpu_addr + size, 64);
+ IntervalType interval{cpu_addr_start, cpu_addr_end};
ClearDownload(interval);
+ common_ranges.subtract(interval);
break;
}
default:
@@ -1159,6 +1162,11 @@ void BufferCache<P>::UpdateDrawIndirect() {
.size = static_cast<u32>(size),
.buffer_id = FindBuffer(*cpu_addr, static_cast<u32>(size)),
};
+ VAddr cpu_addr_start = Common::AlignDown(*cpu_addr, 64);
+ VAddr cpu_addr_end = Common::AlignUp(*cpu_addr + size, 64);
+ IntervalType interval{cpu_addr_start, cpu_addr_end};
+ ClearDownload(interval);
+ common_ranges.subtract(interval);
};
if (current_draw_indirect->include_count) {
update(current_draw_indirect->count_start_address, sizeof(u32),