summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
authorMathias Froehlich <Mathias.Froehlich@web.de>2015-03-29 18:57:45 +0200
committerMathias Froehlich <Mathias.Froehlich@gmx.net>2015-04-05 08:01:47 +0200
commit29e6c7dbc5bacf4f2b741333ac56469a00164e65 (patch)
treedce4396bf2dd349906b3c5120d11db4426b98695 /src/mesa/swrast_setup
parent472913ea7563e136b9ad3d33111925147a044a39 (diff)
downloadexternal_mesa3d-29e6c7dbc5bacf4f2b741333ac56469a00164e65.zip
external_mesa3d-29e6c7dbc5bacf4f2b741333ac56469a00164e65.tar.gz
external_mesa3d-29e6c7dbc5bacf4f2b741333ac56469a00164e65.tar.bz2
tnl: Maintain the _WindowMap matrix in TNLcontext v2.
This is the only real user of _WindowMap which has the depth buffer scaling multiplied in. Maintain the _WindowMap of the one and only viewport inside TNLcontext. v2: Remove unneeded parentheses. Reviewed-by: Brian Paul <brianp@vmware.com> Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r--src/mesa/swrast_setup/ss_context.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index 4fc90c3..74b1da3 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -167,7 +167,7 @@ setup_vertex_format(struct gl_context *ctx)
EMIT_ATTR( _TNL_ATTRIB_POINTSIZE, EMIT_1F, pointSize );
_tnl_install_attrs( ctx, map, e,
- ctx->ViewportArray[0]._WindowMap.m,
+ tnl->_WindowMap.m,
sizeof(SWvertex) );
swsetup->last_index_bitset = index_bitset;
@@ -265,7 +265,8 @@ _swsetup_Wakeup( struct gl_context *ctx )
void
_swsetup_Translate( struct gl_context *ctx, const void *vertex, SWvertex *dest )
{
- const GLfloat *m = ctx->ViewportArray[0]._WindowMap.m;
+ TNLcontext *tnl = TNL_CONTEXT(ctx);
+ const GLfloat *m = tnl->_WindowMap.m;
GLfloat tmp[4];
GLuint i;