aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2019-01-03 20:30:30 +0100
committerStapleButter <thetotalworm@gmail.com>2019-01-03 20:30:30 +0100
commit1e35d18ce625161c10d9897b9fbedb7c865d5f3d (patch)
treedaa85481efd079205c4e210076757b5755888343 /src
parent4601636788524680ecd0da3a56c2e258c0f1ad5e (diff)
GX: polygon pipeline doesn't get as far if the polygon is rejected by culling/clipping.
Diffstat (limited to 'src')
-rw-r--r--src/GPU3D.cpp34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp
index bc2102a..a4d5015 100644
--- a/src/GPU3D.cpp
+++ b/src/GPU3D.cpp
@@ -981,20 +981,11 @@ void SubmitPolygon()
int prev, next;
// submitting a polygon starts the polygon pipeline
- if (nverts == 4)
- {
- PolygonPipeline = 35;
- VertexSlotCounter = 1;
- if (PolygonMode & 0x2) VertexSlotsFree = 0b11100;
- else VertexSlotsFree = 0b11110;
- }
- else
- {
- PolygonPipeline = 26;
- VertexSlotCounter = 1;
- if (PolygonMode & 0x2) VertexSlotsFree = 0b1000;
- else VertexSlotsFree = 0b1110;
- }
+ // noting that for now we are only reserving one vertex slot
+ // further slots only get reserved if the polygon makes it through culling/clipping
+ PolygonPipeline = 8;
+ VertexSlotCounter = 1;
+ VertexSlotsFree = 0b11110;
// culling
// TODO: work out how it works on the real thing
@@ -1102,6 +1093,21 @@ void SubmitPolygon()
// build the actual polygon
+ if (nverts == 4)
+ {
+ PolygonPipeline = 35;
+ VertexSlotCounter = 1;
+ if (PolygonMode & 0x2) VertexSlotsFree = 0b11100;
+ else VertexSlotsFree = 0b11110;
+ }
+ else
+ {
+ PolygonPipeline = 26;
+ VertexSlotCounter = 1;
+ if (PolygonMode & 0x2) VertexSlotsFree = 0b1000;
+ else VertexSlotsFree = 0b1110;
+ }
+
if (NumPolygons >= 2048 || NumVertices+nverts > 6144)
{
LastStripPolygon = NULL;