diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.h | 7 | ||||
-rw-r--r-- | src/mesa/main/nvfragprog.h | 15 |
2 files changed, 21 insertions, 1 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index 2687dc596a9..d6d7920bb4f 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)) \ + ) /** diff --git a/src/mesa/main/nvfragprog.h b/src/mesa/main/nvfragprog.h index 772edd6be44..7752ddbab47 100644 --- a/src/mesa/main/nvfragprog.h +++ b/src/mesa/main/nvfragprog.h @@ -50,6 +50,21 @@ #define FRAG_ATTRIB_TEX6 10 #define FRAG_ATTRIB_TEX7 11 +/* Bitmasks for the above */ +#define FRAG_BIT_WPOS (1 << FRAG_ATTRIB_WPOS) +#define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0) +#define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1) +#define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC) +#define FRAG_BIT_TEX0 (1 << FRAG_ATTRIB_TEX0) +#define FRAG_BIT_TEX1 (1 << FRAG_ATTRIB_TEX1) +#define FRAG_BIT_TEX2 (1 << FRAG_ATTRIB_TEX2) +#define FRAG_BIT_TEX3 (1 << FRAG_ATTRIB_TEX3) +#define FRAG_BIT_TEX4 (1 << FRAG_ATTRIB_TEX4) +#define FRAG_BIT_TEX5 (1 << FRAG_ATTRIB_TEX5) +#define FRAG_BIT_TEX6 (1 << FRAG_ATTRIB_TEX6) +#define FRAG_BIT_TEX7 (1 << FRAG_ATTRIB_TEX7) + +/* output registers */ #define FRAG_OUTPUT_COLR 0 #define FRAG_OUTPUT_COLH 1 #define FRAG_OUTPUT_DEPR 2 |