ARB prog: get frag prog texture info from the right place
authorIan Romanick <ian.d.romanick@intel.com>
Sat, 25 Jul 2009 00:33:30 +0000 (17:33 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Sat, 25 Jul 2009 00:33:30 +0000 (17:33 -0700)
This gets basic texturing working.  w00t!

src/mesa/shader/arbprogparse.c
src/mesa/shader/program_parser.h

index 36470b669c5ede4e9efb5ad57844356cf80153fb..42a53789999ef233b5702ed4e0a53dc8ec4465ee 100644 (file)
@@ -3971,11 +3971,11 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
    program->Base.InputsRead      = prog.InputsRead;
    program->Base.OutputsWritten  = prog.OutputsWritten;
    for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) {
-      program->Base.TexturesUsed[i] = state.fragment.TexturesUsed[i];
-      if (state.fragment.TexturesUsed[i])
+      program->Base.TexturesUsed[i] = prog.TexturesUsed[i];
+      if (prog.TexturesUsed[i])
          program->Base.SamplersUsed |= (1 << i);
    }
-   program->Base.ShadowSamplers = state.fragment.ShadowSamplers;
+   program->Base.ShadowSamplers = prog.ShadowSamplers;
    switch (state.option.Fog) {
    case OPTION_FOG_EXP:    program->FogOption = GL_EXP;    break;
    case OPTION_FOG_EXP2:   program->FogOption = GL_EXP2;   break;
index aeb2efd7ab6b88b2f9b40937807bdf1f3f1e3f65..b4c24ec92cc4d5e59a1fa0cab6cb369af6ececd6 100644 (file)
@@ -194,8 +194,6 @@ struct asm_parser_state {
    } option;
 
    struct {
-      unsigned TexturesUsed[MAX_TEXTURE_IMAGE_UNITS];
-      unsigned ShadowSamplers;
       unsigned UsesKill:1;
    } fragment;
 };