aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-30 21:57:13 +0100
committerKelebek1 <eeeedddccc@hotmail.co.uk>2023-05-30 21:57:13 +0100
commit3da7eafba7ae3d35ef66eddf644d67fe321dd774 (patch)
treed866e0b3a7ba33951035419bbee73e1f4360b52d /src/video_core/buffer_cache
parent5e35454e43227f91dcffe0f555c3aa50091cf785 (diff)
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 c336be7079..427afd5fc4 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() {
template <class P>
void BufferCache<P>::TickFrame() {
- // Calculate hits and shots and move hit bits to the right
+ // Homebrew console apps don't create or bind any channels, so this will be nullptr.
+ if (!channel_state) {
+ return;
+ }
+ // Calculate hits and shots and move hit bits to the right
const u32 hits = std::reduce(channel_state->uniform_cache_hits.begin(),
channel_state->uniform_cache_hits.end());
const u32 shots = std::reduce(channel_state->uniform_cache_shots.begin(),