From 2588d3f4b90c575c7eeccffb3edbca3f5988f1ee Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 24 Jan 2024 17:21:50 +1000 Subject: [PATCH] gallivm: passing fp16_split_fp64 to fp16 lowering. This causes lavapipe to use the split code and fixes accuracy for CTS. Fixes dEQP-VK.glsl.builtin.precision_fconvert.f64_to_f16* Cc: mesa-stable Reviewed-by: Mike Blumenkrantz Part-of: (cherry picked from commit 38e92556a041cc421dadb95aaac43a4619311a87) --- .pick_status.json | 2 +- src/gallium/auxiliary/gallivm/lp_bld_nir.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8bf00ac5c1f..91eab82d80b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1784,7 +1784,7 @@ "description": "gallivm: passing fp16_split_fp64 to fp16 lowering.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/auxiliary/gallivm/lp_bld_nir.c b/src/gallium/auxiliary/gallivm/lp_bld_nir.c index bed636cea5e..06c7bb339db 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_nir.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_nir.c @@ -2984,7 +2984,7 @@ lp_build_opt_nir(struct nir_shader *nir) } NIR_PASS_V(nir, nir_lower_flrp, 16|32|64, true); - NIR_PASS_V(nir, nir_lower_fp16_casts, nir_lower_fp16_all); + NIR_PASS_V(nir, nir_lower_fp16_casts, nir_lower_fp16_all | nir_lower_fp16_split_fp64); do { progress = false; NIR_PASS(progress, nir, nir_opt_constant_folding);