diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-12 02:24:45 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-09-06 10:28:48 +0200 |
commit | 9e871937250cb92a13336c6c06186c41f19e1738 (patch) | |
tree | 5151b85f8c4c26e7a5971b32584723f9910ea67b /src/video_core/renderer_vulkan/vk_state_tracker.h | |
parent | Merge pull request #4596 from FearlessTobi/port-5495 (diff) | |
download | yuzu-9e871937250cb92a13336c6c06186c41f19e1738.tar yuzu-9e871937250cb92a13336c6c06186c41f19e1738.tar.gz yuzu-9e871937250cb92a13336c6c06186c41f19e1738.tar.bz2 yuzu-9e871937250cb92a13336c6c06186c41f19e1738.tar.lz yuzu-9e871937250cb92a13336c6c06186c41f19e1738.tar.xz yuzu-9e871937250cb92a13336c6c06186c41f19e1738.tar.zst yuzu-9e871937250cb92a13336c6c06186c41f19e1738.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_state_tracker.h')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_state_tracker.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/vk_state_tracker.h b/src/video_core/renderer_vulkan/vk_state_tracker.h index 13a6ce786..1de789e57 100644 --- a/src/video_core/renderer_vulkan/vk_state_tracker.h +++ b/src/video_core/renderer_vulkan/vk_state_tracker.h @@ -45,11 +45,12 @@ class StateTracker { using Maxwell = Tegra::Engines::Maxwell3D::Regs; public: - explicit StateTracker(Core::System& system); + explicit StateTracker(Tegra::GPU& gpu); - void Initialize(); - - void InvalidateCommandBufferState(); + void InvalidateCommandBufferState() { + flags |= invalidation_flags; + current_topology = INVALID_TOPOLOGY; + } bool TouchViewports() { return Exchange(Dirty::Viewports, false); @@ -121,13 +122,12 @@ private: static constexpr auto INVALID_TOPOLOGY = static_cast<Maxwell::PrimitiveTopology>(~0u); bool Exchange(std::size_t id, bool new_value) const noexcept { - auto& flags = system.GPU().Maxwell3D().dirty.flags; const bool is_dirty = flags[id]; flags[id] = new_value; return is_dirty; } - Core::System& system; + Tegra::Engines::Maxwell3D::DirtyState::Flags& flags; Tegra::Engines::Maxwell3D::DirtyState::Flags invalidation_flags; Maxwell::PrimitiveTopology current_topology = INVALID_TOPOLOGY; }; |