nir/lower_vectorize_tess_levels: set num_components for vectorized loads

this otherwise explodes when rewriting e.g., a single array component load to a vec4

Fixes: f5adf27fb9 ("nir,radv: add and use nir_vectorize_tess_levels()")

fixes zmike/mesa#94

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12419>
This commit is contained in:
Mike Blumenkrantz 2021-08-17 14:04:16 -04:00 committed by Marge Bot
parent 45a61f1782
commit 649251ad4e
1 changed files with 1 additions and 0 deletions

View File

@ -632,6 +632,7 @@ nir_vectorize_tess_levels_impl(nir_function_impl *impl)
} else {
b.cursor = nir_after_instr(instr);
nir_ssa_def *val = &intrin->dest.ssa;
val->num_components = intrin->num_components;
nir_ssa_def *comp = nir_channel(&b, val, index);
nir_ssa_def_rewrite_uses_after(val, comp, comp->parent_instr);
}