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 <eric@anholt.net>
This commit is contained in:
Timothy Arceri
2016-11-04 17:05:22 +11:00
parent 7cc61cf706
commit 53a509723f
4 changed files with 7 additions and 17 deletions

View File

@@ -134,7 +134,8 @@ set_opaque_binding(void *mem_ctx, gl_shader_program *prog,
storage->opaque[sh].active) {
for (unsigned i = 0; i < elements; i++) {
const unsigned index = storage->opaque[sh].index + i;
shader->SamplerUnits[index] = storage->storage[i].i;
shader->Program->SamplerUnits[index] =
storage->storage[i].i;
}
} else if (storage->type->base_type == GLSL_TYPE_IMAGE &&
@@ -242,7 +243,7 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog,
if (shader && storage->opaque[sh].active) {
unsigned index = storage->opaque[sh].index;
shader->SamplerUnits[index] = storage->storage[0].i;
shader->Program->SamplerUnits[index] = storage->storage[0].i;
}
}
}