nir/lower_clip: location offset goes into offset, not base

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13917>
This commit is contained in:
Ilia Mirkin
2021-11-22 17:54:09 -05:00
committed by Marge Bot
parent a8930e6302
commit 3bf47700e2

View File

@@ -121,14 +121,14 @@ load_clipdist_input(nir_builder *b, nir_variable *in, int location_offset,
nir_ssa_def *barycentric = nir_load_barycentric(
b, nir_intrinsic_load_barycentric_pixel, INTERP_MODE_NONE);
load = nir_load_interpolated_input(
b, 4, 32, barycentric, nir_imm_int(b, 0),
.base = in->data.driver_location + location_offset,
b, 4, 32, barycentric, nir_imm_int(b, location_offset),
.base = in->data.driver_location,
.dest_type = nir_type_float32,
.io_semantics = semantics);
} else {
load = nir_load_input(b, 4, 32, nir_imm_int(b, 0),
.base = in->data.driver_location + location_offset,
load = nir_load_input(b, 4, 32, nir_imm_int(b, location_offset),
.base = in->data.driver_location,
.dest_type = nir_type_float32,
.io_semantics = semantics);
}