aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2006-02-15 11:03:57 +0000
committerMichal Krol <[email protected]>2006-02-15 11:03:57 +0000
commit5bc35a823a7bdfd96d8a2428ed5630d04053ad34 (patch)
tree3a693cee25e37440e86f0a6719a015a937a2ce11
parentdc3a922cf30bf12cb01167bf1328d377ff3ee120 (diff)
Enable texcoords when program object in use.
-rw-r--r--src/mesa/main/texstate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 46cebe91067..dce8c362da3 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -2937,8 +2937,11 @@ update_texture_state( GLcontext *ctx )
ctx->Texture._EnabledCoordUnits = ctx->Texture._EnabledUnits;
/* Fragment programs may need texture coordinates but not the
* corresponding texture images.
- */
- if (ctx->FragmentProgram._Enabled) {
+ */
+ if (ctx->ShaderObjects.CurrentProgram != NULL) {
+ ctx->Texture._EnabledCoordUnits |= (1 << 8) - 1;
+ }
+ else if (ctx->FragmentProgram._Enabled) {
ctx->Texture._EnabledCoordUnits |=
(ctx->FragmentProgram.Current->Base.InputsRead >> FRAG_ATTRIB_TEX0);
}