aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-04-16 19:06:22 -0600
committerBrian Paul <[email protected]>2013-04-17 11:59:39 -0600
commit55b2033f0a4896a7930469711a052083c15edd3f (patch)
tree9442f593f4252c6d9791d8ea18eebcb73d1a5f76 /src
parentc1c5d689c5a8cc3ae72b81391be30f5296cc2993 (diff)
mesa: remove DD_SEPARATE_SPECULAR flag
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r200/r200_tcl.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_maos_verts.c3
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tcl.c3
-rw-r--r--src/mesa/main/debug.c3
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/state.c15
6 files changed, 7 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c b/src/mesa/drivers/dri/r200/r200_tcl.c
index f3cf34d275f..703840d5585 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -38,6 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/enums.h"
#include "main/colormac.h"
#include "main/light.h"
+#include "main/state.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -402,7 +403,7 @@ static GLboolean r200_run_tcl_render( struct gl_context *ctx,
FIXME: OTOH, we're missing the case where a ATI_fragment_shader accesses
the secondary color (if lighting is disabled). The chip seems
misconfigured for that though elsewhere (tcl output, might lock up) */
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
+ if (_mesa_need_secondary_color(ctx)) {
map_rev_fixed[5] = VERT_ATTRIB_COLOR1;
}
diff --git a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
index 985ad663c6d..31edfe067dc 100644
--- a/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
+++ b/src/mesa/drivers/dri/radeon/radeon_maos_verts.c
@@ -35,6 +35,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/glheader.h"
#include "main/imports.h"
#include "main/mtypes.h"
+#include "main/state.h"
#include "vbo/vbo.h"
#include "math/m_translate.h"
@@ -63,7 +64,7 @@ static struct {
#define DO_RGBA (IND & RADEON_CP_VC_FRMT_PKCOLOR)
#define DO_SPEC_OR_FOG (IND & RADEON_CP_VC_FRMT_PKSPEC)
#define DO_SPEC ((IND & RADEON_CP_VC_FRMT_PKSPEC) && \
- (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR))
+ _mesa_need_secondary_color(ctx))
#define DO_FOG ((IND & RADEON_CP_VC_FRMT_PKSPEC) && ctx->Fog.Enabled && \
(ctx->Fog.FogCoordinateSource == GL_FOG_COORD))
#define DO_TEX0 (IND & RADEON_CP_VC_FRMT_ST0)
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index 7abc6c3c8dd..7832eaacd91 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/mtypes.h"
#include "main/light.h"
#include "main/enums.h"
+#include "main/state.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
@@ -376,7 +377,7 @@ static GLboolean radeon_run_tcl_render( struct gl_context *ctx,
inputs |= VERT_BIT_NORMAL;
}
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
+ if (_mesa_need_secondary_color(ctx)) {
inputs |= VERT_BIT_COLOR1;
}
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index 4f3d3f64a38..7dd108c25d5 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -100,10 +100,9 @@ void
_mesa_print_tri_caps( const char *name, GLuint flags )
{
_mesa_debug(NULL,
- "%s: (0x%x) %s%s%s%s%s%s%s%s%s\n",
+ "%s: (0x%x) %s%s%s%s%s%s%s%s\n",
name,
flags,
- (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "",
(flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
(flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "",
(flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c97f90709dc..6aa3ab15cb7 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3167,7 +3167,6 @@ struct gl_matrix_stack
* Set in the __struct gl_contextRec::_TriangleCaps bitfield.
*/
/*@{*/
-#define DD_SEPARATE_SPECULAR (1 << 0)
#define DD_TRI_LIGHT_TWOSIDE (1 << 1)
#define DD_TRI_UNFILLED (1 << 2)
#define DD_TRI_SMOOTH (1 << 3)
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index f33bf08efea..e5e98dc5ee5 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -54,16 +54,6 @@
#include "blend.h"
-static void
-update_separate_specular(struct gl_context *ctx)
-{
- if (_mesa_need_secondary_color(ctx))
- ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
- else
- ctx->_TriangleCaps &= ~DD_SEPARATE_SPECULAR;
-}
-
-
/**
* Update the following fields:
* ctx->VertexProgram._Enabled
@@ -392,8 +382,6 @@ update_tricaps(struct gl_context *ctx, GLbitfield new_state)
*/
if (ctx->Light.Enabled && ctx->Light.Model.TwoSide)
ctx->_TriangleCaps |= DD_TRI_LIGHT_TWOSIDE;
- if (_mesa_need_secondary_color(ctx))
- ctx->_TriangleCaps |= DD_SEPARATE_SPECULAR;
}
#endif
@@ -471,9 +459,6 @@ _mesa_update_state_locked( struct gl_context *ctx )
if (new_state & _NEW_PIXEL)
_mesa_update_pixel( ctx, new_state );
- if (new_state & _MESA_NEW_SEPARATE_SPECULAR)
- update_separate_specular( ctx );
-
if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT))
update_viewport_matrix(ctx);