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 | da79d76503c778ad4835bea077a76ad1a0691a1c (patch) | |
tree | 7452a4759b78a913d5d8afa80c10189292de08f6 | |
parent | 664ba9ccc9180f390606b3f3cc56c4be4eb838e2 (diff) |
gallium: Convert the state_tracker 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]>
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index ab5fa8f2dba..37a35982caf 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -64,7 +64,6 @@ static void update_raster_state( struct st_context *st ) struct pipe_rasterizer_state *raster = &st->state.rasterizer; const struct gl_vertex_program *vertProg = ctx->VertexProgram._Current; const struct gl_fragment_program *fragProg = ctx->FragmentProgram._Current; - uint i; memset(raster, 0, sizeof(*raster)); @@ -181,11 +180,8 @@ static void update_raster_state( struct st_context *st ) * that we need to replace GENERIC[k] attrib with an automatically * computed texture coord. */ - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { - if (ctx->Point.CoordReplace[i]) { - raster->sprite_coord_enable |= 1 << i; - } - } + raster->sprite_coord_enable = ctx->Point.CoordReplaceBits & + ((1u << MAX_TEXTURE_COORD_UNITS) - 1); if (!st->needs_texcoord_semantic && fragProg->Base.InputsRead & VARYING_BIT_PNTC) { raster->sprite_coord_enable |= |