[Mesa-dev] [PATCH 02/36] i965: Write code to compute a VUE map.

Eric Anholt eric at anholt.net
Fri Sep 2 12:47:48 PDT 2011


On Fri,  2 Sep 2011 09:06:41 -0700, Paul Berry <stereotype441 at gmail.com> wrote:
> Several places in the i965 code make implicit assumptions about the
> structure of data in the VUE (vertex URB entry).  This patch adds a
> function, brw_compute_vue_map(), which computes the structure of the
> VUE explicitly.  Future patches will modify the rest of the driver to
> use the explicitly computed map rather than rely on implicit
> assumptions about it.
> ---
> +      if (two_side_color) {
> +         /* front and back colors need to be consecutive */
> +         if ((outputs_written & BITFIELD64_BIT(VERT_RESULT_COL1)) &&
> +             (outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC1))) {
> +            assert(outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0));
> +            assert(outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0));
> +            assign_vue_slot(vue_map, VERT_RESULT_COL0);
> +            assign_vue_slot(vue_map, VERT_RESULT_BFC0);
> +            assign_vue_slot(vue_map, VERT_RESULT_COL1);
> +            assign_vue_slot(vue_map, VERT_RESULT_BFC1);
> +         } else if ((outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0)) &&
> +                    (outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0))) {
> +            assign_vue_slot(vue_map, VERT_RESULT_COL0);
> +            assign_vue_slot(vue_map, VERT_RESULT_BFC0);
> +         }

This looks like you could move the else if () up above and drop the
COL0/BFC0 concerns from the COL1/BFC1 path. (and then I don't have to
think about what can generates COL1/BFC1 and whether the asserts are
valid).
-------------- 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/20110902/697f8b9a/attachment.pgp>


More information about the mesa-dev mailing list