summaryrefslogtreecommitdiffstats
path: root/src/mesa/tnl/t_vertex.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-04-17 11:58:33 -0600
committerBrian Paul <[email protected]>2013-04-17 11:59:42 -0600
commitcbbcb0247e6aa8d7adc274a94206ee02f9c70bea (patch)
tree368c41d00e04bdd4e021acee570257f06e873ddd /src/mesa/tnl/t_vertex.c
parentc9bb052e31b7952272e60d28969e90eafb6b3e1f (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.c12
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;