Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19041>
} else {
let mut nir = p.to_nir(name, d);
+ /* this is a hack until we support fp16 properly and check for denorms inside
+ * vstore/vload_half
+ */
+ nir.preserve_fp16_denorms();
+
lower_and_optimize_nir_pre_inputs(d, &mut nir, &d.lib_clc);
let mut args = KernelArg::from_spirv_nir(&args, &mut nir);
let internal_args = lower_and_optimize_nir_late(d, &mut nir, &mut args);
}
}
+ pub fn preserve_fp16_denorms(&mut self) {
+ unsafe {
+ self.nir.as_mut().info.float_controls_execution_mode |=
+ float_controls::FLOAT_CONTROLS_DENORM_PRESERVE_FP16 as u16;
+ }
+ }
+
pub fn add_var(
&self,
mode: nir_variable_mode,