zink: Emit float controls for preserve_denorms too

Fixes: 6afa1b3bad ("zink: handle denorm preserve execution modes")
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
(cherry picked from commit 9189a70598)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39969>
This commit is contained in:
Mel Henning 2026-02-03 18:18:30 -05:00 committed by Dylan Baker
parent 79796e0db4
commit d578c1cb31
2 changed files with 3 additions and 2 deletions

View file

@ -1004,7 +1004,7 @@
"description": "zink: Emit float controls for preserve_denorms too",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "6afa1b3bade64e0676b349d7d57b3c89b5ec3e9e",
"notes": null

View file

@ -4987,7 +4987,8 @@ nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *sinfo, const s
emit_image(&ctx, var, get_bare_image_type(&ctx, var, false));
}
if (sinfo->float_controls.flush_denorms) {
if (sinfo->float_controls.flush_denorms ||
sinfo->float_controls.preserve_denorms) {
unsigned execution_mode = s->info.float_controls_execution_mode;
bool flush_16_bit = nir_is_denorm_flush_to_zero(execution_mode, 16);
bool flush_32_bit = nir_is_denorm_flush_to_zero(execution_mode, 32);