From e9fbc23024bb831ae781060c414b7906cdfa6d34 Mon Sep 17 00:00:00 2001 From: Felix Kuehling Date: Wed, 15 Dec 2004 16:54:19 +0000 Subject: [PATCH] Fixed initialization of some stencil-related S4 registers, which was misplaced in savageDDInitState_s3d, where was overwriting completely unrelated S3D registers with garbage. --- src/mesa/drivers/dri/savage/savagestate.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c index cf252e6..04d8f08 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; -- 2.7.4