From 6749d77c690d2254b8ed3f16a653c41565ebab49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathias=20Fr=C3=B6hlich?= Date: Sun, 22 May 2016 14:10:19 +0200 Subject: [PATCH] mesa: Rename CoordReplaceBits back to CoordReplace. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It used to be called like that and fits better with 80 columns. Reviewed-by: Brian Paul Reviewed-by: Ian Romanick Signed-off-by: Mathias Fröhlich --- 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 4c4bb09..39abe1b 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -657,7 +657,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; GLuint 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 fb52990..e9a1b6d 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -329,7 +329,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 309464f..32dd8c4 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 e2a56d5..f0693ba 100644 --- a/src/mesa/drivers/dri/r200/r200_state.c +++ b/src/mesa/drivers/dri/r200/r200_state.c @@ -1852,7 +1852,7 @@ static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state ) R200_STATECHANGE( rmesa, spr ); if ( state ) { rmesa->hw.spr.cmd[SPR_POINT_SPRITE_CNTL] |= R200_PS_GEN_TEX_MASK & - (ctx->Point.CoordReplaceBits << R200_PS_GEN_TEX_0_SHIFT); + (ctx->Point.CoordReplace << R200_PS_GEN_TEX_0_SHIFT); } 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 7a35953..b86a0ee 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 1aa0d6c..de49566 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 37a3598..d17ce30 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.7.4