{
assert(num_components <= 4);
nir_ssa_def *unpacked = nir_unpack_unorm_4x8(b, nir_channel(b, pack, 0));
- return nir_f2f16(b, unpacked);
+ return nir_f2fmp(b, unpacked);
}
/* UNORM 4 is also unpacked to f16, which prevents us from using the shared
nir_ssa_def *scales, nir_ssa_def *shifts)
{
nir_ssa_def *channels = nir_unpack_32_4x8(b, nir_channel(b, pack, 0));
- nir_ssa_def *raw = nir_ushr(b, nir_u2u16(b, channels), shifts);
+ nir_ssa_def *raw = nir_ushr(b, nir_u2ump(b, channels), shifts);
return nir_fmul(b, nir_u2f16(b, raw), scales);
}
{
nir_ssa_def *p = nir_channel(b, packed, 0);
nir_ssa_def *bytes = nir_unpack_32_4x8(b, p);
- nir_ssa_def *ubytes = nir_u2u16(b, bytes);
+ nir_ssa_def *ubytes = nir_u2ump(b, bytes);
nir_ssa_def *shifts = nir_ushr(b, pan_replicate_4(b, nir_channel(b, ubytes, 3)),
nir_imm_ivec4(b, 0, 2, 4, 6));
nir_ssa_def *precision = nir_iand(b, shifts,
- nir_i2i16(b, nir_imm_ivec4(b, 0x3, 0x3, 0x3, 0x3)));
+ nir_i2imp(b, nir_imm_ivec4(b, 0x3, 0x3, 0x3, 0x3)));
nir_ssa_def *top_rgb = nir_ishl(b, nir_channels(b, ubytes, 0x7), nir_imm_int(b, 2));
top_rgb = nir_ior(b, nir_channels(b, precision, 0x7), top_rgb);
};
nir_ssa_def *scale = nir_imm_vec4(b, 1.0 / 1023.0, 1.0 / 1023.0, 1.0 / 1023.0, 1.0 / 3.0);
- return nir_f2f16(b, nir_fmul(b, nir_u2f32(b, nir_vec(b, chans, 4)), scale));
+ return nir_f2fmp(b, nir_fmul(b, nir_u2f32(b, nir_vec(b, chans, 4)), scale));
}
/* On the other hand, the pure int RGB10_A2 is identical to the spec */
nir_ssa_def *mask = nir_iand(b, shift,
nir_imm_ivec4(b, 0x3ff, 0x3ff, 0x3ff, 0x3));
- return nir_u2u16(b, mask);
+ return nir_u2ump(b, mask);
}
/* NIR means we can *finally* catch a break */
pan_unpack_r11g11b10(nir_builder *b, nir_ssa_def *v)
{
nir_ssa_def *f32 = nir_format_unpack_11f11f10f(b, nir_channel(b, v, 0));
- nir_ssa_def *f16 = nir_f2f16(b, f32);
+ nir_ssa_def *f16 = nir_f2fmp(b, f32);
/* Extend to vec4 with alpha */
nir_ssa_def *components[4] = {
nir_ssa_def *rgb = nir_channels(b, linear, 0x7);
/* TODO: fp16 native conversion */
- nir_ssa_def *srgb = nir_f2f16(b,
+ nir_ssa_def *srgb = nir_f2fmp(b,
nir_format_linear_to_srgb(b, nir_f2f32(b, rgb)));
nir_ssa_def *comp[4] = {
nir_ssa_def *rgb = nir_channels(b, srgb, 0x7);
/* TODO: fp16 native conversion */
- nir_ssa_def *linear = nir_f2f16(b,
+ nir_ssa_def *linear = nir_f2fmp(b,
nir_format_srgb_to_linear(b, nir_f2f32(b, rgb)));
nir_ssa_def *comp[4] = {