#include "main/enums.h"
#include "main/colormac.h"
#include "main/light.h"
+#include "main/state.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
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;
}
#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"
#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)
#include "main/mtypes.h"
#include "main/light.h"
#include "main/enums.h"
+#include "main/state.h"
#include "vbo/vbo.h"
#include "tnl/tnl.h"
inputs |= VERT_BIT_NORMAL;
}
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) {
+ if (_mesa_need_secondary_color(ctx)) {
inputs |= VERT_BIT_COLOR1;
}
_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, " : "",
* 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)
#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
*/
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
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);