[Mesa-dev] [PATCH 09/10] i965: When only BFC is written, use BFC as the color.
Paul Berry
stereotype441 at gmail.com
Fri Sep 9 09:22:12 PDT 2011
On 8 September 2011 23:32, Eric Anholt <eric at anholt.net> wrote:
> Fixes piglit vertex-program-two-side back.
> ---
> src/mesa/drivers/dri/i965/gen6_sf_state.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c
> b/src/mesa/drivers/dri/i965/gen6_sf_state.c
> index bb8bc83..4482e9c 100644
> --- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
> +++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
> @@ -67,6 +67,15 @@ get_attr_override(struct brw_vue_map *vue_map, int
> urb_entry_read_offset,
>
> /* Find the VUE slot for this attribute. */
> slot = vue_map->vert_result_to_slot[vs_attr];
> +
> + /* If there was only a back color written but not front, use back
> + * as the color instead of undefined
> + */
> + if (slot == -1 && vs_attr == VERT_RESULT_COL0)
> + slot = vue_map->vert_result_to_slot[VERT_RESULT_BFC0];
> + if (slot == -1 && vs_attr == VERT_RESULT_COL1)
> + slot = vue_map->vert_result_to_slot[VERT_RESULT_BFC1];
> +
> if (slot == -1) {
> /* This attribute does not exist in the VUE--that means that the
> vertex
> * shader did not write to it. Behavior is undefined in this case,
> so
> --
> 1.7.5.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
For Gen4 and Gen5, I believe that analogous logic has to be added to added
to brw_sf_emit.c.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110909/33acdc49/attachment-0001.htm>
More information about the mesa-dev
mailing list