summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_state.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2004-10-16 03:36:14 +0000
committerEric Anholt <anholt@FreeBSD.org>2004-10-16 03:36:14 +0000
commitb1ebd306bf4fdc4076d3d3daa410b08f477cb4c4 (patch)
treee815feb8221211e716d664be7093e5f344efcf3d /src/mesa/drivers/dri/r200/r200_state.c
parenta1af92877d3d91886cf01be9e6c65311960e3baf (diff)
Add code to support projective texturing and fix mixed enabling of texture
coordinate generation. Original code by Roland Schiedegger, with changes by myself. While here, ensure that the swtcl path does tnl_install_attrs enough when fog/specular are being (en/dis)abled. Notable effects: - projtex test works with TCL and is closer with swtcl (Bugzilla #1461) - 8/9 squares work in texgenmix instead of 3. - texcyl "reflect" mode works (GL_SPHERE_MAP is now a fallback -- unclear if the hardware can actually support it). - flickering in doom3 replaced by just plain darkness. - blocktube fixed (Bugzilla #984) - fixes stex3d
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_state.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_state.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index dd547f9957..825c036e27 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -2138,9 +2138,9 @@ static void update_texturematrix( GLcontext *ctx )
/* Need to preconcatenate any active texgen
* obj/eyeplane matrices:
*/
- _math_matrix_mul_matrix( &rmesa->tmpmat,
- &rmesa->TexGenMatrix[unit],
- ctx->TextureMatrixStack[unit].Top );
+ _math_matrix_mul_matrix( &rmesa->tmpmat,
+ ctx->TextureMatrixStack[unit].Top,
+ &rmesa->TexGenMatrix[unit] );
upload_matrix( rmesa, rmesa->tmpmat.m, R200_MTX_TEX0+unit );
}
else {
@@ -2155,11 +2155,9 @@ static void update_texturematrix( GLcontext *ctx )
}
tpc = (rmesa->TexMatEnabled | rmesa->TexGenEnabled);
- if (tpc != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] ||
- rmesa->TexGenInputs != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1]) {
+ if (tpc != rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0]) {
R200_STATECHANGE(rmesa, tcg);
rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_0] = tpc;
- rmesa->hw.tcg.cmd[TCG_TEX_PROC_CTL_1] = rmesa->TexGenInputs;
}
compsel &= ~R200_OUTPUT_TEX_MASK;