summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2009-08-05 02:32:09 +0200
committerRoland Scheidegger <[email protected]>2009-08-05 02:33:34 +0200
commit8b9a5cfce0065d6e32d3a882b6ee9f94bf2634ff (patch)
treede0fd40eebb569ead9dbdb500de457f0ae01a05a
parent7c0fb3a1bea99ff3da6c2679b109f17b26823926 (diff)
r200: fix off-by-one errors causing 6th texture unit to not work
both for normal and cube textures, this fixes demos/multiarb (with 6 enabled texture units) and fixes #23142.
-rw-r--r--src/mesa/drivers/dri/r200/r200_state_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_state_init.c b/src/mesa/drivers/dri/r200/r200_state_init.c
index 35d874bc090..78a0697a1b2 100644
--- a/src/mesa/drivers/dri/r200/r200_state_init.c
+++ b/src/mesa/drivers/dri/r200/r200_state_init.c
@@ -772,7 +772,7 @@ void r200InitState( r200ContextPtr rmesa )
ALLOC_STATE( afs[1], never, AFS_STATE_SIZE, "AFS/afsinst-1", 1 );
}
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 6; i++)
if (rmesa->radeon.radeonScreen->kernel_mm)
rmesa->hw.tex[i].emit = tex_emit_cs;
else
@@ -784,7 +784,7 @@ void r200InitState( r200ContextPtr rmesa )
ALLOC_STATE( cube[3], tex_cube, CUBE_STATE_SIZE, "CUBE/tex-3", 3 );
ALLOC_STATE( cube[4], tex_cube, CUBE_STATE_SIZE, "CUBE/tex-4", 4 );
ALLOC_STATE( cube[5], tex_cube, CUBE_STATE_SIZE, "CUBE/tex-5", 5 );
- for (i = 0; i < 5; i++)
+ for (i = 0; i < 6; i++)
if (rmesa->radeon.radeonScreen->kernel_mm)
rmesa->hw.cube[i].emit = cube_emit_cs;
else