mesa/st: add a warning if can't set SoftFP64

Without this warning, if a driver try to use the
nir_lower_fp64_full_software option, would get a crash without any
message pointing that the problem is that doesn't fulfill the
requirements of current mesa fp64 sw implementation.

Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Ol¨ák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38025>
This commit is contained in:
Alejandro Piñeiro 2025-10-23 13:16:59 +02:00 committed by Marge Bot
parent 53bcab0288
commit 5d70bf3c98

View file

@ -491,6 +491,8 @@ st_link_glsl_to_nir(struct gl_context *ctx,
*/
if (_mesa_is_desktop_gl(st->ctx) && st->ctx->Const.GLSLVersion >= 400)
st->ctx->SoftFP64 = glsl_float64_funcs_to_nir(st->ctx, options);
else
_mesa_warning(NULL, "Mesa full software implementation of FP64 requires OpenGL >= 4.0\n");
}
}