mesa: add _mesa_program_state_value_size() helper
[mesa.git] / src / mesa / swrast / s_points.c
index 3163b0407ea2a6604843721eecfdc6ae896bfaff..1c6c239042aaef8aac20d1be8a3c2f417b3afd3d 100644 (file)
@@ -38,7 +38,7 @@
    do {                                              \
       float tmp = (V)->attrib[VARYING_SLOT_POS][0]   \
                 + (V)->attrib[VARYING_SLOT_POS][1];  \
-      if (IS_INF_OR_NAN(tmp))                        \
+      if (util_is_inf_or_nan(tmp))                   \
         return;                                     \
    } while(0)
 
@@ -139,8 +139,8 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert)
          if (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7) {
             /* a texcoord attribute */
             const GLuint u = attr - VARYING_SLOT_TEX0;
-            assert(u < ARRAY_SIZE(ctx->Point.CoordReplace));
-            if (ctx->Point.CoordReplace[u]) {
+            assert(u < MAX_TEXTURE_COORD_UNITS);
+            if (ctx->Point.CoordReplace & (1u << u)) {
                tCoords[numTcoords++] = attr;
 
                if (ctx->Point.SpriteRMode == GL_ZERO)