From: Jose Maria Casanova Crespo Date: Sat, 13 Jun 2020 23:48:39 +0000 (+0200) Subject: vc4: don't relay on intr->num_components for non-vectorized intrinsics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be16833d9674ff3795b420a73b8ae2e1367bb0e2;p=mesa.git vc4: don't relay on intr->num_components for non-vectorized intrinsics Signed-off-by: Rob Clark Part-of: --- diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 2d16c479313..4bf7e367213 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1775,7 +1775,7 @@ ntq_emit_intrinsic(struct vc4_compile *c, nir_intrinsic_instr *instr) break; case nir_intrinsic_load_user_clip_plane: - for (int i = 0; i < instr->num_components; i++) { + for (int i = 0; i < nir_intrinsic_dest_components(instr); i++) { ntq_store_dest(c, &instr->dest, i, qir_uniform(c, QUNIFORM_USER_CLIP_PLANE, nir_intrinsic_ucp_id(instr) *