fixed Fixed/Int bug
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 19 Oct 2006 22:26:29 +0000 (22:26 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 19 Oct 2006 22:26:29 +0000 (22:26 +0000)
src/mesa/swrast/s_alpha.c

index dadb51319cb9d75ccd270b296af99cc156f8cee1..87a016512cda1342d9e487438d4a73da2d8a76c1 100644 (file)
@@ -136,14 +136,14 @@ _swrast_alpha_test(const GLcontext *ctx, SWspan *span)
          GLfixed alpha = span->alpha;
          GLubyte ref;
          CLAMPED_FLOAT_TO_UBYTE(ref, ctx->Color.AlphaRef);
-         ALPHA_TEST(alpha, alpha += alphaStep);
+         ALPHA_TEST(FixedToInt(alpha), alpha += alphaStep);
       }
       else if (span->array->ChanType == GL_UNSIGNED_SHORT) {
          const GLfixed alphaStep = span->alphaStep;
          GLfixed alpha = span->alpha;
          GLushort ref;
          CLAMPED_FLOAT_TO_USHORT(ref, ctx->Color.AlphaRef);
-         ALPHA_TEST(alpha, alpha += alphaStep);
+         ALPHA_TEST(FixedToInt(alpha), alpha += alphaStep);
       }
       else {
          const GLfloat alphaStep = span->alphaStep;