diff --git a/src/compiler/glsl/float64.glsl b/src/compiler/glsl/float64.glsl index 5086c23dd7b..64bdbee2421 100644 --- a/src/compiler/glsl/float64.glsl +++ b/src/compiler/glsl/float64.glsl @@ -1716,3 +1716,9 @@ __ffract64(uint64_t a) { return __fadd64(a, __fneg64(__ffloor64(a))); } + +bool +__fisfinite64(uint64_t __a) +{ + return __extractFloat64Exp(__a) != 0x7ff; +} diff --git a/src/compiler/nir/nir_lower_double_ops.c b/src/compiler/nir/nir_lower_double_ops.c index 6615c775c14..66bfe11b8c6 100644 --- a/src/compiler/nir/nir_lower_double_ops.c +++ b/src/compiler/nir/nir_lower_double_ops.c @@ -600,6 +600,11 @@ lower_doubles_instr_to_soft(nir_builder *b, nir_alu_instr *instr, name = "__fsat64"; mangled_name = "__fsat64(u641;"; break; + case nir_op_fisfinite: + name = "__fisfinite64"; + mangled_name = "__fisfinite64(u641;"; + return_type = glsl_bool_type(); + break; default: return false; }