<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 4, 2013 at 2:33 PM, Stéphane Marchesin <span dir="ltr"><<a href="mailto:stephane.marchesin@gmail.com" target="_blank">stephane.marchesin@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="im">On Wed, Sep 4, 2013 at 12:46 PM, Zack Rusin <span dir="ltr"><<a href="mailto:zackr@vmware.com" target="_blank">zackr@vmware.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif">


<div>Hi, <span style="font-family:Helvetica,Arial,sans-serif">Stéphane.</span></div><div><span style="font-family:Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-family:Helvetica,Arial,sans-serif">No we should not revert to the old behavior. The old behavior was incorrect. Consider this:</span></div>


<div><span style="font-family:Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-family:Helvetica,Arial,sans-serif">-- setup state that draws a wireframe -> draw should inject frontface</span></div><div>


<span style="font-family:Helvetica,Arial,sans-serif">-- the driver needs to be able to find the injected wireframe output</span></div><div><span style="font-family:Helvetica,Arial,sans-serif">-- draw</span></div><div><span style="font-family:Helvetica,Arial,sans-serif">-- setup state the draws solid fill with fragment shader using primid input -> draw should inject primid but not frontface</span></div>


<div><span style="font-family:Helvetica,Arial,sans-serif">-- driver needs to be able to find the injected primid but not frontface info</span></div><div><span style="font-family:Helvetica,Arial,sans-serif">-- draw</span></div>


<div><span style="font-family:Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-family:Helvetica,Arial,sans-serif">Without cleaning the attributed before the second draw the draw will keep the frontface id in the extra attribs, incorrectly pointing the driver to a non-existing crash. That's why the attribs need to be cleaned before rendering.</span></div>


</div></div></blockquote><div><br></div></div><div>Hmm good point. I don't care about primid at all in i915 so it didn't occur to me :)</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif"><div><span style="font-family:Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-family:Helvetica,Arial,sans-serif">i915g simply shouldn't call draw_prepare_shader_outputs because it doesn't know what to do with the injected front-face or primid anyway. That part I'd suggest you remove. It will get you back to the old behavior.</span></div>


</div></div></blockquote><div><br></div></div><div>Yup that does the trick, thanks!</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span></div></div></div></blockquote><div><br></div><div>Hmm, it seems like we should do the same for r300, as it doesn't use PRIMID either. CC'd Marek.</div>

<div><br></div><div>Stéphane</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div>

</div><div>Stéphane</div></font></span><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div><div style="font-size:12pt;font-family:'times new roman','new york',times,serif"><div><span style="font-family:Helvetica,Arial,sans-serif"><br></span></div><div><span style="font-family:Helvetica,Arial,sans-serif">z</span></div>


<div><br></div><hr><div><div><blockquote style="padding-left:5px;font-size:12pt;font-style:normal;margin-left:5px;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal;border-left-width:2px;border-left-style:solid;border-left-color:rgb(16,16,255)">


<div dir="ltr">Hi Zack,<div><br></div><div>This change regresses a bunch of point sprite piglit tests on i915g. Should we revert back to the old behaviour? As far as I can see, it was correct (it was keeping the attributes in case another stage is using them).</div>


<div><br></div><div>Stéphane</div><div><br><div class="gmail_extra"><br><div><br></div><div class="gmail_quote">On Thu, Aug 8, 2013 at 12:46 PM, Zack Rusin <span dir="ltr"><<a href="mailto:zackr@vmware.com" target="_blank">zackr@vmware.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Before inserting new front face and prim id outputs cleanup<br>


 the old extra outputs, otherwise our cache will use previous<br> output slots which will break as soon as outputs of the current<br> shader don't match the last.<br> <br> Signed-off-by: Zack Rusin <<a href="mailto:zackr@vmware.com" target="_blank">zackr@vmware.com</a>><br>


 ---<br>  src/gallium/auxiliary/draw/draw_context.c |    1 +<br>  1 file changed, 1 insertion(+)<br> <br> diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c<br> index af9caee..2dc6772 100644<br>


 --- a/src/gallium/auxiliary/draw/draw_context.c<br> +++ b/src/gallium/auxiliary/draw/draw_context.c<br> @@ -555,6 +555,7 @@ draw_get_shader_info(const struct draw_context *draw)<br>  void<br>  draw_prepare_shader_outputs(struct draw_context *draw)<br>


  {<br> +   draw_remove_extra_vertex_attribs(draw);<br>     draw_ia_prepare_outputs(draw, draw->pipeline.ia);<br>     draw_unfilled_prepare_outputs(draw, draw->pipeline.unfilled);<br>  }<br> <span><span color="#888888" style="color:rgb(136,136,136)">--<br>


 1.7.10.4<br> _______________________________________________<br> mesa-dev mailing list<br> <a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>


 </span></span></blockquote></div><br></div></div></div></blockquote><div><br></div></div></div></div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div></div>