yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

GPU/PrimitiveAssembler: Fixed drawing triangle fans.

It was skipping the second vertex assignment and using uninitialized garbage when assembling the corresponding triangle.
This commit is contained in:
Subv 2015-12-06 10:17:47 -05:00
parent 644d1e7ca3
commit 7b33e163b9
1 changed files with 4 additions and 5 deletions

View File

@ -39,13 +39,12 @@ void PrimitiveAssembler<VertexType>::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: