diff options
author | Mathias Fröhlich <[email protected]> | 2016-05-22 14:10:19 +0200 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2016-06-16 05:50:52 +0200 |
commit | 97f67be0a7562cc477531675170c52fd7b17f899 (patch) | |
tree | 995236edcd3e0f1c17f1fa241cb43515e99f08e4 /src/mesa/drivers | |
parent | 8e01fd63965e0c7ab0854e0a899d6138deca5b07 (diff) |
i915: Convert i915 to use CoordsReplaceBits.
Switch over to use the CoordsReplaceBits bitmask.
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_state.c | 17 |
1 files 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 4c83073e692..4c4bb090590 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); - } + + /* _NEW_POINT */ + if (ctx->Point.PointSprite) + coord_replace_bits = ctx->Point.CoordReplaceBits; + + GLuint tex_coord_unit_bits = + (GLuint)((inputsRead & VARYING_BITS_TEX_ANY) >> VARYING_SLOT_TEX0); /* * Here we can't enable the SPRITE_POINT_ENABLE bit when the mis-match |