Fixed GL_CLAM_TO_EDGE. It's not supported in hardware. Use GL_CLAMP
authorFelix Kuehling <fxkuehl@gmx.de>
Wed, 15 Dec 2004 16:59:58 +0000 (16:59 +0000)
committerFelix Kuehling <fxkuehl@gmx.de>
Wed, 15 Dec 2004 16:59:58 +0000 (16:59 +0000)
instead of GL_REPEAT.

src/mesa/drivers/dri/savage/savagetex.c

index 9c5b376d71a87ecdad770e3b0ed079f9abff07aa..edb016f1523772b7a5029412677ff0e1a0c709aa 100644 (file)
@@ -1020,8 +1020,10 @@ static void savageUpdateTex0State_s4( GLcontext *ctx )
       break;                   
    }
 
-    imesa->regs.s4.texCtrl[0].ni.uMode = !(t->texParams.sWrapMode & 0x01);
-    imesa->regs.s4.texCtrl[0].ni.vMode = !(t->texParams.tWrapMode & 0x01);
+    imesa->regs.s4.texCtrl[0].ni.uMode =
+       t->texParams.sWrapMode == GL_REPEAT ? 0 : 1;
+    imesa->regs.s4.texCtrl[0].ni.vMode = 
+       t->texParams.tWrapMode == GL_REPEAT ? 0 : 1;
 
     switch (t->texParams.minFilter)
     {
@@ -1222,8 +1224,10 @@ static void savageUpdateTex1State_s4( GLcontext *ctx )
       break;                   
    }
 
-    imesa->regs.s4.texCtrl[1].ni.uMode = !(t->texParams.sWrapMode & 0x01);
-    imesa->regs.s4.texCtrl[1].ni.vMode = !(t->texParams.tWrapMode & 0x01);
+    imesa->regs.s4.texCtrl[1].ni.uMode =
+       t->texParams.sWrapMode == GL_REPEAT ? 0 : 1;
+    imesa->regs.s4.texCtrl[1].ni.vMode =
+       t->texParams.tWrapMode == GL_REPEAT ? 0 : 1;
 
     switch (t->texParams.minFilter)
     {