On Fri,  2 Sep 2011 09:06:41 -0700, Paul Berry <stereotype...@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).

Attachment: pgp3fADDge0eG.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to