From: Keith Whitwell Date: Thu, 19 May 2005 19:01:47 +0000 (+0000) Subject: Re-initialize viewport shadows each time. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9557401a98b9585289fe8f65be33b6c5fda79095;p=mesa.git Re-initialize viewport shadows each time. --- diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index 7732425dd16..f4847f75781 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -288,14 +288,6 @@ GLuint _tnl_install_attrs( GLcontext *ctx, const struct tnl_attr_map *map, if (vp) { vtx->need_viewport = GL_TRUE; - vtx->vp_scale[0] = vp[MAT_SX]; - vtx->vp_scale[1] = vp[MAT_SY]; - vtx->vp_scale[2] = vp[MAT_SZ]; - vtx->vp_scale[3] = 1.0; - vtx->vp_xlate[0] = vp[MAT_TX]; - vtx->vp_xlate[1] = vp[MAT_TY]; - vtx->vp_xlate[2] = vp[MAT_TZ]; - vtx->vp_xlate[3] = 0.0; } for (j = 0, i = 0; i < nr; i++) { @@ -389,6 +381,17 @@ static void update_input_ptrs( GLcontext *ctx, GLuint start ) a[j].inputptr = ((GLubyte *)vptr->data) + start * vptr->stride; } + + if (a->vp) { + vtx->vp_scale[0] = a->vp[MAT_SX]; + vtx->vp_scale[1] = a->vp[MAT_SY]; + vtx->vp_scale[2] = a->vp[MAT_SZ]; + vtx->vp_scale[3] = 1.0; + vtx->vp_xlate[0] = a->vp[MAT_TX]; + vtx->vp_xlate[1] = a->vp[MAT_TY]; + vtx->vp_xlate[2] = a->vp[MAT_TZ]; + vtx->vp_xlate[3] = 0.0; + } }