summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-11-14 18:12:16 -0800
committerIan Romanick <[email protected]>2012-01-11 12:51:24 -0800
commit6a992c3288b6f7a5d94172c9ad1908e71e58233e (patch)
tree01de8311508d0034fc622393f2e7abcbef4742bd /src/mesa/state_tracker
parent32be81de39f7548e353afabf1215b0ea7c7b0916 (diff)
linker: Calculate the sampler to texture target mapping during linking
Track the calculated data in gl_shader_program instead of the individual assembly shaders. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 555f88bc2d9..f5bee013d1e 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -2843,8 +2843,6 @@ count_resources(glsl_to_tgsi_visitor *v, gl_program *prog)
if (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;
}
@@ -2852,7 +2850,9 @@ count_resources(glsl_to_tgsi_visitor *v, gl_program *prog)
}
prog->SamplersUsed = v->samplers_used;
- _mesa_update_shader_textures_used(prog);
+
+ if (v->shader_program != NULL)
+ _mesa_update_shader_textures_used(v->shader_program, prog);
}
static void