diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index b5ca090dc4..9a3ee27ed3 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -895,6 +895,14 @@ void DrawEngineVulkan::DoFlush() { params.allowSeparateAlphaClear = false; params.provokeFlatFirst = true; + // We need to update the viewport early because it's checked for flipping in SoftwareTransform. + // We don't have a "DrawStateEarly" in vulkan, so... + // TODO: Probably should eventually refactor this and feed the vp size into SoftwareTransform directly (Unknown's idea). + if (gstate_c.IsDirty(DIRTY_VIEWPORTSCISSOR_STATE)) { + gstate_c.vpWidth = gstate.getViewportXScale() * 2.0f; + gstate_c.vpHeight = gstate.getViewportYScale() * 2.0f; + } + int maxIndex = indexGen.MaxIndex(); SoftwareTransform( prim, indexGen.VertexCount(),