[Mesa-dev] [PATCH 08/29] mesa: Rename CoordReplaceBits back to CoordReplace.
Mathias.Froehlich at gmx.net
Mathias.Froehlich at gmx.net
Tue May 24 06:42:04 UTC 2016
From: Mathias Fröhlich <mathias.froehlich at web.de>
It used to be called like that and fits better with 80 columns.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
---
src/mesa/drivers/dri/i915/i915_state.c | 2 +-
src/mesa/drivers/dri/i965/brw_sf.c | 2 +-
src/mesa/drivers/dri/i965/brw_vs.c | 2 +-
src/mesa/drivers/dri/i965/gen6_sf_state.c | 2 +-
src/mesa/drivers/dri/r200/r200_state.c | 2 +-
src/mesa/main/attrib.c | 2 +-
src/mesa/main/ffvertex_prog.c | 2 +-
src/mesa/main/mtypes.h | 2 +-
src/mesa/main/points.c | 2 +-
src/mesa/main/texenv.c | 12 ++++++------
src/mesa/state_tracker/st_atom_rasterizer.c | 2 +-
src/mesa/swrast/s_points.c | 2 +-
12 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index 09dc183..b70bc10 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -658,7 +658,7 @@ i915_update_sprite_point_enable(struct gl_context *ctx)
/* _NEW_POINT */
if (ctx->Point.PointSprite)
- coord_replace_bits = ctx->Point.CoordReplaceBits;
+ coord_replace_bits = ctx->Point.CoordReplace;
tex_coord_unit_bits =
(GLuint)((inputsRead & VARYING_BITS_TEX_ANY) >> VARYING_SLOT_TEX0);
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index bbfa2c6..dff3461 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -190,7 +190,7 @@ brw_upload_sf_prog(struct brw_context *brw)
/* _NEW_POINT */
key.do_point_sprite = ctx->Point.PointSprite;
if (key.do_point_sprite) {
- key.point_sprite_coord_replace = ctx->Point.CoordReplaceBits & 0xff;
+ key.point_sprite_coord_replace = ctx->Point.CoordReplace & 0xff;
}
if (brw->fragment_program->Base.InputsRead & BITFIELD64_BIT(VARYING_SLOT_PNTC))
key.do_point_coord = 1;
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 1fadcbc..82e8f16 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -333,7 +333,7 @@ brw_vs_populate_key(struct brw_context *brw,
/* _NEW_POINT */
if (brw->gen < 6 && ctx->Point.PointSprite) {
- key->point_coord_replace = ctx->Point.CoordReplaceBits & 0xff;
+ key->point_coord_replace = ctx->Point.CoordReplace & 0xff;
}
/* _NEW_TEXTURE */
diff --git a/src/mesa/drivers/dri/i965/gen6_sf_state.c b/src/mesa/drivers/dri/i965/gen6_sf_state.c
index 6e5a1aa..3aa4713 100644
--- a/src/mesa/drivers/dri/i965/gen6_sf_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_sf_state.c
@@ -214,7 +214,7 @@ calculate_attr_overrides(const struct brw_context *brw,
if (drawing_points) {
if (brw->ctx.Point.PointSprite &&
(attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7) &&
- (brw->ctx.Point.CoordReplaceBits & (1u << (attr - VARYING_SLOT_TEX0)))) {
+ (brw->ctx.Point.CoordReplace & (1u << (attr - VARYING_SLOT_TEX0)))) {
point_sprite = true;
}
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index 695d511..017930f 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1851,7 +1851,7 @@ static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state )
case GL_POINT_SPRITE_ARB:
R200_STATECHANGE( rmesa, spr );
if ( state ) {
- GLuint r = (GLuint)ctx->Point.CoordReplaceBits << R200_PS_GEN_TEX_0_SHIFT;
+ GLuint r = (GLuint)ctx->Point.CoordReplace << R200_PS_GEN_TEX_0_SHIFT;
rmesa->hw.spr.cmd[SPR_POINT_SPRITE_CNTL] |= R200_PS_GEN_TEX_MASK & r;
} else {
rmesa->hw.spr.cmd[SPR_POINT_SPRITE_CNTL] &= ~R200_PS_GEN_TEX_MASK;
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 6f39cb0..52a8ba6 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1247,7 +1247,7 @@ _mesa_PopAttrib(void)
GLuint u;
for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
_mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV,
- !!(point->CoordReplaceBits & (1u << u)));
+ !!(point->CoordReplace & (1u << u)));
}
_mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite);
if (ctx->Extensions.NV_point_sprite)
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index adf71dc..ecdd018 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -243,7 +243,7 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key )
key->unit[i].texunit_really_enabled = 1;
if (ctx->Point.PointSprite)
- if (ctx->Point.CoordReplaceBits & (1u << i))
+ if (ctx->Point.CoordReplace & (1u << i))
key->unit[i].coord_replace = 1;
if (ctx->Texture._TexMatEnabled & ENABLE_TEXMAT(i))
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 7ca9cdc..877d377 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -756,7 +756,7 @@ 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 */
- GLbitfield CoordReplaceBits; /**< GL_ARB_point_sprite*/
+ GLbitfield CoordReplace; /**< 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 6bb1ce6..2d62e73 100644
--- a/src/mesa/main/points.c
+++ b/src/mesa/main/points.c
@@ -251,5 +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 */
- ctx->Point.CoordReplaceBits = 0; /* GL_ARB/NV_point_sprite */
+ ctx->Point.CoordReplace = 0; /* GL_ARB/NV_point_sprite */
}
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index b3d35ba..7ec9987 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -464,13 +464,13 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
* but that's what the spec calls for.
*/
if (iparam0 == GL_TRUE) {
- if (ctx->Point.CoordReplaceBits & (1u << ctx->Texture.CurrentUnit))
+ if (ctx->Point.CoordReplace & (1u << ctx->Texture.CurrentUnit))
return;
- ctx->Point.CoordReplaceBits |= (1u << ctx->Texture.CurrentUnit);
+ ctx->Point.CoordReplace |= (1u << ctx->Texture.CurrentUnit);
} else if (iparam0 == GL_FALSE) {
- if (~(ctx->Point.CoordReplaceBits) & (1u << ctx->Texture.CurrentUnit))
+ if (~(ctx->Point.CoordReplace) & (1u << ctx->Texture.CurrentUnit))
return;
- ctx->Point.CoordReplaceBits &= (1u << ctx->Texture.CurrentUnit);
+ ctx->Point.CoordReplace &= (1u << ctx->Texture.CurrentUnit);
} else {
_mesa_error( ctx, GL_INVALID_VALUE, "glTexEnv(param=0x%x)", iparam0);
return;
@@ -677,7 +677,7 @@ _mesa_GetTexEnvfv( GLenum target, GLenum pname, GLfloat *params )
return;
}
if (pname == GL_COORD_REPLACE_NV) {
- if (ctx->Point.CoordReplaceBits & (1u << ctx->Texture.CurrentUnit))
+ if (ctx->Point.CoordReplace & (1u << ctx->Texture.CurrentUnit))
*params = 1.0f;
else
*params = 0.0f;
@@ -741,7 +741,7 @@ _mesa_GetTexEnviv( GLenum target, GLenum pname, GLint *params )
return;
}
if (pname == GL_COORD_REPLACE_NV) {
- if (ctx->Point.CoordReplaceBits & (1u << ctx->Texture.CurrentUnit))
+ if (ctx->Point.CoordReplace & (1u << ctx->Texture.CurrentUnit))
*params = GL_TRUE;
else
*params = GL_FALSE;
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index d45a8b8..735d47a 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -180,7 +180,7 @@ static void update_raster_state( struct st_context *st )
* that we need to replace GENERIC[k] attrib with an automatically
* computed texture coord.
*/
- raster->sprite_coord_enable = ctx->Point.CoordReplaceBits &
+ raster->sprite_coord_enable = ctx->Point.CoordReplace &
((1u << MAX_TEXTURE_COORD_UNITS) - 1);
if (!st->needs_texcoord_semantic &&
fragProg->Base.InputsRead & VARYING_BIT_PNTC) {
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 8212850..de5cd69 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -140,7 +140,7 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert)
/* a texcoord attribute */
const GLuint u = attr - VARYING_SLOT_TEX0;
assert(u < MAX_TEXTURE_COORD_UNITS);
- if (ctx->Point.CoordReplaceBits & (1u << u)) {
+ if (ctx->Point.CoordReplace & (1u << u)) {
tCoords[numTcoords++] = attr;
if (ctx->Point.SpriteRMode == GL_ZERO)
--
2.5.5
More information about the mesa-dev
mailing list