<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement a NIR -> vec4 pass"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89580#c31">Comment # 31</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Implement a NIR -> vec4 pass"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89580">bug 89580</a>
              from <span class="vcard"><a class="email" href="mailto:itoral@igalia.com" title="Iago Toral <itoral@igalia.com>"> <span class="fn">Iago Toral</span></a>
</span></b>
        <pre>(In reply to Kenneth Graunke from <a href="show_bug.cgi?id=89580#c30">comment #30</a>)
<span class="quote">> 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:
> <a href="http://cgit.freedesktop.org/~kwg/mesa/log/?h=simd8gs">http://cgit.freedesktop.org/~kwg/mesa/log/?h=simd8gs</a>

> 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.</span >

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?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>