nak: Implement nir_op_b2f32

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:53:18 -06:00 committed by Marge Bot
parent 708d928fbf
commit 4c057423e8

View file

@ -86,6 +86,14 @@ impl<'a> ShaderFromNir<'a> {
let dst = self.get_dst(&alu.def);
match alu.op {
nir_op_b2f32 => {
self.instrs.push(Instr::new(Op::Sel(OpSel {
dst: dst,
cond: srcs[0],
srcs: [Src::Zero, Src::new_imm_u32(0x3f800000)],
cond_mod: SrcMod::BNot,
})));
}
nir_op_bcsel => {
self.instrs
.push(Instr::new_sel(dst, srcs[0], srcs[1], srcs[2]));