diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-12-27 22:40:28 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-01-03 22:29:16 +0100 |
commit | b62ffb612dbd672371d163e3b511e81f0c2282e6 (patch) | |
tree | 4bf1cf1172e12db339f63ac750b3a5dbde561ef8 /src/video_core/renderer_vulkan/vk_state_tracker.cpp | |
parent | vulkan_common: blacklist radv from extended_dynamic_state2 on drivers before 22.3.1 (diff) | |
download | yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.tar yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.tar.gz yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.tar.bz2 yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.tar.lz yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.tar.xz yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.tar.zst yuzu-b62ffb612dbd672371d163e3b511e81f0c2282e6.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_state_tracker.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_state_tracker.cpp | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/video_core/renderer_vulkan/vk_state_tracker.cpp b/src/video_core/renderer_vulkan/vk_state_tracker.cpp index bfea503de..e5cf97472 100644 --- a/src/video_core/renderer_vulkan/vk_state_tracker.cpp +++ b/src/video_core/renderer_vulkan/vk_state_tracker.cpp @@ -33,6 +33,9 @@ Flags MakeInvalidationFlags() { BlendConstants, DepthBounds, StencilProperties, + StencilReference, + StencilWriteMask, + StencilCompare, LineWidth, CullMode, DepthBoundsEnable, @@ -99,14 +102,17 @@ void SetupDirtyDepthBounds(Tables& tables) { } void SetupDirtyStencilProperties(Tables& tables) { - auto& table = tables[0]; - table[OFF(stencil_two_side_enable)] = StencilProperties; - table[OFF(stencil_front_ref)] = StencilProperties; - table[OFF(stencil_front_mask)] = StencilProperties; - table[OFF(stencil_front_func_mask)] = StencilProperties; - table[OFF(stencil_back_ref)] = StencilProperties; - table[OFF(stencil_back_mask)] = StencilProperties; - table[OFF(stencil_back_func_mask)] = StencilProperties; + const auto setup = [&](size_t position, u8 flag) { + tables[0][position] = flag; + tables[1][position] = StencilProperties; + }; + tables[0][OFF(stencil_two_side_enable)] = StencilProperties; + setup(OFF(stencil_front_ref), StencilReference); + setup(OFF(stencil_front_mask), StencilWriteMask); + setup(OFF(stencil_front_func_mask), StencilCompare); + setup(OFF(stencil_back_ref), StencilReference); + setup(OFF(stencil_back_mask), StencilWriteMask); + setup(OFF(stencil_back_func_mask), StencilCompare); } void SetupDirtyLineWidth(Tables& tables) { @@ -238,9 +244,11 @@ void StateTracker::ChangeChannel(Tegra::Control::ChannelState& channel_state) { void StateTracker::InvalidateState() { flags->set(); + current_topology = INVALID_TOPOLOGY; + stencil_reset = true; } StateTracker::StateTracker() : flags{&default_flags}, default_flags{}, invalidation_flags{MakeInvalidationFlags()} {} -} // namespace Vulkan +} // namespace Vulkan
\ No newline at end of file |