On 22 December 2011 16:54, Eric Anholt <span dir="ltr">&lt;<a href="mailto:eric@anholt.net">eric@anholt.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fixes the piglit discard-* tests.<br>
<br>
Reviewed-by: Kenneth Graunke &lt;<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>&gt;<br>
---<br>
 src/mesa/drivers/dri/i965/gen7_sol_state.c |    8 +++++++-<br>
 1 files changed, 7 insertions(+), 1 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c<br>
index fcda08d..650f625 100644<br>
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c<br>
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c<br>
@@ -37,6 +37,12 @@ static void<br>
 upload_sol_state(struct brw_context *brw)<br>
 {<br>
    struct intel_context *intel = &amp;brw-&gt;intel;<br>
+   struct gl_context *ctx = &amp;intel-&gt;ctx;<br>
+   uint32_t dw1 = 0;<br>
+<br>
+   /* _NEW_RASTERIZER_DISCARD */<br>
+   if (ctx-&gt;RasterDiscard)<br>
+      dw1 |= SO_RENDERING_DISABLE;<br></blockquote><div><br>It looks like dw1 is set here but not used until patch 6/7.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
    /* Disable the SOL stage */<br>
    BEGIN_BATCH(3);<br>
@@ -48,7 +54,7 @@ upload_sol_state(struct brw_context *brw)<br>
<br>
 const struct brw_tracked_state gen7_sol_state = {<br>
    .dirty = {<br>
-      .mesa  = 0,<br>
+      .mesa  = _NEW_RASTERIZER_DISCARD,<br>
       .brw   = BRW_NEW_BATCH,<br>
       .cache = 0,<br>
    },<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.7.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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>
</font></span></blockquote></div><br>