summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r200/r200_maos_arrays.c
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger@gmx.ch>2004-05-27 16:56:47 +0000
committerRoland Scheidegger <rscheidegger@gmx.ch>2004-05-27 16:56:47 +0000
commitaaaf38d37215aa1536ff34ec370ecfc04111af22 (patch)
tree3eafbe589892dbc2e1525fa722704e432f6e0623 /src/mesa/drivers/dri/r200/r200_maos_arrays.c
parentd44e9e39da2663bc2fc610ba1a117ac3ea0b4c8a (diff)
change some explicit references to texture units 0/1 to unit < MaxTextureUnits (Andreas Stenglein, Ronny Vindenes)
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_maos_arrays.c')
-rw-r--r--src/mesa/drivers/dri/r200/r200_maos_arrays.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_maos_arrays.c b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
index 301b265396..7bfa316836 100644
--- a/src/mesa/drivers/dri/r200/r200_maos_arrays.c
+++ b/src/mesa/drivers/dri/r200/r200_maos_arrays.c
@@ -422,7 +422,7 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs )
}
/* vtx = (rmesa->hw.tcl.cmd[TCL_OUTPUT_VTXFMT] & */
-/* ~(R200_TCL_VTX_Q0|R200_TCL_VTX_Q1)); */
+/* ~(R200_TCL_VTX_Q0|R200_TCL_VTX_Q1|R200_TCL_VTX_Q2|R200_TCL_VTX_Q3|R200_TCL_VTX_Q4|R200_TCL_VTX_Q5)); */
re_cntl = rmesa->hw.set.cmd[SET_RE_CNTL] & ~(R200_VTX_STQ0_D3D |
R200_VTX_STQ1_D3D |
@@ -468,6 +468,7 @@ void r200EmitArrays( GLcontext *ctx, GLuint inputs )
void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs )
{
+ GLuint unit;
r200ContextPtr rmesa = R200_CONTEXT( ctx );
/* if (R200_DEBUG & DEBUG_VERTS) */
@@ -485,9 +486,8 @@ void r200ReleaseArrays( GLcontext *ctx, GLuint newinputs )
if (newinputs & VERT_BIT_COLOR1)
r200ReleaseDmaRegion( rmesa, &rmesa->tcl.spec, __FUNCTION__ );
- if (newinputs & VERT_BIT_TEX0)
- r200ReleaseDmaRegion( rmesa, &rmesa->tcl.tex[0], __FUNCTION__ );
-
- if (newinputs & VERT_BIT_TEX1)
- r200ReleaseDmaRegion( rmesa, &rmesa->tcl.tex[1], __FUNCTION__ );
+ for (unit = 0 ; unit < ctx->Const.MaxTextureUnits; unit++) {
+ if (newinputs & VERT_BIT_TEX(unit))
+ r200ReleaseDmaRegion( rmesa, &rmesa->tcl.tex[unit], __FUNCTION__ );
+ }
}