Apply viewport before SoftwareTransform so flipping can be checked

This commit is contained in:
Henrik Rydgård committed 2020-01-26 15:30:20 +01:00
1 parent 3aa575daef
commit 92a1395cd0
1 file changed
+8
+8
View File
@@ -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(),