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:
@@ -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--;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user