From 1f276fcc203b91eaa079712cb80ea39e4d0dc3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 16 Aug 2022 21:42:03 +0200 Subject: [PATCH] Vulkan: Restore a minor old forgotten optimization --- GPU/Vulkan/DrawEngineVulkan.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index e50e6477ba..7be943ed63 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -531,10 +531,6 @@ void DrawEngineVulkan::DoFlush() { gpuStats.numFlushes++; - // TODO: Needs to be behind a check for changed render pass, at an appropriate time in this function. - // Similar issues as with the lastRenderStepId_ check. Will need a bit of a rethink. - lastPipeline_ = nullptr; - // If have a new render pass, dirty our dynamic state so it gets re-set. // We have to do this again after the last possible place in DoFlush that can cause a renderpass switch // like a shader blend blit or similar. But before we actually set the state! @@ -544,6 +540,7 @@ void DrawEngineVulkan::DoFlush() { gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE | DIRTY_DEPTHSTENCIL_STATE | DIRTY_BLEND_STATE | DIRTY_TEXTURE_IMAGE | DIRTY_TEXTURE_PARAMS); textureCache_->ForgetLastTexture(); lastRenderStepId_ = curRenderStepId; + lastPipeline_ = nullptr; } bool tess = gstate_c.submitType == SubmitType::HW_BEZIER || gstate_c.submitType == SubmitType::HW_SPLINE;