diff options
author | Liam <byteslice@airmail.cc> | 2022-08-20 04:15:23 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:54 +0200 |
commit | 0d99b7962d8e06958668168cdae155fd1e3d1757 (patch) | |
tree | 55ef394dafbe74050da9cffbc184a3c898ce71b7 /src/video_core/query_cache.h | |
parent | general: rework usages of UNREACHABLE macro (diff) | |
download | yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.tar yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.tar.gz yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.tar.bz2 yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.tar.lz yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.tar.xz yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.tar.zst yuzu-0d99b7962d8e06958668168cdae155fd1e3d1757.zip |
Diffstat (limited to 'src/video_core/query_cache.h')
-rw-r--r-- | src/video_core/query_cache.h | 6 |
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: /// Updates counters from GPU state. Expected to be called once per draw, clear or dispatch. void UpdateCounters() { std::unique_lock lock{mutex}; - const auto& regs = maxwell3d->regs; - Stream(VideoCore::QueryType::SamplesPassed).Update(regs.samplecnt_enable); + if (maxwell3d) { + const auto& regs = maxwell3d->regs; + Stream(VideoCore::QueryType::SamplesPassed).Update(regs.samplecnt_enable); + } } /// Resets a counter to zero. It doesn't disable the query after resetting. |