From b066d51dfa03b960028fc6f88c8de133eb6db1da Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 22 Oct 2016 20:50:36 +1000 Subject: Vulkan: Remove parameters/members of single-instance classes There's not a lot of point in passing these around or storing them (texture cache/state tracker mainly) as there will only ever be a single instance of the class. Also adds downcast helpers such as Vulkan::Renderer::GetInstance(). --- Source/Core/VideoBackends/Vulkan/Util.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Source/Core/VideoBackends/Vulkan/Util.cpp') diff --git a/Source/Core/VideoBackends/Vulkan/Util.cpp b/Source/Core/VideoBackends/Vulkan/Util.cpp index 9ef432d779..2e8025dbc1 100644 --- a/Source/Core/VideoBackends/Vulkan/Util.cpp +++ b/Source/Core/VideoBackends/Vulkan/Util.cpp @@ -195,13 +195,12 @@ void BufferMemoryBarrier(VkCommandBuffer command_buffer, VkBuffer buffer, &buffer_info, 0, nullptr); } -void ExecuteCurrentCommandsAndRestoreState(StateTracker* state_tracker, bool execute_off_thread, - bool wait_for_completion) +void ExecuteCurrentCommandsAndRestoreState(bool execute_off_thread, bool wait_for_completion) { - state_tracker->EndRenderPass(); + StateTracker::GetInstance()->EndRenderPass(); g_command_buffer_mgr->ExecuteCommandBuffer(execute_off_thread, wait_for_completion); - state_tracker->InvalidateDescriptorSets(); - state_tracker->SetPendingRebind(); + StateTracker::GetInstance()->InvalidateDescriptorSets(); + StateTracker::GetInstance()->SetPendingRebind(); } VkShaderModule CreateShaderModule(const u32* spv, size_t spv_word_count) -- cgit v1.2.3