On 07/25/2015 12:04 AM, Jason Ekstrand wrote: > I think we already agreed to just copy data.location into > data.driver_location and we don't need this special-casing. > > Just making a note of it as I review. > --Jason >
Yes, I have completely removed this patch from the series. Now all the agreed changes live in the patch that implements store_output intrinsic, which now looks like this: https://github.com/Igalia/mesa/commit/c7bfd3e8f0fa5540b4728f712e8441c254d029ba > On Thu, Jul 23, 2015 at 3:17 AM, Eduardo Lima Mitev <el...@igalia.com> wrote: >> Non-scalar backends like i965's NIR-vec4 need the orginal variable's varying >> value instead of the driver_location (due to the way URB file emission is >> implemented). This patch stores variable's location in const_index[0] >> instead of >> the current driver_location value, which is not needed. >> --- >> src/glsl/nir/nir_lower_io.c | 12 ++++++++++-- >> 1 file changed, 10 insertions(+), 2 deletions(-) >> >> diff --git a/src/glsl/nir/nir_lower_io.c b/src/glsl/nir/nir_lower_io.c >> index ccc832b..71a925c 100644 >> --- a/src/glsl/nir/nir_lower_io.c >> +++ b/src/glsl/nir/nir_lower_io.c >> @@ -378,9 +378,17 @@ 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; >> >> - store->const_index[0] = offset; >> + /* Some non-scalar backends (like i965's NIR-vec4) need the orginal >> + * variable's varying value instead of the driver_location. >> + */ >> + if (!state->is_scalar) { >> + store->const_index[0] = >> + intrin->variables[0]->var->data.location + offset; >> + } else { >> + store->const_index[0] = >> + intrin->variables[0]->var->data.driver_location + offset; >> + } >> >> nir_src_copy(&store->src[0], &intrin->src[0], state->mem_ctx); >> >> -- >> 2.1.4 >> >> _______________________________________________ >> mesa-dev mailing list >> mesa-dev@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/mesa-dev > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev