mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
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:
parent
2be7c3e780
commit
ff8c0c9a35
1 changed files with 4 additions and 1 deletions
|
|
@ -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--;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue