I830_STATECHANGE(imesa, I830_UPLOAD_CTX);
imesa->Setup[I830_CTXREG_ENABLES_1] &= ~ENABLE_SPEC_ADD_MASK;
- if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
+ if (NEED_SECONDARY_COLOR(ctx))
imesa->Setup[I830_CTXREG_ENABLES_1] |= ENABLE_SPEC_ADD;
else
imesa->Setup[I830_CTXREG_ENABLES_1] |= DISABLE_SPEC_ADD;
mgaContextPtr mmesa = MGA_CONTEXT(ctx);
unsigned int specen;
- specen = (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR) ? TMC_specen_enable : 0;
+ specen = NEED_SECONDARY_COLOR(ctx) ? TMC_specen_enable : 0;
if ( specen != mmesa->hw.specen ) {
mmesa->hw.specen = specen;
radeonContextPtr rmesa = RADEON_CONTEXT(ctx);
GLuint p = rmesa->hw.ctx.cmd[CTX_PP_CNTL];
- if ( ctx->_TriangleCaps & DD_SEPARATE_SPECULAR ) {
+ if (NEED_SECONDARY_COLOR(ctx)) {
p |= RADEON_SPECULAR_ENABLE;
} else {
p &= ~RADEON_SPECULAR_ENABLE;
rmesa->hw.tcl.cmd[TCL_LIGHT_MODEL_CTL] |= RADEON_LIGHTING_ENABLE;
}
- if ( ctx->_TriangleCaps & DD_SEPARATE_SPECULAR ) {
+ if (NEED_SECONDARY_COLOR(ctx)) {
assert( (p & RADEON_SPECULAR_ENABLE) != 0 );
} else {
assert( (p & RADEON_SPECULAR_ENABLE) == 0 );