[Mesa-dev] Gen6+ hardware contexts & query object improvements

Kenneth Graunke kenneth at whitecape.org
Fri May 17 10:17:51 PDT 2013


Hello!

This patch series bumps the kernel requirement to 3.6 for Gen6+,
meaning that we actually get to rely on hardware context support.
That's a little painful, but even Debian ships 3.8 now, and this
isn't going to make it into an actual release for several more
months.

It then splits our query code into Gen4-5 and Gen6+ versions.  The new
Gen6+ version is a lot simpler since hardware contexts guarantee that
our statistics registers don't get polluted with data from other
programs running on the system.  It should be more efficient, which
may help games like Minecraft (though I haven't measured).

Finally, it implements the GL_PRIMITIVES_GENERATED and
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN queries via hardware counters
rather than manually counting on the CPU.  This paves the way for
geometry shader support (which can output multiple primitives, breaking
our CPU-side tracking), and should allow us to enable hardware primitive
restart in a few more cases once a few more things are tidied.

The next step is to eliminate the use of SOL reset and save/restore the
transform feedback offsets directly.  Then we can turn on hardware
primitive restart more aggressively and implement a few more transform
feedback extensions.

Thanks in advance for the review.

--Ken



More information about the mesa-dev mailing list