swrast: Convert swrast to use CoordsReplaceBits.
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>
This commit is contained in:
@@ -139,8 +139,8 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert)
|
|||||||
if (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7) {
|
if (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7) {
|
||||||
/* a texcoord attribute */
|
/* a texcoord attribute */
|
||||||
const GLuint u = attr - VARYING_SLOT_TEX0;
|
const GLuint u = attr - VARYING_SLOT_TEX0;
|
||||||
assert(u < ARRAY_SIZE(ctx->Point.CoordReplace));
|
assert(u < MAX_TEXTURE_COORD_UNITS);
|
||||||
if (ctx->Point.CoordReplace[u]) {
|
if (ctx->Point.CoordReplaceBits & (1u << u)) {
|
||||||
tCoords[numTcoords++] = attr;
|
tCoords[numTcoords++] = attr;
|
||||||
|
|
||||||
if (ctx->Point.SpriteRMode == GL_ZERO)
|
if (ctx->Point.SpriteRMode == GL_ZERO)
|
||||||
|
Reference in New Issue
Block a user