summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i830/i830_state.c2
-rw-r--r--src/mesa/drivers/dri/mga/mgastate.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lighting.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_state.c b/src/mesa/drivers/dri/i830/i830_state.c
index 7c80e8b7d2..0fde909571 100644
--- a/src/mesa/drivers/dri/i830/i830_state.c
+++ b/src/mesa/drivers/dri/i830/i830_state.c
@@ -979,7 +979,7 @@ static void update_specular( GLcontext *ctx )
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;
diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c
index 47c425d7ca..2066b93436 100644
--- a/src/mesa/drivers/dri/mga/mgastate.c
+++ b/src/mesa/drivers/dri/mga/mgastate.c
@@ -483,7 +483,7 @@ static void updateSpecularLighting( GLcontext *ctx )
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;
diff --git a/src/mesa/drivers/dri/radeon/radeon_lighting.c b/src/mesa/drivers/dri/radeon/radeon_lighting.c
index b00c9cb6de..44e00af0ef 100644
--- a/src/mesa/drivers/dri/radeon/radeon_lighting.c
+++ b/src/mesa/drivers/dri/radeon/radeon_lighting.c
@@ -550,7 +550,7 @@ void radeonUpdateSpecular( GLcontext *ctx )
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;
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 25aa3fadfe..668fd49171 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -738,7 +738,7 @@ static void radeonUpdateSpecular( GLcontext *ctx )
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 );