From 489aa1808f2553511f718d287af6532a67c0cb23 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Fri, 5 Jun 2026 16:04:39 -0700 Subject: [PATCH] anv: give anv_ensure_fp64_shader() a chance to be called In anv_shader_lower_nir() we call anv_ensure_fp64_shader() only if device->fp64_nir is set, but the function that sets device->fp64_nir is anv_ensure_fp64_shader()! That means the only way for device->fp64_nir to be set is through blorp: if the app does not issue the blorp shader that uses fp64, then we won't have it. Change the check to be like the one we have in blorp_compile_fs_brw(). Fixes: 7d3b62e13dbd ("anv: only load fp64 software shader when needed") Reviewed-by: Lionel Landwerlin Signed-off-by: Paulo Zanoni Part-of: --- src/intel/vulkan/anv_shader_compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_shader_compile.c b/src/intel/vulkan/anv_shader_compile.c index 340bb656328..36ed982b091 100644 --- a/src/intel/vulkan/anv_shader_compile.c +++ b/src/intel/vulkan/anv_shader_compile.c @@ -1259,7 +1259,8 @@ anv_shader_lower_nir(struct anv_device *device, nir_shader *nir = shader_data->info->nir; /* Workaround for apps that need fp64 support */ - if (device->fp64_nir) { + if (!devinfo->has_64bit_float && (nir->info.bit_sizes_float & 64) && + pdevice->instance->drirc.debug.fp64_emu) { nir_shader *fp64_nir = anv_ensure_fp64_shader(device); NIR_PASS(_, nir, nir_lower_doubles, fp64_nir,