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 <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22674>
(cherry picked from commit d49c7b9582)
This commit is contained in:
M Henning 2023-04-25 01:41:03 -04:00 committed by Dylan Baker
parent a0c93057a9
commit ba474aff62
2 changed files with 2 additions and 2 deletions

View file

@ -10334,7 +10334,7 @@
"description": "nouveau/codegen: Check nir_dest_num_components",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -2532,7 +2532,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; \
} \