Paul Berry <stereotype...@gmail.com> writes:

> This patch modifies post-GS pipeline stages (transform feedback, clip,
> sf, fs) to refer to the VUE map through brw->vue_map_geom_out rather
> than brw->vs.prog_data->vue_map.  This ensures that when geometry
> shader support is added, these pipeline stages will consult the
> geometry shader output VUE map when appropriate, rather than the
> vertex shader output VUE map.
> ---
>  src/mesa/drivers/dri/i965/brw_clip.c       |  7 +++----
>  src/mesa/drivers/dri/i965/brw_sf.c         |  7 +++----
>  src/mesa/drivers/dri/i965/brw_state.h      |  2 +-
>  src/mesa/drivers/dri/i965/brw_wm.c         |  6 +++---
>  src/mesa/drivers/dri/i965/gen6_sf_state.c  | 10 +++++-----
>  src/mesa/drivers/dri/i965/gen7_sf_state.c  |  8 ++++----
>  src/mesa/drivers/dri/i965/gen7_sol_state.c | 14 +++++++-------
>  7 files changed, 26 insertions(+), 28 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_clip.c 
> b/src/mesa/drivers/dri/i965/brw_clip.c
> index e20f7c2..bc0ebb5 100644
> --- a/src/mesa/drivers/dri/i965/brw_clip.c
> +++ b/src/mesa/drivers/dri/i965/brw_clip.c
> @@ -69,7 +69,7 @@ static void compile_clip_prog( struct brw_context *brw,
>     c.func.single_program_flow = 1;
>  
>     c.key = *key;
> -   c.vue_map = brw->vs.prog_data->vue_map;
> +   c.vue_map = *brw->vue_map_geom_out;
>  
>     /* nr_regs is the number of registers filled by reading data from the VUE.
>      * This program accesses the entire VUE, so nr_regs needs to be the size 
> of
> @@ -146,7 +146,7 @@ brw_upload_clip_prog(struct brw_context *brw)
>     /* BRW_NEW_REDUCED_PRIMITIVE */
>     key.primitive = brw->intel.reduced_primitive;
>     /* CACHE_NEW_VS_PROG (also part of VUE map) */
> -   key.attrs = brw->vs.prog_data->vue_map.slots_valid;
> +   key.attrs = brw->vue_map_geom_out->slots_valid;
>     /* _NEW_LIGHT */
>     key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
>     key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
> @@ -258,8 +258,7 @@ const struct brw_tracked_state brw_clip_prog = {
>               _NEW_TRANSFORM |
>               _NEW_POLYGON | 
>               _NEW_BUFFERS),
> -      .brw   = (BRW_NEW_REDUCED_PRIMITIVE),
> -      .cache = CACHE_NEW_VS_PROG
> +      .brw   = (BRW_NEW_REDUCED_PRIMITIVE | BRW_NEW_VUE_MAP_GEOM_OUT)
>     },

Hmm, this is an increase in how much we recalculate SF -- before, we
wouldn't have anything flagged when doing a no-op VS update, but
BRW_NEW_VUE_MAP_GEOM_OUT happens regardless.  Could you add no-op change
detection in the previous commit?

Attachment: pgpXvqj4Xh2Kv.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