From be16833d9674ff3795b420a73b8ae2e1367bb0e2 Mon Sep 17 00:00:00 2001 From: Jose Maria Casanova Crespo Date: Sun, 14 Jun 2020 01:48:39 +0200 Subject: [PATCH] vc4: don't relay on intr->num_components for non-vectorized intrinsics Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/vc4/vc4_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) * -- 2.30.2