summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/uniforms.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-04 17:05:22 +1100
committerTimothy Arceri <[email protected]>2017-01-06 11:21:42 +1100
commit53a509723ff10ae1494e611de3823f17b7e9f225 (patch)
tree807c5bffbfa4027f9c178787709187812c4570bc /src/mesa/main/uniforms.c
parent7cc61cf706e857e27ea3ce9578b9c480bfbc94a1 (diff)
mesa/glsl: set sampler units directly in gl_program
Now that we create gl_program earlier there is no need to mess about copying things to gl_linked_shader then to gl_program. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/uniforms.c')
-rw-r--r--src/mesa/main/uniforms.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index f26fd784e71..5534fcf2abe 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -73,14 +73,13 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
assert(shader);
- memcpy(prog->SamplerUnits, shader->SamplerUnits, sizeof(prog->SamplerUnits));
memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
shProg->SamplersValidated = GL_TRUE;
while (mask) {
const int s = u_bit_scan(&mask);
- GLuint unit = shader->SamplerUnits[s];
+ GLuint unit = prog->SamplerUnits[s];
GLuint tgt = shader->SamplerTargets[s];
assert(unit < ARRAY_SIZE(prog->TexturesUsed));
assert(tgt < NUM_TEXTURE_TARGETS);