mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 00:20:43 +01:00
vtn: set default fp_math_ctrl values for kernels
The kernel capabilty has the `FPFastMathMode` decoration, but not the
`FPFastMathDefault` execution mode, so a SPIR-V module not using
`SPV_KHR_float_controls2` has no way of setting any defaults.
Fixes: 9da2d21804 ("vtn: implement default fp_math_ctrl without using execution mode")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Tested-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39790>
This commit is contained in:
parent
4df142acb6
commit
faf3a93e8f
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue