From 664ba9ccc9180f390606b3f3cc56c4be4eb838e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathias=20Fr=C3=B6hlich?= Date: Sun, 22 May 2016 14:10:19 +0200 Subject: [PATCH] swrast: Convert swrast to use CoordsReplaceBits. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick Signed-off-by: Mathias Fröhlich --- src/mesa/swrast/s_points.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 3163b0407ea..82128508de2 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -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) -- 2.30.2