anv: give anv_ensure_fp64_shader() a chance to be called
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

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: 7d3b62e13d ("anv: only load fp64 software shader when needed")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42100>
This commit is contained in:
Paulo Zanoni 2026-06-05 16:04:39 -07:00 committed by Marge Bot
parent fbd2f140fe
commit 489aa1808f

View file

@ -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,