nak: Implement b2i64

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26246>
This commit is contained in:
Faith Ekstrand 2023-12-04 14:57:03 -06:00 committed by Marge Bot
parent 943eae018b
commit 39db9cf0a7

View file

@ -467,6 +467,11 @@ impl<'a> ShaderFromNir<'a> {
nir_op_b2b32 | nir_op_b2i8 | nir_op_b2i16 | nir_op_b2i32 => {
b.sel(srcs[0].bnot(), 0.into(), 1.into())
}
nir_op_b2i64 => {
let lo = b.sel(srcs[0].bnot(), 0.into(), 1.into());
let hi = b.copy(0.into());
[lo[0], hi[0]].into()
}
nir_op_b2f32 => {
b.sel(srcs[0].bnot(), 0.0_f32.into(), 1.0_f32.into())
}