summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-09 21:21:08 +0200
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-09 21:21:08 +0200
commitb3691fc33c09c479d86154d341e1983995193da8 (patch)
tree329454cdb75131d1dafb61af9668a53db38f23f9
parentMerge pull request #10183 from liamwhite/mods (diff)
downloadyuzu-b3691fc33c09c479d86154d341e1983995193da8.tar
yuzu-b3691fc33c09c479d86154d341e1983995193da8.tar.gz
yuzu-b3691fc33c09c479d86154d341e1983995193da8.tar.bz2
yuzu-b3691fc33c09c479d86154d341e1983995193da8.tar.lz
yuzu-b3691fc33c09c479d86154d341e1983995193da8.tar.xz
yuzu-b3691fc33c09c479d86154d341e1983995193da8.tar.zst
yuzu-b3691fc33c09c479d86154d341e1983995193da8.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 6624919a4..fff57ffa9 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -96,12 +96,12 @@ void BufferCache<P>::TickFrame() {
template <class P>
void BufferCache<P>::WriteMemory(VAddr cpu_addr, u64 size) {
- memory_tracker.MarkRegionAsCpuModified(cpu_addr, size);
if (memory_tracker.IsRegionGpuModified(cpu_addr, size)) {
const IntervalType subtract_interval{cpu_addr, cpu_addr + size};
ClearDownload(subtract_interval);
common_ranges.subtract(subtract_interval);
}
+ memory_tracker.MarkRegionAsCpuModified(cpu_addr, size);
}
template <class P>
@@ -122,9 +122,10 @@ std::optional<VideoCore::RasterizerDownloadArea> BufferCache<P>::GetFlushArea(VA
area->preemtive = true;
return area;
};
+ area->preemtive =
+ !IsRegionGpuModified(cpu_addr_start_aligned, cpu_addr_end_aligned - cpu_addr_start_aligned);
memory_tracker.MarkRegionAsPreflushable(cpu_addr_start_aligned,
cpu_addr_end_aligned - cpu_addr_start_aligned);
- area->preemtive = !IsRegionGpuModified(cpu_addr, size);
return area;
}
@@ -1223,11 +1224,10 @@ void BufferCache<P>::UpdateComputeTextureBuffers() {
template <class P>
void BufferCache<P>::MarkWrittenBuffer(BufferId buffer_id, VAddr cpu_addr, u32 size) {
- memory_tracker.MarkRegionAsGpuModified(cpu_addr, size);
-
if (memory_tracker.IsRegionCpuModified(cpu_addr, size)) {
SynchronizeBuffer(slot_buffers[buffer_id], cpu_addr, size);
}
+ memory_tracker.MarkRegionAsGpuModified(cpu_addr, size);
const IntervalType base_interval{cpu_addr, cpu_addr + size};
common_ranges.add(base_interval);