swr: [rasterizer core] Faster modulo operator in ProcessVerts

Avoid % operator, since we know that curVertex is always incrementing.

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
Tim Rowley 2016-05-02 14:09:39 -06:00
parent 2be7c3e780
commit ff8c0c9a35

View file

@ -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--;
}