diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 34c96cfeb5f..9964121f40a 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -5301,6 +5301,12 @@ vtn_handle_entry_point(struct vtn_builder *b, const uint32_t *w, b->interface_ids = vtn_alloc_array(b, uint32_t, b->interface_ids_count); memcpy(b->interface_ids, &w[start], b->interface_ids_count * 4); qsort(b->interface_ids, b->interface_ids_count, 4, cmp_uint32_t); + + if (stage == MESA_SHADER_KERNEL) { + *vtn_fp_math_ctrl_for_base_type(b, GLSL_TYPE_FLOAT16) |= nir_fp_preserve_sz_inf_nan; + *vtn_fp_math_ctrl_for_base_type(b, GLSL_TYPE_FLOAT) |= nir_fp_preserve_sz_inf_nan; + *vtn_fp_math_ctrl_for_base_type(b, GLSL_TYPE_DOUBLE) |= nir_fp_preserve_sz_inf_nan; + } } static bool