From 853bda3e7c4dfa7d8cc462729f6a3dce89e44963 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 9 Dec 2003 01:53:03 +0000 Subject: Update NEED_SECONDARY_COLOR macro to test if either vertex/fragment programs are enabled and if they need secondary color input register. Patch by Karl Rasche, with tweaks by Brian. --- src/mesa/main/context.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/mesa/main/context.h') diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 2687dc596a..d6d7920bb4 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -374,7 +374,12 @@ do { \ #define NEED_SECONDARY_COLOR(CTX) \ (((CTX)->Light.Enabled && \ (CTX)->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) \ - || (CTX)->Fog.ColorSumEnabled) + || (CTX)->Fog.ColorSumEnabled \ + || ((CTX)->VertexProgram.Enabled && \ + ((CTX)->VertexProgram.Current->InputsRead & VERT_BIT_COLOR1)) \ + || ((CTX)->FragmentProgram.Enabled && \ + ((CTX)->FragmentProgram.Current->InputsRead & FRAG_BIT_COL1)) \ + ) /** -- cgit v1.2.3