From 78adf448390e3866e0ccda7762bd869dd6d9ce0f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 14 Oct 2022 21:27:21 -0400 Subject: [PATCH] nir/lower_io: Set interpolated_input dest_type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ...even for non-pixel interpolation, for consistency. Otherwise backends get funny intrinsics with interpolateAt: vec4 32 ssa_4 = intrinsic load_interpolated_input (ssa_3, ssa_2) (base=1, component=0, dest_type=invalid /*0*/, io location=33 slots=1 /*161*/) We know it'll be a float, but backends shouldn't need to special case this. (Or maybe interpolated_input shouldn't have a dest_type index. I'd be ok with that resolution too. But having one and not setting it consistently is wrong.) Signed-off-by: Alyssa Rosenzweig Reviewed-by: Marek Olšák Part-of: --- src/compiler/nir/nir_lower_io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/nir/nir_lower_io.c b/src/compiler/nir/nir_lower_io.c index 943450ca9fb..1776648c456 100644 --- a/src/compiler/nir/nir_lower_io.c +++ b/src/compiler/nir/nir_lower_io.c @@ -631,7 +631,8 @@ lower_interpolate_at(nir_intrinsic_instr *intrin, struct lower_io_state *state, offset, .base = var->data.driver_location, .component = component, - .io_semantics = semantics); + .io_semantics = semantics, + .dest_type = nir_type_float | intrin->dest.ssa.bit_size); return load; }