summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome
diff options
context:
space:
mode:
authorAlan Hourihane <[email protected]>2005-01-11 17:09:47 +0000
committerAlan Hourihane <[email protected]>2005-01-11 17:09:47 +0000
commit5b5e6cc120727a38592d7e4d240ed54f759f446d (patch)
tree117cece8ff39caa9233ba71556d5bb9908191dff /src/mesa/drivers/dri/unichrome
parentaac4d8857af31984108896c11ea1ac98b9776b3e (diff)
Fix the calculation of the alpha reference value which negates the
need for the big nasty fallback - so I've commented out that code.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_state.c b/src/mesa/drivers/dri/unichrome/via_state.c
index 5fcc60d2749..2437e061c20 100644
--- a/src/mesa/drivers/dri/unichrome/via_state.c
+++ b/src/mesa/drivers/dri/unichrome/via_state.c
@@ -1299,7 +1299,7 @@ static void viaChooseColorState(GLcontext *ctx)
if (ctx->Color.AlphaEnabled) {
vmesa->regEnable |= HC_HenAT_MASK;
- vmesa->regHATMD = (((GLchan)ctx->Color.AlphaRef) & 0xFF) |
+ vmesa->regHATMD = FLOAT_TO_UBYTE(ctx->Color.AlphaRef) |
((ctx->Color.AlphaFunc - GL_NEVER) << 8);
}
else {
@@ -1617,12 +1617,16 @@ void viaValidateState( GLcontext *ctx )
* are incorrectly writen to the z buffer. This is a pretty big
* slowdown, it would be good to find out this wasn't necessary:
*/
+#if 0
+ /* Disabling now, as the main problem was that the alpha reference
+ * value was calculated incorrectly, it's now fixed.
if (vmesa->viaScreen->deviceID == VIA_CLE266) {
GLboolean fallback = (ctx->Color.AlphaEnabled &&
ctx->Color.AlphaFunc != GL_ALWAYS &&
ctx->Depth.Mask);
FALLBACK( vmesa, VIA_FALLBACK_ALPHATEST, fallback );
}
+#endif
vmesa->newEmitState |= vmesa->newState;
vmesa->newState = 0;