[Mesa-dev] Geometry shader update

Paul Berry stereotype441 at gmail.com
Thu Mar 28 10:08:38 PDT 2013


It's been about two months since I talked on the mailing list about my
progress in implementing geometry shaders (
http://lists.freedesktop.org/archives/mesa-dev/2013-January/033725.html),
so it seems like a good time to give an update.  Also I have some happy
progress to report :)

In mid-February I added about 1800 geometry shader tests cases to Piglit.
Those tests exercise basic geometry shader functionality (input a single
triangle, output a single triangle), and then exhaustively test all of the
built-in GLSL functions and operators inside of the geometry shader.

Then I rebased Bryan Cain's front-end patches onto Mesa master, made a
minor bug fix or two, and spent the next month and a half beginning to
implement a geometry shader back-end for i965 Gen7 (Ivy Bridge).  I'm happy
to report that as of this morning, my work-in-progress back-end, combined
with Bryan's front-end, passes all the piglit tests I introduced in
mid-February.  You can find my patch series in branch "gs" of git://
github.com/stereotype441/mesa.git.  Warning: that branch is *highly*
volatile and in need of some tender loving rebasing--it's not ready for
review yet.  If anyone needs a less volatile branch to base some work on,
please let me know so we can coordinate.

This is substantial progress and definitely a reason to celebrate, but
there is still a lot of work to do before we can expose
ARB/EXT_geometry_shader4 support on i965 Gen7, mostly in the back end.
Here's an incomplete list that hopefully touches all the major points (I
have a much longer list in my notes):

- gl_PrimitiveIDIn support (requires special back-end code because it is
not part of the vertex URB entry on i965)
- gl_PointSize and, gl_ClipVertex support (i965 emits special VS code to
handle these values--when a GS is present, that code has to be disabled in
the VS)
- Sampler support
- Interactions with transform feedback, particularly the
GL_PRIMITIVES_GENERATED and GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
queries (I believe Kenneth Graunke may be planning to work on this)
- gl_Layer support (includes both back-end and front-end work.  I believe
Jordan Justen is planning to work on this)
- Support for EndPrimitive()
- Precompilation
- SINGLE dispatch mode (an alternate SIMD mode for i965 Gen7 that needs to
be used for complex geometry shaders to avoid running out of registers)

I don't want to land any patches until there are adequate piglit tests for
them, so my next order of business is to write additional tests to exercise
corner cases of the ARB/EXT_geometry_shader4 spec.  Once those are
complete, I will start sending out my rebase of Bryan Cain's front-end
patch series for review.  After Bryan's series has landed, I'll start
sending out the i965 Gen7 back-end for review.

If all goes well, my hope is that Kenneth's work on transform feedback and
Jordan's work on gl_Layer will finish up at around the same time as I'm
landing my i965 Gen7 back-end work.  Once all that happens, we'll be able
to turn on the ARB/EXT_geometry_shader4 extension on i965 Gen7.

Once that extension is on, I plan to move on to Gen6 (Sandy Bridge)
support, and support for GLSL 1.50-style geometry shaders.

Cheers,

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130328/b76e458e/attachment.html>


More information about the mesa-dev mailing list