diff options
author | Eric Anholt <[email protected]> | 2012-06-25 10:23:24 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-07-20 10:43:33 -0700 |
commit | abcdbdf9cce3c7520ee999fac3099d609960847d (patch) | |
tree | fd3c3bb8d17baff017aeea9819d04fd695c31a6b /src/mesa/state_tracker | |
parent | f609cf782ab5e90ddf045dc4b0da8cebf99be0d1 (diff) |
mesa: Move the _mesa_uniform_merge_location_offset to glGetUniformLocation().
With the upcoming GL_ARB_uniform_buffer_object changes, the only
other caller that will want the cooked value is state_tracker.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8 |
1 files changed, 5 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 34dbfd3b2b1..50c450ea40c 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -2889,13 +2889,15 @@ set_uniform_initializer(struct gl_context *ctx, void *mem_ctx, return; } - int loc = _mesa_get_uniform_location(ctx, shader_program, name); - - if (loc == -1) { + unsigned offset; + unsigned index = _mesa_get_uniform_location(ctx, shader_program, name, + &offset); + if (offset == GL_INVALID_INDEX) { fail_link(shader_program, "Couldn't find uniform for initializer %s\n", name); return; } + int loc = _mesa_uniform_merge_location_offset(index, offset); for (unsigned int i = 0; i < (type->is_array() ? type->length : 1); i++) { ir_constant *element; |