diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-21 00:35:53 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 21:56:43 +0100 |
commit | 1bd95a314f07732319a71fca2aba81d400ca4c83 (patch) | |
tree | d524ce30dbcf56e26d3b0d93c07aa1715e372779 /src/video_core/renderer_vulkan/vk_scheduler.h | |
parent | gl_rasterizer: Remove num vertex buffers magic number (diff) | |
download | yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.tar yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.tar.gz yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.tar.bz2 yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.tar.lz yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.tar.xz yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.tar.zst yuzu-1bd95a314f07732319a71fca2aba81d400ca4c83.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_scheduler.h')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_scheduler.h | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/src/video_core/renderer_vulkan/vk_scheduler.h b/src/video_core/renderer_vulkan/vk_scheduler.h index 62fd7858b..c7cc291c3 100644 --- a/src/video_core/renderer_vulkan/vk_scheduler.h +++ b/src/video_core/renderer_vulkan/vk_scheduler.h @@ -17,6 +17,7 @@ namespace Vulkan { +class StateTracker; class VKDevice; class VKFence; class VKQueryCache; @@ -43,7 +44,8 @@ private: /// OpenGL-like operations on Vulkan command buffers. class VKScheduler { public: - explicit VKScheduler(const VKDevice& device, VKResourceManager& resource_manager); + explicit VKScheduler(const VKDevice& device, VKResourceManager& resource_manager, + StateTracker& state_tracker); ~VKScheduler(); /// Sends the current execution context to the GPU. @@ -74,36 +76,6 @@ public: query_cache = &query_cache_; } - /// Returns true when viewports have been set in the current command buffer. - bool TouchViewports() { - return std::exchange(state.viewports, true); - } - - /// Returns true when scissors have been set in the current command buffer. - bool TouchScissors() { - return std::exchange(state.scissors, true); - } - - /// Returns true when depth bias have been set in the current command buffer. - bool TouchDepthBias() { - return std::exchange(state.depth_bias, true); - } - - /// Returns true when blend constants have been set in the current command buffer. - bool TouchBlendConstants() { - return std::exchange(state.blend_constants, true); - } - - /// Returns true when depth bounds have been set in the current command buffer. - bool TouchDepthBounds() { - return std::exchange(state.depth_bounds, true); - } - - /// Returns true when stencil values have been set in the current command buffer. - bool TouchStencilValues() { - return std::exchange(state.stencil_values, true); - } - /// Send work to a separate thread. template <typename T> void Record(T&& command) { @@ -217,6 +189,8 @@ private: const VKDevice& device; VKResourceManager& resource_manager; + StateTracker& state_tracker; + VKQueryCache* query_cache = nullptr; vk::CommandBuffer current_cmdbuf; @@ -226,12 +200,6 @@ private: struct State { std::optional<vk::RenderPassBeginInfo> renderpass; vk::Pipeline graphics_pipeline; - bool viewports = false; - bool scissors = false; - bool depth_bias = false; - bool blend_constants = false; - bool depth_bounds = false; - bool stencil_values = false; } state; std::unique_ptr<CommandChunk> chunk; |