summaryrefslogtreecommitdiff
path: root/src/video_core/query_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/query_cache.h')
-rw-r--r--src/video_core/query_cache.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h
index eb68ea638..b0ebe71b7 100644
--- a/src/video_core/query_cache.h
+++ b/src/video_core/query_cache.h
@@ -135,8 +135,10 @@ public:
135 /// Updates counters from GPU state. Expected to be called once per draw, clear or dispatch. 135 /// Updates counters from GPU state. Expected to be called once per draw, clear or dispatch.
136 void UpdateCounters() { 136 void UpdateCounters() {
137 std::unique_lock lock{mutex}; 137 std::unique_lock lock{mutex};
138 const auto& regs = maxwell3d->regs; 138 if (maxwell3d) {
139 Stream(VideoCore::QueryType::SamplesPassed).Update(regs.samplecnt_enable); 139 const auto& regs = maxwell3d->regs;
140 Stream(VideoCore::QueryType::SamplesPassed).Update(regs.samplecnt_enable);
141 }
140 } 142 }
141 143
142 /// Resets a counter to zero. It doesn't disable the query after resetting. 144 /// Resets a counter to zero. It doesn't disable the query after resetting.