mesa/tests: Sanity check the ES2 dispatch table
[mesa.git] / src / mesa / swrast / s_aalinetemp.h
index c28d47a671db30f058dffb082f4390610bec5dd1..6cfd3bc28a46b7fecab1223df2c4d19a644521de 100644 (file)
@@ -34,7 +34,7 @@
  * \param iy  - integer fragment window Y coordiante
  */
 static void
-NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
+NAME(plot)(struct gl_context *ctx, struct LineInfo *line, int ix, int iy)
 {
    const SWcontext *swrast = SWRAST_CONTEXT(ctx);
    const GLfloat fx = (GLfloat) ix;
@@ -67,7 +67,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
    ATTRIB_LOOP_BEGIN
       GLfloat (*attribArray)[4] = line->span.array->attribs[attr];
       if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0
-          && !ctx->FragmentProgram._Current) {
+          && !_swrast_use_fragment_program(ctx)) {
          /* texcoord w/ divide by Q */
          const GLuint unit = attr - FRAG_ATTRIB_TEX0;
          const GLfloat invQ = solve_plane_recip(fx, fy, line->attrPlane[attr][3]);
@@ -91,7 +91,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
    ATTRIB_LOOP_END
 #endif
 
-   if (line->span.end == MAX_WIDTH) {
+   if (line->span.end == SWRAST_MAX_WIDTH) {
       _swrast_write_rgba_span(ctx, &(line->span));
       line->span.end = 0; /* reset counter */
    }
@@ -103,7 +103,7 @@ NAME(plot)(GLcontext *ctx, struct LineInfo *line, int ix, int iy)
  * Line setup
  */
 static void
-NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
+NAME(line)(struct gl_context *ctx, const SWvertex *v0, const SWvertex *v1)
 {
    SWcontext *swrast = SWRAST_CONTEXT(ctx);
    GLfloat tStart, tEnd;   /* segment start, end along line length */
@@ -118,7 +118,7 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
    line.y1 = v1->attrib[FRAG_ATTRIB_WPOS][1];
    line.dx = line.x1 - line.x0;
    line.dy = line.y1 - line.y0;
-   line.len = SQRTF(line.dx * line.dx + line.dy * line.dy);
+   line.len = sqrtf(line.dx * line.dx + line.dy * line.dy);
    line.halfWidth = 0.5F * CLAMP(ctx->Line.Width,
                                  ctx->Const.MinLineWidthAA,
                                  ctx->Const.MaxLineWidthAA);
@@ -175,7 +175,7 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1)
                              line.attrPlane[attr][c]);
             }
          }
-         line.span.arrayAttribs |= (1 << attr);
+         line.span.arrayAttribs |= BITFIELD64_BIT(attr);
          if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0) {
             const GLuint u = attr - FRAG_ATTRIB_TEX0;
             const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current;