From 2e073288785ce231bfb9b880bddc116b319c0d38 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 8 Jan 2024 22:39:01 +1000 Subject: [PATCH] GS: Skip vertex append for GS_INVALID PRIM --- pcsx2/GS/GSState.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pcsx2/GS/GSState.cpp b/pcsx2/GS/GSState.cpp index fe1356d8c2..8d7149fae3 100644 --- a/pcsx2/GS/GSState.cpp +++ b/pcsx2/GS/GSState.cpp @@ -3337,6 +3337,12 @@ __forceinline void GSState::VertexKick(u32 skip) pxAssert(m_vertex.tail < m_vertex.maxcount + 3); + if constexpr (prim == GS_INVALID) + { + m_vertex.tail = m_vertex.head; + return; + } + if (auto_flush && skip == 0 && m_index.tail > 0 && ((m_vertex.tail + 1) - m_vertex.head) >= n) { HandleAutoFlush(); @@ -3454,7 +3460,6 @@ __forceinline void GSState::VertexKick(u32 skip) case GS_LINELIST: case GS_TRIANGLELIST: case GS_SPRITE: - case GS_INVALID: m_vertex.tail = head; // no need to check or grow the buffer length break; case GS_LINESTRIP: @@ -3561,9 +3566,6 @@ __forceinline void GSState::VertexKick(u32 skip) m_vertex.next = head + 2; m_index.tail += 2; break; - case GS_INVALID: - m_vertex.tail = head; - return; default: ASSUME(0); }