swrast: Convert swrast to use CoordsReplaceBits.
authorMathias Fröhlich <mathias.froehlich@web.de>
Sun, 22 May 2016 12:10:19 +0000 (14:10 +0200)
committerMathias Fröhlich <mathias.froehlich@web.de>
Thu, 16 Jun 2016 03:50:52 +0000 (05:50 +0200)
Switch over to use the CoordsReplaceBits bitmask.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/mesa/swrast/s_points.c

index 3163b0407ea2a6604843721eecfdc6ae896bfaff..82128508de206af831a44314a79448121f05db9f 100644 (file)
@@ -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.CoordReplaceBits & (1u << u)) {
                tCoords[numTcoords++] = attr;
 
                if (ctx->Point.SpriteRMode == GL_ZERO)