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>
(cherry picked from commit 649251ad4e)
This commit is contained in:
Mike Blumenkrantz 2021-08-17 14:04:16 -04:00 committed by Dylan Baker
parent 1133671ea3
commit fa069379b4
2 changed files with 2 additions and 1 deletions

View file

@ -112,7 +112,7 @@
"description": "nir/lower_vectorize_tess_levels: set num_components for vectorized loads",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "f5adf27fb926a330a13af716f0a03da1a224656d"
},

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);
}