summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorGravatar Kelebek12023-05-30 21:57:13 +0100
committerGravatar Kelebek12023-05-30 21:57:13 +0100
commit661375a222399f6b731362c849417a82a17531ee (patch)
treed866e0b3a7ba33951035419bbee73e1f4360b52d /src/video_core/buffer_cache
parentMerge pull request #10504 from 12101111/rename-pagesize (diff)
downloadyuzu-661375a222399f6b731362c849417a82a17531ee.tar.gz
yuzu-661375a222399f6b731362c849417a82a17531ee.tar.xz
yuzu-661375a222399f6b731362c849417a82a17531ee.zip
Skip BufferCache tickframe with no channel state set
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index c336be707..427afd5fc 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -63,8 +63,12 @@ void BufferCache<P>::RunGarbageCollector() {
63 63
64template <class P> 64template <class P>
65void BufferCache<P>::TickFrame() { 65void BufferCache<P>::TickFrame() {
66 // Calculate hits and shots and move hit bits to the right 66 // Homebrew console apps don't create or bind any channels, so this will be nullptr.
67 if (!channel_state) {
68 return;
69 }
67 70
71 // Calculate hits and shots and move hit bits to the right
68 const u32 hits = std::reduce(channel_state->uniform_cache_hits.begin(), 72 const u32 hits = std::reduce(channel_state->uniform_cache_hits.begin(),
69 channel_state->uniform_cache_hits.end()); 73 channel_state->uniform_cache_hits.end());
70 const u32 shots = std::reduce(channel_state->uniform_cache_shots.begin(), 74 const u32 shots = std::reduce(channel_state->uniform_cache_shots.begin(),