init SamplersUsed bits in _mesa_parse_arb_fragment_program
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 14 May 2008 22:44:48 +0000 (16:44 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 16 May 2008 21:16:06 +0000 (15:16 -0600)
src/mesa/shader/arbprogparse.c

index 74004e9b137f8d9000aad5605e2d26958836d092..60aaabe679feb78697c1ce589f26b1f29daccf87 100644 (file)
@@ -3851,8 +3851,11 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
    program->Base.NumNativeTexIndirections = ap.Base.NumTexIndirections;
    program->Base.InputsRead      = ap.Base.InputsRead;
    program->Base.OutputsWritten  = ap.Base.OutputsWritten;
-   for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
+   for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) {
       program->Base.TexturesUsed[i] = ap.TexturesUsed[i];
+      if (ap.TexturesUsed[i])
+         program->Base.SamplersUsed |= (1 << i);
+   }
    program->Base.ShadowSamplers = ap.ShadowSamplers;
    program->FogOption          = ap.FogOption;
    program->UsesKill          = ap.UsesKill;