diff options
author | Timothy Arceri <[email protected]> | 2016-11-04 17:05:22 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-06 11:21:42 +1100 |
commit | 53a509723ff10ae1494e611de3823f17b7e9f225 (patch) | |
tree | 807c5bffbfa4027f9c178787709187812c4570bc /src/compiler/glsl | |
parent | 7cc61cf706e857e27ea3ce9578b9c480bfbc94a1 (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/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/link_uniform_initializers.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/glsl/link_uniform_initializers.cpp b/src/compiler/glsl/link_uniform_initializers.cpp index 6f05a3a8098..7439fd3789a 100644 --- a/src/compiler/glsl/link_uniform_initializers.cpp +++ b/src/compiler/glsl/link_uniform_initializers.cpp @@ -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; } } } |