[Mesa-dev] [PATCH 05/29] i915: Convert i915 to use CoordsReplaceBits.
Ian Romanick
idr at freedesktop.org
Wed May 25 16:33:59 UTC 2016
On 05/23/2016 11:42 PM, Mathias.Froehlich at gmx.net wrote:
> From: Mathias Fröhlich <mathias.froehlich at web.de>
>
> Switch over to use the CoordsReplaceBits bitmask.
>
> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
> ---
> src/mesa/drivers/dri/i915/i915_state.c | 17 +++++++----------
> 1 file changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
> index 4c83073..09dc183 100644
> --- a/src/mesa/drivers/dri/i915/i915_state.c
> +++ b/src/mesa/drivers/dri/i915/i915_state.c
> @@ -653,17 +653,14 @@ i915_update_sprite_point_enable(struct gl_context *ctx)
> const GLbitfield64 inputsRead = p->FragProg.Base.InputsRead;
> struct i915_context *i915 = i915_context(ctx);
> GLuint s4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_VFMT_MASK;
> - int i;
> GLuint coord_replace_bits = 0x0;
> - GLuint tex_coord_unit_bits = 0x0;
> -
> - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
> - /* _NEW_POINT */
> - if (ctx->Point.CoordReplace[i] && ctx->Point.PointSprite)
> - coord_replace_bits |= (1 << i);
> - if (inputsRead & VARYING_BIT_TEX(i))
> - tex_coord_unit_bits |= (1 << i);
> - }
> + GLuint tex_coord_unit_bits;
> +
> + /* _NEW_POINT */
> + if (ctx->Point.PointSprite)
> + coord_replace_bits = ctx->Point.CoordReplaceBits;
Blank line here. I know there wasn't one in the original, but there
should have been.
> + tex_coord_unit_bits =
> + (GLuint)((inputsRead & VARYING_BITS_TEX_ANY) >> VARYING_SLOT_TEX0);
Combine the declaration of tex_coord_unit_bits with the assignment.
>
> /*
> * Here we can't enable the SPRITE_POINT_ENABLE bit when the mis-match
>
More information about the mesa-dev
mailing list