Module: Mesa Branch: master Commit: ce5e9139aa1eee78e9154ded84b724b0cecbece7 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce5e9139aa1eee78e9154ded84b724b0cecbece7
Author: Jason Ekstrand <[email protected]> Date: Tue Aug 18 11:20:40 2015 -0700 nir/lower_io: Separate driver_location and base offset for uniforms Reviewed-by: Kenneth Graunke <[email protected]> --- src/glsl/nir/nir_lower_io.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c index 15a4edc..70645b6 100644 --- a/src/glsl/nir/nir_lower_io.c +++ b/src/glsl/nir/nir_lower_io.c @@ -244,9 +244,14 @@ nir_lower_io_block(nir_block *block, void *void_state) nir_src indirect; unsigned offset = get_io_offset(intrin->variables[0], &intrin->instr, &indirect, state); - offset += intrin->variables[0]->var->data.driver_location; - load->const_index[0] = offset; + unsigned location = intrin->variables[0]->var->data.driver_location; + if (mode == nir_var_uniform) { + load->const_index[0] = location; + load->const_index[1] = offset; + } else { + load->const_index[0] = location + offset; + } if (has_indirect) load->src[0] = indirect; _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
