<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><div>It's been about two months since I talked on the mailing list about my progress in implementing geometry shaders (<a href="http://lists.freedesktop.org/archives/mesa-dev/2013-January/033725.html">http://lists.freedesktop.org/archives/mesa-dev/2013-January/033725.html</a>), so it seems like a good time to give an update.  Also I have some happy progress to report :)<br>
<br></div>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.<br>
<br></div>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://<a href="http://github.com/stereotype441/mesa.git">github.com/stereotype441/mesa.git</a>.  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.<br>
<br>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):<br>
<br>- gl_PrimitiveIDIn support (requires special back-end code because it is not part of the vertex URB entry on i965)<br></div></div></div><div>- 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)<br>
</div>- Sampler support<br></div>- 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)<br>
</div><div>- gl_Layer support (includes both back-end and front-end work.  I believe Jordan Justen is planning to work on this)<br></div>- Support for EndPrimitive()<br></div></div>- Precompilation<br></div><div>- 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)<br>
</div><br>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.<br>
</div><br></div>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.<br>
<br></div>Once that extension is on, I plan to move on to Gen6 (Sandy Bridge) support, and support for GLSL 1.50-style geometry shaders.<br><br></div>Cheers,<br><br>Paul<br></div>