summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
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/dri/radeon
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/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_lighting.c2
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_state.c2
2 files changed, 2 insertions, 2 deletions
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 );