On Fri, Oct 11, 2013 at 11:04 AM, Paul Berry <[email protected]> wrote: > On 11 October 2013 05:43, Mike Lothian <[email protected]> wrote: >> >> Well done on getting this enabled >> >> Out of interest how far is SandyBridge from 3.2? > > I believe geometry shaders are all we would have to implement for Sandy > Bridge. Unfortunately, geometry shaders work pretty differently on Sandy > Bridge, so getting them to work won't be a slam dunk. Here's roughly what > would have to be done: > > 1. Start using Ivy Bridge/Haswell's "single dispatch" mode for geometry > shaders--this mode is more similar to how geometry shaders work on Sandy > Bridge than the "dual object dispatch" mode we're currently using. In > addition to paving the way for Sandy Bridge geometry shader sepport, there > are additional reasons why this is worth doing on Ivy Bridge and Haswell: > (a) it reduces register pressure, so it should yield better performance for > geometry shaders that would otherwise run out of registers, and (b) it > overlaps a lot with implementing instanced geometry shaders, a feature > required by ARB_gpu_shader5. > > 2. Ivy Bridge has fixed function hardware to buffer the geometry shader > outputs, decompose strips, and deliver the resulting primitives down the > pipeline one at a time. Sandy Bridge doesn't, so we'll need to adapt the > shader compilerback end to generate code that does this manually. > > 3. Ivy Bridge has fixed function hardware to do transform feedback. Sandy > Bridge doesn't; instead the driver generates an ad hoc geometry shader > program to do transform feedback when it's needed. When there's a > user-supplied geometry shader, this ad-hoc program will need to get merged > together with the user-supplied shader. > > 4. Once all that is done, it should be fairly straightforward to emit the > correct 3DSTATE_GS packet to turn on the geometry shader.
5. Convert surface state to use layer/miplevel for layered rendering support. (I guess I have a branch that almost enabled this for color textures on gen6.) BTW, to echo what several others have said ... great work on enabling GS! Series Reviewed-by: Jordan Justen <[email protected]> _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
