Turn specular lighting state on/off appropriately.
authorKeith Whitwell <keith@tungstengraphics.com>
Tue, 4 Jan 2005 12:53:41 +0000 (12:53 +0000)
committerKeith Whitwell <keith@tungstengraphics.com>
Tue, 4 Jan 2005 12:53:41 +0000 (12:53 +0000)
src/mesa/drivers/dri/unichrome/via_state.c

index 07d03d495f754378197fbd06ede40b5a91a108bc..84731a316a755e6676087775b838951891f8c091 100644 (file)
@@ -1559,6 +1559,11 @@ void viaValidateState( GLcontext *ctx )
     if (vmesa->newState & _NEW_STENCIL)
         viaChooseStencilState(ctx);
     
+    if (ctx->_TriangleCaps & DD_SEPARATE_SPECULAR)
+        vmesa->regEnable |= HC_HenCS_MASK;
+    else
+        vmesa->regEnable &= ~HC_HenCS_MASK;
+
     vmesa->newEmitState |= vmesa->newState;
     vmesa->newState = 0;
 }