[Mesa-dev] [PATCH v2 8/8] i965 gen6: Implement pass-through GS for transform feedback.

Eric Anholt eric at anholt.net
Wed Dec 7 13:32:42 PST 2011


On Wed,  7 Dec 2011 11:09:16 -0800, Paul Berry <stereotype441 at gmail.com> wrote:
> In Gen6, transform feedback is accomplished by having the geometry
> shader send vertex data to the data port using "Streamed Vertex Buffer
> Write" messages, while simultaneously passing vertices through to the
> rest of the graphics pipeline (if rendering is enabled).

> +   if (intel->gen >= 7) {
> +      /* On Gen7 and later, we don't use GS (yet). */
> +      key->need_gs_prog = false;
> +   } else if (intel->gen == 6) {
> +      /* On Gen6, GS is used for transform feedback. */
> +      key->need_gs_prog = ctx->TransformFeedback.CurrentObject->Active;

I like to see state accesses associated with a flag having a comment
like /* _NEW_TRANSFORM_FEEDBACK */ right above them.  This means that
when you're trying to manually check that state flags are correct, you
can do one scan of the code looking to see if the nearest /*
_NEW_WHATEVER */ comment is the right thing for each piece of state
being accessed, and another pass to go find the state atom and make sure
that every _NEW_WHATEVER comment in its update function is reflected in
it.

It's messy, but without some other free-per-draw-call way to get the
flags next to the code, this is the only way I've found to keep some
sanity while trying to debug statechanges.  Maybe when we build the
valgrind tool I'll stop caring.

I haven't reviewed the rest of these changes, but they're generally:

Acked-by: Eric Anholt <eric at anholt.net>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20111207/3c4f8262/attachment-0001.pgp>


More information about the mesa-dev mailing list