mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 10:08:08 +02:00
glsl/nir: Don't build soft float64 when it cannot be used
Fixes:82d9a37a59("glsl/nir: Add a shared helper for building float64 shaders") Closes: #5556 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13828> (cherry picked from commit04f5c543de)
This commit is contained in:
parent
a379268693
commit
236be36989
2 changed files with 9 additions and 1 deletions
|
|
@ -2668,7 +2668,7 @@
|
|||
"description": "glsl/nir: Don't build soft float64 when it cannot be used",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "82d9a37a59c94ba3678b33acb9f2749cbbd7bfcc"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "main/errors.h"
|
||||
#include "main/mtypes.h"
|
||||
#include "main/shaderobj.h"
|
||||
#include "main/context.h"
|
||||
#include "util/u_math.h"
|
||||
|
||||
/*
|
||||
|
|
@ -2616,6 +2617,13 @@ nir_shader *
|
|||
glsl_float64_funcs_to_nir(struct gl_context *ctx,
|
||||
const nir_shader_compiler_options *options)
|
||||
{
|
||||
/* It's not possible to use float64 on GLSL ES, so don't bother trying to
|
||||
* build the support code. The support code depends on higher versions of
|
||||
* desktop GLSL, so it will fail to compile (below) anyway.
|
||||
*/
|
||||
if (!_mesa_is_desktop_gl(ctx) || ctx->Const.GLSLVersion < 400)
|
||||
return NULL;
|
||||
|
||||
/* We pretend it's a vertex shader. Ultimately, the stage shouldn't
|
||||
* matter because we're not optimizing anything here.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue