mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
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:6513c675ad("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> (cherry picked from commit259ba104f7)
This commit is contained in:
parent
8f3f35b868
commit
506b1b801a
2 changed files with 8 additions and 2 deletions
|
|
@ -474,7 +474,7 @@
|
|||
"description": "nv50/ir: Support vector movs",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "6513c675ad31d192265a8286d712e8ae81c9f305",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2592,7 +2592,13 @@ Converter::visit(nir_alu_instr *insn)
|
|||
i->sType = sTypes[0];
|
||||
break;
|
||||
}
|
||||
case nir_op_mov:
|
||||
case nir_op_mov: {
|
||||
LValues &newDefs = convert(&insn->dest);
|
||||
for (LValues::size_type c = 0u; c < newDefs.size(); ++c) {
|
||||
mkMov(newDefs[c], getSrc(&insn->src[0], c), dType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case nir_op_vec2:
|
||||
case nir_op_vec3:
|
||||
case nir_op_vec4:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue