summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2004-01-28 08:21:05 +0000
committerKeith Whitwell <[email protected]>2004-01-28 08:21:05 +0000
commit43b57728340e70827a114c384192ed319abdb5c6 (patch)
tree65293082fd34070922248f58bd36df5eee23174e /src/mesa/drivers
parentc78a89d761a104dfe92ab42d3d52bb69c43105c1 (diff)
Use NEED_SECONDARY_COLOR() for checking specular state at all times
when ctx->_TriangleCaps might be inaccurate (ie while ctx->NewState might be non-zero).
Diffstat (limited to 'src/mesa/drivers')
-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 7c80e8b7d27..0fde9095719 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 47c425d7ca3..2066b934364 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 b00c9cb6ded..44e00af0ef5 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 25aa3fadfe9..668fd491715 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 );