nir/lower_io: Set interpolated_input dest_type

...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 <alyssa@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19085>
This commit is contained in:
Alyssa Rosenzweig
2022-10-14 21:27:21 -04:00
committed by Marge Bot
parent 0191b06756
commit 78adf44839
+2 -1
View File
@@ -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;
}