mesa: implement core Mesa support for GL_ARB_draw_instanced
[mesa.git] / src / mesa / swrast / s_alpha.c
index af8a6baddc2728fbedb326d5d0e2a53ac8b78c2e..509477433a535f7a147558fe057e9e1274d59cd0 100644 (file)
  * \brief Functions to apply alpha test.
  */
 
-#include "glheader.h"
-#include "context.h"
-#include "colormac.h"
-#include "macros.h"
+#include "main/glheader.h"
+#include "main/context.h"
+#include "main/colormac.h"
+#include "main/macros.h"
 
 #include "s_alpha.h"
 #include "s_context.h"
@@ -111,13 +111,13 @@ _swrast_alpha_test(const GLcontext *ctx, SWspan *span)
    if (span->arrayMask & SPAN_RGBA) {
       /* Use array's alpha values */
       if (span->array->ChanType == GL_UNSIGNED_BYTE) {
-         GLubyte (*rgba)[4] = span->array->color.sz1.rgba;
+         GLubyte (*rgba)[4] = span->array->rgba8;
          GLubyte ref;
          CLAMPED_FLOAT_TO_UBYTE(ref, ctx->Color.AlphaRef);
          ALPHA_TEST(rgba[i][ACOMP], ;);
       }
       else if (span->array->ChanType == GL_UNSIGNED_SHORT) {
-         GLushort (*rgba)[4] = span->array->color.sz2.rgba;
+         GLushort (*rgba)[4] = span->array->rgba16;
          GLushort ref;
          CLAMPED_FLOAT_TO_USHORT(ref, ctx->Color.AlphaRef);
          ALPHA_TEST(rgba[i][ACOMP], ;);
@@ -146,8 +146,8 @@ _swrast_alpha_test(const GLcontext *ctx, SWspan *span)
          ALPHA_TEST(FixedToInt(alpha), alpha += alphaStep);
       }
       else {
-         const GLfloat alphaStep = span->alphaStep;
-         GLfloat alpha = span->alpha;
+         const GLfloat alphaStep = FixedToFloat(span->alphaStep);
+         GLfloat alpha = FixedToFloat(span->alpha);
          const GLfloat ref = ctx->Color.AlphaRef;
          ALPHA_TEST(alpha, alpha += alphaStep);
       }