* samplers, etc).
*/
static void
-count_resources(glsl_to_tgsi_visitor *v)
+count_resources(glsl_to_tgsi_visitor *v, gl_program *prog)
{
v->samplers_used = 0;
if (_mesa_is_tex_instruction(inst->op)) {
v->samplers_used |= 1 << inst->sampler;
+
+ prog->SamplerTargets[inst->sampler] =
+ (gl_texture_index)inst->tex_target;
+ if (inst->tex_shadow) {
+ prog->ShadowSamplers |= 1 << inst->sampler;
+ }
}
}
+
+ prog->SamplersUsed = v->samplers_used;
+ _mesa_update_shader_textures_used(prog);
}
prog->NumInstructions = 0;
do_set_program_inouts(shader->ir, prog);
- count_resources(v);
+ count_resources(v, prog);
check_resources(ctx, shader_program, v, prog);