Also, make sure that field is copied/updated in the program clone and combine functions.
Without this we weren't getting SAMP declarations in the TGSI shaders.
prog->NumInstructions);
clone->InputsRead = prog->InputsRead;
clone->OutputsWritten = prog->OutputsWritten;
+ clone->SamplersUsed = prog->SamplersUsed;
memcpy(clone->TexturesUsed, prog->TexturesUsed, sizeof(prog->TexturesUsed));
if (prog->Parameters)
}
newProg->InputsRead = progA->InputsRead | inputsB;
newProg->OutputsWritten = progB->OutputsWritten;
+ newProg->SamplersUsed = progA->SamplersUsed | progB->SamplersUsed;
}
else {
/* vertex program */
ic++;
fp->Base.InputsRead = (1 << FRAG_ATTRIB_TEX0);
fp->Base.OutputsWritten = (1 << FRAG_RESULT_COLR);
+ fp->Base.SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
/* MAD colorTemp, colorTemp, scale, bias; */
if (key->scaleAndBias) {
p->InputsRead = FRAG_BIT_TEX0;
p->OutputsWritten = 0x0;
+ p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
stfp = (struct st_fragment_program *) p;
stfp->Base.UsesKill = GL_TRUE;
p->InputsRead = FRAG_BIT_TEX0 | FRAG_BIT_COL0;
p->OutputsWritten = (1 << FRAG_RESULT_COLR) | (1 << FRAG_RESULT_DEPR);
+ p->SamplersUsed = 0x1; /* sampler 0 (bit 0) is used */
stfp = (struct st_fragment_program *) p;
st_translate_fragment_program(st, stfp, NULL);