nv50/ir: Support vector movs
authorFaith Ekstrand <faith.ekstrand@collabora.com>
Sat, 15 Jul 2023 05:15:12 +0000 (00:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 15 Jul 2023 15:53:40 +0000 (15:53 +0000)
commit259ba104f79f9f653130865b21bccfab62dd4829
tree0330ef633b54448fe329a1466ff70891781f15d1
parent39824457283bf194c2e2773c19708848027121e1
nv50/ir: Support vector movs

nir_opt_mov and nir_op_vecN are only the same if the mov is only a
single component.  Otherwise the vec loop will try to access src[c]
where c > 0 which breaks for nir_op_mov.  It's uncommon but scalar
back-ends can see vector movs so we need to handle this correctly.

Fixes: 6513c675ad31 ("nv50/ir/nir: implement nir_alu_instr handling")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24167>
src/nouveau/codegen/nv50_ir_from_nir.cpp