Преглед изворни кода

Skip BufferCache tickframe with no channel state set

Kelebek1 пре 3 година
родитељ
комит
661375a222
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      src/video_core/buffer_cache/buffer_cache.h

+ 5 - 1
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(),