From: Rob Clark Date: Thu, 11 Jun 2020 00:27:08 +0000 (-0700) Subject: v3d: don't use intr->num_components for non-vectorized intrinsics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c148dbe07e77f5146cf558afe03649a1146bf490;p=mesa.git v3d: don't use intr->num_components for non-vectorized intrinsics Squashed-in-fix-from: Jose Maria Casanova Crespo Signed-off-by: Rob Clark Part-of: --- diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c index 6219b381d4e..1086e288a60 100644 --- a/src/broadcom/compiler/nir_to_vir.c +++ b/src/broadcom/compiler/nir_to_vir.c @@ -2123,7 +2123,7 @@ ntq_emit_intrinsic(struct v3d_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, vir_uniform(c, QUNIFORM_USER_CLIP_PLANE, nir_intrinsic_ucp_id(instr) * diff --git a/src/broadcom/compiler/v3d_nir_lower_io.c b/src/broadcom/compiler/v3d_nir_lower_io.c index 855b9c44b46..2d3d307ef2f 100644 --- a/src/broadcom/compiler/v3d_nir_lower_io.c +++ b/src/broadcom/compiler/v3d_nir_lower_io.c @@ -219,7 +219,6 @@ v3d_nir_lower_vpm_output(struct v3d_compile *c, nir_builder *b, nir_intrinsic_instr *load = nir_intrinsic_instr_create(b->shader, nir_intrinsic_load_fb_layers_v3d); - load->num_components = 1; nir_ssa_dest_init(&load->instr, &load->dest, 1, 32, NULL); nir_builder_instr_insert(b, &load->instr); nir_ssa_def *fb_layers = &load->dest.ssa;