v3d: don't use intr->num_components for non-vectorized intrinsics
authorRob Clark <robdclark@chromium.org>
Thu, 11 Jun 2020 00:27:08 +0000 (17:27 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Jun 2020 02:48:18 +0000 (02:48 +0000)
Squashed-in-fix-from: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5371>

src/broadcom/compiler/nir_to_vir.c
src/broadcom/compiler/v3d_nir_lower_io.c

index 6219b381d4e0b4ea50e0c861925df7f9368c1b49..1086e288a60ba57c8e04069897ac1fbe9e652a4e 100644 (file)
@@ -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) *
index 855b9c44b46cebd15e0dfe0ca6d46e3da46b45d9..2d3d307ef2f6e10c9674849029118f01c79fc12a 100644 (file)
@@ -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;