Paul Berry <stereotype...@gmail.com> writes: > Currently, the GPU pipeline has one active VUE map in effect at any > given time--the one representing the layout of vertex data coming from > the vertex shader. However, when geometry shaders are added, they > will have their own independent VUE map. Later pipeline stages (clip, > sf, fs) will need to consult the geometry shader VUE map if a geometry > shader is in use, and the vertex shader VUE map otherwise. > > This patch adds a new field to brw_context, vue_map_geom_out, which > points to whichever VUE map should be used by later pipeline stages. > It also adds a new state flag, BRW_NEW_VUE_MAP_GEOM_OUT, which is > signalled whenever this pointer changes. > > Since we don't support geometry shaders yet, vue_map_geom_out is > currently set only by the brw_vs_prog state atom. > ---
> diff --git a/src/mesa/drivers/dri/i965/brw_vs.c > b/src/mesa/drivers/dri/i965/brw_vs.c > index d875703..214730d 100644 > --- a/src/mesa/drivers/dri/i965/brw_vs.c > +++ b/src/mesa/drivers/dri/i965/brw_vs.c > @@ -314,6 +314,8 @@ do_vs_prog(struct brw_context *brw, > program, program_size, > &c.prog_data, sizeof(c.prog_data), > &brw->vs.prog_offset, &brw->vs.prog_data); > + brw->vue_map_geom_out = &brw->vs.prog_data->vue_map; > + brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT; > ralloc_free(mem_ctx); I think the one below in upload_vs_prog should be sufficient, since it always happens immediately after this. > > return true; > @@ -488,6 +490,8 @@ static void brw_upload_vs_prog(struct brw_context *brw) > > assert(success); > } > + brw->vue_map_geom_out = &brw->vs.prog_data->vue_map; > + brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT; > }
pgprwDtLNfoPq.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev