[Mesa-dev] begin/end and dlists cleanup

Eric Anholt eric at anholt.net
Fri Jan 18 14:30:35 PST 2013

I've been irritated by the ASSERT_OUTSIDE_BEGIN_END macro for years -- we have
dispatch tables, and we can use those to micro-optimize most Mesa entrypoints.
It turns out we can cut 175 lines of code from doing so, and I suspect we had
many more places that needed ASSERT_OUTSIDE_BEGIN_END which nobody had

In the process, since I had to almost understand display lists in Mesa in
order to be satisfied that this change worked, I found giant piles of other
code we could remove.

I found no significant performance difference on GLbenchmark 2.1 offscreen
(n=8, which is small but the stddev was ~.1%, though for some reason both
before and after were stuck at 2/3 of the max performance I've seen).
However, at a net -1361 lines of code and -34k of text segment size on a
release build, I'm still quite happy with the result.

More information about the mesa-dev mailing list