[Mesa-dev] [PATCH 07/29] mesa: Remove the now unused CoordsReplace array.

2016-06-13 Thread Mathias . Froehlich
From: Mathias Fröhlich 

Now that all users are converted, remove the array.

Reviewed-by: Brian Paul 
Reviewed-by: Ian Romanick 
Signed-off-by: Mathias Fröhlich 
---
 src/mesa/main/mtypes.h | 1 -
 src/mesa/main/points.c | 5 -
 src/mesa/main/texenv.c | 2 --
 3 files changed, 8 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4abe55b..2da8f3f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -756,7 +756,6 @@ struct gl_point_attrib
GLboolean SmoothFlag;   /**< True if GL_POINT_SMOOTH is enabled */
GLboolean _Attenuated;  /**< True if Params != [1, 0, 0] */
GLboolean PointSprite;  /**< GL_NV/ARB_point_sprite */
-   GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/
GLbitfield CoordReplaceBits; /**< GL_ARB_point_sprite*/
GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */
GLenum SpriteOrigin;/**< GL_ARB_point_sprite */
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 3fbd5d3..6bb1ce6 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -225,8 +225,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
 void
 _mesa_init_point(struct gl_context *ctx)
 {
-   GLuint i;
-
ctx->Point.SmoothFlag = GL_FALSE;
ctx->Point.Size = 1.0;
ctx->Point.Params[0] = 1.0;
@@ -253,8 +251,5 @@ _mesa_init_point(struct gl_context *ctx)
 
ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */
-   for (i = 0; i < ARRAY_SIZE(ctx->Point.CoordReplace); i++) {
-  ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_ARB/NV_point_sprite */
-   }
ctx->Point.CoordReplaceBits = 0; /* GL_ARB/NV_point_sprite */
 }
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 2cf322d..1aa0d6c 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -467,12 +467,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const 
GLfloat *param )
 if (ctx->Point.CoordReplaceBits & (1u << ctx->Texture.CurrentUnit))
return;
 ctx->Point.CoordReplaceBits |= (1u << ctx->Texture.CurrentUnit);
-ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = GL_TRUE;
  } else if (iparam0 == GL_FALSE) {
 if (~(ctx->Point.CoordReplaceBits) & (1u << 
ctx->Texture.CurrentUnit))
return;
 ctx->Point.CoordReplaceBits &= ~(1u << ctx->Texture.CurrentUnit);
-ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = GL_FALSE;
  } else {
 _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", 
iparam0);
 return;
-- 
2.5.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 07/29] mesa: Remove the now unused CoordsReplace array.

2016-05-24 Thread Mathias . Froehlich
From: Mathias Fröhlich 

Now that all users are converted, remove the array.

Signed-off-by: Mathias Fröhlich 
---
 src/mesa/main/mtypes.h | 1 -
 src/mesa/main/points.c | 5 -
 src/mesa/main/texenv.c | 2 --
 3 files changed, 8 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e714239..7ca9cdc 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -756,7 +756,6 @@ struct gl_point_attrib
GLboolean SmoothFlag;   /**< True if GL_POINT_SMOOTH is enabled */
GLboolean _Attenuated;  /**< True if Params != [1, 0, 0] */
GLboolean PointSprite;  /**< GL_NV/ARB_point_sprite */
-   GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/
GLbitfield CoordReplaceBits; /**< GL_ARB_point_sprite*/
GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */
GLenum SpriteOrigin;/**< GL_ARB_point_sprite */
diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c
index 3fbd5d3..6bb1ce6 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -225,8 +225,6 @@ _mesa_PointParameterfv( GLenum pname, const GLfloat *params)
 void
 _mesa_init_point(struct gl_context *ctx)
 {
-   GLuint i;
-
ctx->Point.SmoothFlag = GL_FALSE;
ctx->Point.Size = 1.0;
ctx->Point.Params[0] = 1.0;
@@ -253,8 +251,5 @@ _mesa_init_point(struct gl_context *ctx)
 
ctx->Point.SpriteRMode = GL_ZERO; /* GL_NV_point_sprite (only!) */
ctx->Point.SpriteOrigin = GL_UPPER_LEFT; /* GL_ARB_point_sprite */
-   for (i = 0; i < ARRAY_SIZE(ctx->Point.CoordReplace); i++) {
-  ctx->Point.CoordReplace[i] = GL_FALSE; /* GL_ARB/NV_point_sprite */
-   }
ctx->Point.CoordReplaceBits = 0; /* GL_ARB/NV_point_sprite */
 }
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 0556b75..b3d35ba 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -467,12 +467,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const 
GLfloat *param )
 if (ctx->Point.CoordReplaceBits & (1u << ctx->Texture.CurrentUnit))
return;
 ctx->Point.CoordReplaceBits |= (1u << ctx->Texture.CurrentUnit);
-ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = GL_TRUE;
  } else if (iparam0 == GL_FALSE) {
 if (~(ctx->Point.CoordReplaceBits) & (1u << 
ctx->Texture.CurrentUnit))
return;
 ctx->Point.CoordReplaceBits &= (1u << ctx->Texture.CurrentUnit);
-ctx->Point.CoordReplace[ctx->Texture.CurrentUnit] = GL_FALSE;
  } else {
 _mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", 
iparam0);
 return;
-- 
2.5.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev