From: Matt Turner Date: Fri, 25 Jan 2019 20:27:08 +0000 (-0800) Subject: i965: Always compile fp64 funcs when needed X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7d629a59021cb1a013a8a58acd9187ca0b6c9ce;p=mesa.git i965: Always compile fp64 funcs when needed Compilation of user-specified shaders with software fp64 works by compiling on demand an "fp64-funcs" shader implementing various fp64 operations and then linking it into the "user shader". In commit 64b8c86d37ebb1e1d286c69d642d52b7bcf051d3 Author: Timothy Arceri Date: Thu Jan 17 17:16:29 2019 +1100 glsl: be much more aggressive when skipping shader compilation we changed the behavior of the shader cache to skip compilation earlier when we get a cache hit. After the aforementioned commit, compiling a user program using fp64 would store into the cache an entry for the fp64-funcs shader. Subsequent compilations of uncached user shaders using fp64 would fail in compile_fp64_funcs() after finding a cache entry for the fp64-funcs, but being unprepared to read from the cache. It's unclear to me how to retrieve the cached NIR of the fp64-funcs (if it even is cached), so just call _mesa_glsl_compile_shader() with force_recompile=true in order to ensure we generate the fp64-funcs successfully. Tested-by: Mark Janes Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c index c01143decd0..9ab25cf664c 100644 --- a/src/mesa/drivers/dri/i965/brw_program.c +++ b/src/mesa/drivers/dri/i965/brw_program.c @@ -40,6 +40,7 @@ #include "tnl/tnl.h" #include "util/ralloc.h" #include "compiler/glsl/ir.h" +#include "compiler/glsl/program.h" #include "compiler/glsl/glsl_to_nir.h" #include "compiler/glsl/float64_glsl.h" @@ -87,7 +88,7 @@ compile_fp64_funcs(struct gl_context *ctx, sh->Source = float64_source; sh->CompileStatus = COMPILE_FAILURE; - _mesa_compile_shader(ctx, sh); + _mesa_glsl_compile_shader(ctx, sh, false, false, true); if (!sh->CompileStatus) { if (sh->InfoLog) {