From 7b33e163b900aacc4a82cf0a409536c047100303 Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 6 Dec 2015 10:17:47 -0500 Subject: GPU/PrimitiveAssembler: Fixed drawing triangle fans. It was skipping the second vertex assignment and using uninitialized garbage when assembling the corresponding triangle. --- src/video_core/primitive_assembly.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/primitive_assembly.cpp b/src/video_core/primitive_assembly.cpp index 44a8dbfe9..d5a0a96a4 100644 --- a/src/video_core/primitive_assembly.cpp +++ b/src/video_core/primitive_assembly.cpp @@ -39,13 +39,12 @@ void PrimitiveAssembler::SubmitVertex(VertexType& vtx, TriangleHandl buffer[buffer_index] = vtx; - if (topology == Regs::TriangleTopology::Strip) { - strip_ready |= (buffer_index == 1); + strip_ready |= (buffer_index == 1); + + if (topology == Regs::TriangleTopology::Strip) buffer_index = !buffer_index; - } else if (topology == Regs::TriangleTopology::Fan) { + else if (topology == Regs::TriangleTopology::Fan) buffer_index = 1; - strip_ready = true; - } break; default: -- cgit v1.2.3