diff options
author | Marek Olšák <[email protected]> | 2012-01-28 00:59:13 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-31 00:54:34 +0100 |
commit | b478fcb9a99ef084674529f7db95f041db4a4796 (patch) | |
tree | f9136fe1f6382249fee00ffd5e0f4d9c87aa12c4 /src | |
parent | 6e9a1650e541bf7db15b7e8afaf90d7975b165fe (diff) |
st/mesa: simplify initialization of light_twoside
Core Mesa does this for us, see update_two_size in state.c.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_atom_rasterizer.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c index 25799bf2bd5..204f505a69f 100644 --- a/src/mesa/state_tracker/st_atom_rasterizer.c +++ b/src/mesa/state_tracker/st_atom_rasterizer.c @@ -90,28 +90,10 @@ static void update_raster_state( struct st_context *st ) if (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION_EXT) raster->flatshade_first = 1; - /* _NEW_LIGHT | _NEW_PROGRAM - * - * Back-face colors can come from traditional lighting (when - * GL_LIGHT_MODEL_TWO_SIDE is set) or from vertex programs/shaders (when - * GL_VERTEX_PROGRAM_TWO_SIDE is set). Note the logic here. - */ - if (ctx->VertexProgram._Current) { - if (ctx->VertexProgram._Enabled || - (ctx->Shader.CurrentVertexProgram && - ctx->Shader.CurrentVertexProgram->LinkStatus)) { - /* user-defined vertex program or shader */ - raster->light_twoside = ctx->VertexProgram.TwoSideEnabled; - } - else { - /* TNL-generated program */ - raster->light_twoside = ctx->Light.Enabled && ctx->Light.Model.TwoSide; - } - } - else if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) { - raster->light_twoside = 1; - } + /* _NEW_LIGHT | _NEW_PROGRAM */ + raster->light_twoside = ctx->VertexProgram._TwoSideEnabled; + /*_NEW_LIGHT | _NEW_BUFFERS */ raster->clamp_vertex_color = !st->clamp_vert_color_in_shader && ctx->Light._ClampVertexColor; |