iris: Copy dest size from the original intrinsic in setup_uniforms
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 11 Aug 2020 15:38:22 +0000 (10:38 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 12 Aug 2020 10:11:06 +0000 (10:11 +0000)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6280>

src/gallium/drivers/iris/iris_program.c

index 80af3323bb9019532b217a9654494492904ba6e7..8470022eb9d26d4e429ddc2dd8956baa905e4c17 100644 (file)
@@ -535,15 +535,15 @@ iris_setup_uniforms(const struct brw_compiler *compiler,
             continue;
          }
 
-         unsigned comps = nir_intrinsic_dest_components(intrin);
-
          nir_intrinsic_instr *load =
             nir_intrinsic_instr_create(nir, nir_intrinsic_load_ubo);
-         load->num_components = comps;
+         load->num_components = intrin->dest.ssa.num_components;
          load->src[0] = nir_src_for_ssa(temp_ubo_name);
          load->src[1] = nir_src_for_ssa(offset);
          nir_intrinsic_set_align(load, 4, 0);
-         nir_ssa_dest_init(&load->instr, &load->dest, comps, 32, NULL);
+         nir_ssa_dest_init(&load->instr, &load->dest,
+                           intrin->dest.ssa.num_components,
+                           intrin->dest.ssa.bit_size, NULL);
          nir_builder_instr_insert(&b, &load->instr);
          nir_ssa_def_rewrite_uses(&intrin->dest.ssa,
                                   nir_src_for_ssa(&load->dest.ssa));