Module: Mesa Branch: main Commit: d49c7b958214e551e10d09be300c5cdaf951315d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d49c7b958214e551e10d09be300c5cdaf951315d
Author: M Henning <[email protected]> Date: Tue Apr 25 01:41:03 2023 -0400 nouveau/codegen: Check nir_dest_num_components instead of reaching into a union and pulling out garbage when the dest is a reg Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8863 Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22674> --- src/nouveau/codegen/nv50_ir_from_nir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nouveau/codegen/nv50_ir_from_nir.cpp b/src/nouveau/codegen/nv50_ir_from_nir.cpp index 4801d42f18a..faf756d7351 100644 --- a/src/nouveau/codegen/nv50_ir_from_nir.cpp +++ b/src/nouveau/codegen/nv50_ir_from_nir.cpp @@ -2539,7 +2539,7 @@ Converter::visit(nir_load_const_instr *insn) } #define DEFAULT_CHECKS \ - if (insn->dest.dest.ssa.num_components > 1) { \ + if (nir_dest_num_components(insn->dest.dest) > 1) { \ ERROR("nir_alu_instr only supported with 1 component!\n"); \ return false; \ } \
