[Bug 89580] Implement a NIR -> vec4 pass

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jul 13 23:57:52 PDT 2015


--- Comment #31 from Iago Toral <itoral at igalia.com> ---
(In reply to Kenneth Graunke from comment #30)
> Hi Eduardo, Antía,
> FYI, I've mostly gotten SIMD8 Geometry Shaders (new on Broadwell) working -
> which is the first backend using NIR for geometry shaders.
> You can find my work-in-progress branch here:
> http://cgit.freedesktop.org/~kwg/mesa/log/?h=simd8gs
> I've done things a little differently than the old vec4 backend - namely, I
> moved the vertex count (how many times EmitVertex() has been called) into
> NIR, introducing new intrinsics.
> My thinking is that NIR's optimizations should be able to constant
> fold/propagate the counter values, so in common/simple cases, NIR will
> simply eliminate the "safety check" if statements, as they'll be if (true). 
> Knowing that the vertex count is an immediate may allow us to avoid
> per-slot-offset messages as well, and should also help us use the "Static
> Vertex Count" feature on Broadwell.
> It's not quite done yet: I haven't actually added code to do safety checks
> yet; there are a few Piglit regressions still, and a few tests try to use
> 700 registers for the payload data :)  But I figured I'd share it so you can
> see where I'm going with this, and in case you wanted to reuse the NIR
> intrinsics.

Hi Ken, thanks for sharing this early. Eduardo and Antia are on holidays this
week but they will look into this as soon as they are back.

Since the new lowering pass will lower all instances of
nir_intrinsic_emit_vertex to the new intrinsics we will have to adapt our GS
implementation. Our plan was to send a v2 of our patches next week which would
include support for vec4 GS using the old intrinsics, but seeing this maybe it
makes more sense to wait until your work gets merged. What do you think?

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150714/e8cb093a/attachment.html>

More information about the intel-3d-bugs mailing list