diff options
author | Roland Scheidegger <[email protected]> | 2016-02-02 03:14:12 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2016-02-02 05:58:19 +0100 |
commit | 99bd96abbb62d2c7da60c6102661b590e05bf143 (patch) | |
tree | ed128f45e7229828971e311fbffc469ceb6c60a9 /src/gallium/Makefile.am | |
parent | 9d2a34e1054370663de06124aa1bc6282b450fe1 (diff) |
llvmpipe: drop scissor planes early if the tri is fully inside them
If the tri is fully inside a scissor edge (or rather, we just use the
bounding box of the tri for the comparison), then we can drop these
additional scissor "planes" early. We do not even need to allocate
space for them in the tri.
The math actually appears to be slightly iffy due to bounding boxes
being rounded, but it doesn't matter in the end.
Those scissor rects are costly - the 4 planes from the scissor are
already more expensive to calculate than the 3 planes from the tri itself,
and it also prevents us from using the specialized raster code for small
tris.
This helps openarena performance by about 8% or so. Of course, it helps
there that while openarena often enables scissoring (and even moves the
scissor rect around) I have not seen a single tri actually hit the
scissor rect, ever.
v2: drop individual scissor edges, and do it earlier, not even allocating
space for them.
v3: help the compiler a bit with simpler code, suggested by Brian.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/Makefile.am')
0 files changed, 0 insertions, 0 deletions