[Mesa-dev] [PATCH 02/29] swrast: Convert swrast to use CoordsReplaceBits.
Mathias.Froehlich at gmx.net
Mathias.Froehlich at gmx.net
Tue Jun 14 04:59:33 UTC 2016
From: Mathias Fröhlich <mathias.froehlich at web.de>
Switch over to use the CoordsReplaceBits bitmask.
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
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 3163b04..8212850 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.5.5
More information about the mesa-dev
mailing list