diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-22 08:03:27 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-06-27 01:57:22 +0200 |
commit | c94b398f14c05697dc9cbb79aa31601b2ad0d70e (patch) | |
tree | c7002ea49c330e03ad6c5dae7311d6450a4ea2ae /src/video_core/renderer_vulkan/vk_state_tracker.h | |
parent | renderer_vulkan/wrapper: Add VK_EXT_extended_dynamic_state functions (diff) | |
download | yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.tar yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.tar.gz yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.tar.bz2 yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.tar.lz yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.tar.xz yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.tar.zst yuzu-c94b398f14c05697dc9cbb79aa31601b2ad0d70e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_state_tracker.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_state_tracker.h b/src/video_core/renderer_vulkan/vk_state_tracker.h index 03bc415b2..54ca0d6c6 100644 --- a/src/video_core/renderer_vulkan/vk_state_tracker.h +++ b/src/video_core/renderer_vulkan/vk_state_tracker.h @@ -26,6 +26,16 @@ enum : u8 { DepthBounds, StencilProperties, + CullMode, + DepthBoundsEnable, + DepthTestEnable, + DepthWriteEnable, + DepthCompareOp, + FrontFace, + PrimitiveTopology, + StencilOp, + StencilTestEnable, + Last }; static_assert(Last <= std::numeric_limits<u8>::max()); @@ -64,6 +74,46 @@ public: return Exchange(Dirty::StencilProperties, false); } + bool TouchCullMode() { + return Exchange(Dirty::CullMode, false); + } + + bool TouchDepthBoundsTestEnable() { + return Exchange(Dirty::DepthBoundsEnable, false); + } + + bool TouchDepthTestEnable() { + return Exchange(Dirty::DepthTestEnable, false); + } + + bool TouchDepthBoundsEnable() { + return Exchange(Dirty::DepthBoundsEnable, false); + } + + bool TouchDepthWriteEnable() { + return Exchange(Dirty::DepthWriteEnable, false); + } + + bool TouchDepthCompareOp() { + return Exchange(Dirty::DepthCompareOp, false); + } + + bool TouchFrontFace() { + return Exchange(Dirty::FrontFace, false); + } + + bool TouchPrimitiveTopology() { + return Exchange(Dirty::PrimitiveTopology, false); + } + + bool TouchStencilOp() { + return Exchange(Dirty::StencilOp, false); + } + + bool TouchStencilTestEnable() { + return Exchange(Dirty::StencilTestEnable, false); + } + private: bool Exchange(std::size_t id, bool new_value) const noexcept { auto& flags = system.GPU().Maxwell3D().dirty.flags; |