From: Mathias Fröhlich Date: Sun, 22 May 2016 12:10:19 +0000 (+0200) Subject: r200: convert r200 to use CoordsReplaceBits. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e01fd63965e0c7ab0854e0a899d6138deca5b07;p=mesa.git r200: convert r200 to use CoordsReplaceBits. Switch over to use the CoordsReplaceBits bitmask. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick Signed-off-by: Mathias Fröhlich --- diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c index b4acf985ee8..e2a56d5e07b 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -1851,11 +1851,8 @@ static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state ) case GL_POINT_SPRITE_ARB: R200_STATECHANGE( rmesa, spr ); if ( state ) { - int i; - for (i = 0; i < 6; i++) { - rmesa->hw.spr.cmd[SPR_POINT_SPRITE_CNTL] |= - ctx->Point.CoordReplace[i] << (R200_PS_GEN_TEX_0_SHIFT + i); - } + rmesa->hw.spr.cmd[SPR_POINT_SPRITE_CNTL] |= R200_PS_GEN_TEX_MASK & + (ctx->Point.CoordReplaceBits << R200_PS_GEN_TEX_0_SHIFT); } else { rmesa->hw.spr.cmd[SPR_POINT_SPRITE_CNTL] &= ~R200_PS_GEN_TEX_MASK; }