summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/pa.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/pa.h b/src/gallium/drivers/swr/rasterizer/core/pa.h
index d3ed279dedf..eb8403c9261 100644
--- a/src/gallium/drivers/swr/rasterizer/core/pa.h
+++ b/src/gallium/drivers/swr/rasterizer/core/pa.h
@@ -508,7 +508,10 @@ struct PA_STATE_CUT : public PA_STATE
(this->*pfnPa)(this->curVertex, false);
}
- this->curVertex = (this->curVertex + 1) % this->numVerts;
+ this->curVertex++;
+ if (this->curVertex >= this->numVerts) {
+ this->curVertex = 0;
+ }
this->numRemainingVerts--;
}