diff options
author | Brian Paul <[email protected]> | 2013-04-17 11:58:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-04-17 11:59:42 -0600 |
commit | cbbcb0247e6aa8d7adc274a94206ee02f9c70bea (patch) | |
tree | 368c41d00e04bdd4e021acee570257f06e873ddd /src/mesa/tnl/t_vertex.c | |
parent | c9bb052e31b7952272e60d28969e90eafb6b3e1f (diff) |
mesa: remove DD_TRI_LIGHT_TWOSIDE flag
v2: use conditional operator instead of bit shifting
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/tnl/t_vertex.c')
-rw-r--r-- | src/mesa/tnl/t_vertex.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index a42f46053fd..c7a745ed78c 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -158,9 +158,9 @@ static void choose_interp_func( struct gl_context *ctx, struct tnl_clipspace *vtx = GET_VERTEX_STATE(ctx); GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL); - if (vtx->need_extras && - ((ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE) || - unfilled))) { + GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide; + + if (vtx->need_extras && (twosided || unfilled)) { vtx->interp = _tnl_generic_interp_extras; } else { vtx->interp = _tnl_generic_interp; @@ -176,9 +176,9 @@ static void choose_copy_pv_func( struct gl_context *ctx, GLuint edst, GLuint es GLboolean unfilled = (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL); - if (vtx->need_extras && - ((ctx->_TriangleCaps & (DD_TRI_LIGHT_TWOSIDE) || - unfilled))) { + GLboolean twosided = ctx->Light.Enabled && ctx->Light.Model.TwoSide; + + if (vtx->need_extras && (twosided || unfilled)) { vtx->copy_pv = _tnl_generic_copy_pv_extras; } else { vtx->copy_pv = _tnl_generic_copy_pv; |