mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 10:30:08 +01:00
compiler/nir: add a nir_b2f() helper
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
70be9afccb
commit
5fc9ad1cb0
1 changed files with 12 additions and 0 deletions
|
|
@ -985,6 +985,18 @@ nir_i2b(nir_builder *build, nir_ssa_def *i)
|
|||
return nir_i2b1(build, i);
|
||||
}
|
||||
|
||||
static inline nir_ssa_def *
|
||||
nir_b2f(nir_builder *build, nir_ssa_def *b, uint32_t bit_size)
|
||||
{
|
||||
switch (bit_size) {
|
||||
case 64: return nir_b2f64(build, b);
|
||||
case 32: return nir_b2f32(build, b);
|
||||
case 16: return nir_b2f16(build, b);
|
||||
default:
|
||||
unreachable("Invalid bit-size");
|
||||
};
|
||||
}
|
||||
|
||||
static inline nir_ssa_def *
|
||||
nir_load_barycentric(nir_builder *build, nir_intrinsic_op op,
|
||||
unsigned interp_mode)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue