summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2004-12-15 16:54:19 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2004-12-15 16:54:19 +0000
commite9fbc23024bb831ae781060c414b7906cdfa6d34 (patch)
tree6296cd65e8a843908ec3ee199f707609adfbc103 /src/mesa
parent91fd299b6b781f0e62723ceba050e005a794710c (diff)
Fixed initialization of some stencil-related S4 registers, which was
misplaced in savageDDInitState_s3d, where was overwriting completely unrelated S3D registers with garbage.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index cf252e6052..04d8f0870c 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -1622,6 +1622,16 @@ static void savageDDInitState_s4( savageContextPtr imesa )
imesa->regs.s4.drawCtrl1.ni.ditherEn=GL_TRUE;
imesa->regs.s4.drawCtrl1.ni.cullMode = BCM_None;
+ imesa->regs.s4.zBufCtrl.ni.stencilRefVal = 0x00;
+
+ imesa->regs.s4.stencilCtrl.ni.stencilEn = GL_FALSE;
+ imesa->regs.s4.stencilCtrl.ni.cmpFunc = CF_Always;
+ imesa->regs.s4.stencilCtrl.ni.failOp = STC_FAIL_Keep;
+ imesa->regs.s4.stencilCtrl.ni.passZfailOp = STC_FAIL_Keep;
+ imesa->regs.s4.stencilCtrl.ni.passZpassOp = STC_FAIL_Keep;
+ imesa->regs.s4.stencilCtrl.ni.writeMask = 0xff;
+ imesa->regs.s4.stencilCtrl.ni.readMask = 0xff;
+
imesa->LcsCullMode=BCM_None;
imesa->regs.s4.texDescr.ni.palSize = TPS_256;
@@ -1669,15 +1679,6 @@ static void savageDDInitState_s3d( savageContextPtr imesa )
imesa->regs.s3d.zBufCtrl.ni.drawUpdateEn = GL_TRUE;
imesa->regs.s3d.zBufCtrl.ni.wrZafterAlphaTst = GL_FALSE;
imesa->regs.s3d.zBufCtrl.ni.zUpdateEn = GL_TRUE;
- imesa->regs.s4.zBufCtrl.ni.stencilRefVal = 0x00;
-
- imesa->regs.s4.stencilCtrl.ni.stencilEn = GL_FALSE;
- imesa->regs.s4.stencilCtrl.ni.cmpFunc = CF_Always;
- imesa->regs.s4.stencilCtrl.ni.failOp = STC_FAIL_Keep;
- imesa->regs.s4.stencilCtrl.ni.passZfailOp = STC_FAIL_Keep;
- imesa->regs.s4.stencilCtrl.ni.passZpassOp = STC_FAIL_Keep;
- imesa->regs.s4.stencilCtrl.ni.writeMask = 0xff;
- imesa->regs.s4.stencilCtrl.ni.readMask = 0xff;
imesa->regs.s3d.drawCtrl.ni.srcAlphaMode = SAM_One;
imesa->regs.s3d.drawCtrl.ni.flushPdZbufWrites = GL_TRUE;