mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
rusticl/kernel: preserve fp16 denorms to fix vload/vstore_half
Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19041>
This commit is contained in:
parent
5fa7c53631
commit
1c86a5f309
2 changed files with 12 additions and 0 deletions
|
|
@ -623,6 +623,11 @@ fn convert_spirv_to_nir(
|
|||
} 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);
|
||||
|
|
|
|||
|
|
@ -254,6 +254,13 @@ impl NirShader {
|
|||
}
|
||||
}
|
||||
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue