r200: convert r200 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/drivers/dri/r200/r200_state.c

index b4acf985ee8db81f9903e6467248014a253ebd37..e2a56d5e07b79c13c08558db4c0f412df84b6b40 100644 (file)
@@ -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;
       }