mesa: set SamplersUsed bitmask when parsing ARB fragment programs
authorBrian <brian.paul@tungstengraphics.com>
Wed, 12 Mar 2008 21:33:41 +0000 (15:33 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Wed, 12 Mar 2008 21:34:24 +0000 (15:34 -0600)
src/mesa/shader/arbprogparse.c

index b6b3c88b1450449ebefe143e4d5ae523dee947bb..e385b9d99736673d28b98b5a9306a7c33b72caf9 100644 (file)
@@ -3910,8 +3910,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;