On 7 December 2011 13:32, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net">eric@anholt.net</a>></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;">
<div class="im">On Wed, 7 Dec 2011 11:09:16 -0800, Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>> wrote:<br>
> In Gen6, transform feedback is accomplished by having the geometry<br>
> shader send vertex data to the data port using "Streamed Vertex Buffer<br>
> Write" messages, while simultaneously passing vertices through to the<br>
> rest of the graphics pipeline (if rendering is enabled).<br>
<br>
</div><div class="im">> + if (intel->gen >= 7) {<br>
> + /* On Gen7 and later, we don't use GS (yet). */<br>
> + key->need_gs_prog = false;<br>
> + } else if (intel->gen == 6) {<br>
> + /* On Gen6, GS is used for transform feedback. */<br>
> + key->need_gs_prog = ctx->TransformFeedback.CurrentObject->Active;<br>
<br>
</div>I like to see state accesses associated with a flag having a comment<br>
like /* _NEW_TRANSFORM_FEEDBACK */ right above them. This means that<br>
when you're trying to manually check that state flags are correct, you<br>
can do one scan of the code looking to see if the nearest /*<br>
_NEW_WHATEVER */ comment is the right thing for each piece of state<br>
being accessed, and another pass to go find the state atom and make sure<br>
that every _NEW_WHATEVER comment in its update function is reflected in<br>
it.<br>
<br>
It's messy, but without some other free-per-draw-call way to get the<br>
flags next to the code, this is the only way I've found to keep some<br>
sanity while trying to debug statechanges. Maybe when we build the<br>
valgrind tool I'll stop caring.<br></blockquote><div><br>No need to explain, I'm 100% with you on this practice. It was simple oversight that prevented me from doing it here. I'll fix it before pushing the patches.<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>
I haven't reviewed the rest of these changes, but they're generally:<br>
<br>
Acked-by: Eric Anholt <<a href="mailto:eric@anholt.net">eric@anholt.net</a>><br>
<br>
</blockquote></div><br>