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/main | |
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/main')
-rw-r--r-- | src/mesa/main/debug.c | 12 | ||||
-rw-r--r-- | src/mesa/main/debug.h | 1 | ||||
-rw-r--r-- | src/mesa/main/enable.c | 4 | ||||
-rw-r--r-- | src/mesa/main/light.c | 4 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 10 | ||||
-rw-r--r-- | src/mesa/main/state.c | 27 |
6 files changed, 0 insertions, 58 deletions
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index e8d850dff86..5dda766b934 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -96,18 +96,6 @@ _mesa_print_state( const char *msg, GLuint state ) -void -_mesa_print_tri_caps( const char *name, GLuint flags ) -{ - _mesa_debug(NULL, - "%s: (0x%x) %s\n", - name, - flags, - (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "" - ); -} - - /** * Print information about this Mesa version and build options. */ diff --git a/src/mesa/main/debug.h b/src/mesa/main/debug.h index 6bc536591ac..4fbfaff052a 100644 --- a/src/mesa/main/debug.h +++ b/src/mesa/main/debug.h @@ -42,7 +42,6 @@ struct gl_context; struct gl_texture_image; -extern void _mesa_print_tri_caps( const char *name, GLuint flags ); extern void _mesa_print_enable_flags( const char *msg, GLuint flags ); extern void _mesa_print_state( const char *msg, GLuint state ); extern void _mesa_print_info( void ); diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index 22a75c8c5d1..fb2a1964fdd 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -419,10 +419,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.Enabled = state; - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; break; case GL_LINE_SMOOTH: if (!_mesa_is_desktop_gl(ctx) && ctx->API != API_OPENGLES) diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c index c694bebe69b..41773d83c21 100644 --- a/src/mesa/main/light.c +++ b/src/mesa/main/light.c @@ -474,10 +474,6 @@ _mesa_LightModelfv( GLenum pname, const GLfloat *params ) return; FLUSH_VERTICES(ctx, _NEW_LIGHT); ctx->Light.Model.TwoSide = newbool; - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; - else - ctx->_TriangleCaps &= ~DD_TRI_LIGHT_TWOSIDE; break; case GL_LIGHT_MODEL_COLOR_CONTROL: if (ctx->API != API_OPENGL_COMPAT) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index d6c2b35c6cc..68afc240dd8 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3162,16 +3162,6 @@ struct gl_matrix_stack /** - * \name A bunch of flags that we think might be useful to drivers. - * - * Set in the __struct gl_contextRec::_TriangleCaps bitfield. - */ -/*@{*/ -#define DD_TRI_LIGHT_TWOSIDE (1 << 1) -/*@}*/ - - -/** * Composite state flags */ /*@{*/ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index da7f713489d..01a7f958c64 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -315,27 +315,6 @@ update_twoside(struct gl_context *ctx) /** - * Update the ctx->_TriangleCaps bitfield. - * XXX that bitfield should really go away someday! - * This function must be called after other update_*() functions since - * there are dependencies on some other derived values. - */ -#if 0 -static void -update_tricaps(struct gl_context *ctx, GLbitfield new_state) -{ - ctx->_TriangleCaps = 0; - - /* - * Lighting and shading - */ - if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) - ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE; -} -#endif - - -/** * Compute derived GL state. * If __struct gl_contextRec::NewState is non-zero then this function \b must * be called before rendering anything. @@ -411,12 +390,6 @@ _mesa_update_state_locked( struct gl_context *ctx ) if (new_state & (_NEW_MULTISAMPLE | _NEW_BUFFERS)) update_multisample( ctx ); -#if 0 - if (new_state & (_NEW_POINT | _NEW_LINE | _NEW_POLYGON | _NEW_LIGHT - | _NEW_STENCIL | _MESA_NEW_SEPARATE_SPECULAR)) - update_tricaps( ctx, new_state ); -#endif - /* ctx->_NeedEyeCoords is now up to date. * * If the truth value of this variable has changed, update for the |