Mesa (main): nir/lower_vectorize_tess_levels: set num_components for vectorized loads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 18 12:51:54 UTC 2021
Module: Mesa
Branch: main
Commit: 649251ad4e031609dafd4034b802d292fea6131c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=649251ad4e031609dafd4034b802d292fea6131c
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue Aug 17 14:04:16 2021 -0400
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: f5adf27fb92 ("nir,radv: add and use nir_vectorize_tess_levels()")
fixes zmike/mesa#94
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12419>
---
src/compiler/nir/nir_lower_io_to_vector.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/compiler/nir/nir_lower_io_to_vector.c b/src/compiler/nir/nir_lower_io_to_vector.c
index 433e5ccff10..13d692e72be 100644
--- a/src/compiler/nir/nir_lower_io_to_vector.c
+++ b/src/compiler/nir/nir_lower_io_to_vector.c
@@ -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);
}
More information about the mesa-commit
mailing list