diff options
author | Ian Romanick <[email protected]> | 2011-11-14 18:12:16 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-01-11 12:51:24 -0800 |
commit | 6a992c3288b6f7a5d94172c9ad1908e71e58233e (patch) | |
tree | 01de8311508d0034fc622393f2e7abcbef4742bd /src/mesa/main/uniforms.c | |
parent | 32be81de39f7548e353afabf1215b0ea7c7b0916 (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/main/uniforms.c')
-rw-r--r-- | src/mesa/main/uniforms.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c index 685c0f13fcf..e0214a88a7a 100644 --- a/src/mesa/main/uniforms.c +++ b/src/mesa/main/uniforms.c @@ -60,7 +60,8 @@ * We'll use that info for state validation before rendering. */ void -_mesa_update_shader_textures_used(struct gl_program *prog) +_mesa_update_shader_textures_used(struct gl_shader_program *shProg, + struct gl_program *prog) { GLuint s; @@ -68,8 +69,8 @@ _mesa_update_shader_textures_used(struct gl_program *prog) for (s = 0; s < MAX_SAMPLERS; s++) { if (prog->SamplersUsed & (1 << s)) { - GLuint unit = prog->SamplerUnits[s]; - GLuint tgt = prog->SamplerTargets[s]; + GLuint unit = shProg->SamplerUnits[s]; + GLuint tgt = shProg->SamplerTargets[s]; assert(unit < Elements(prog->TexturesUsed)); assert(tgt < NUM_TEXTURE_TARGETS); prog->TexturesUsed[unit] |= (1 << tgt); |