summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2019-01-25 12:27:08 -0800
committerMatt Turner <mattst88@gmail.com>2019-01-25 12:27:08 -0800
commit922ba204bed8ffff79b1f26f0b3fea05a93d5b2c (patch)
treef0f4383173b5c26572dd293f07536a299201fb68
parentf5938497df7352d1283065db8b38c5bd0e2b86ed (diff)
i965: Always compile fp64 funcs when neededfor-mark
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 <tarceri@itsqueeze.com> 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.
-rw-r--r--src/mesa/drivers/dri/i965/brw_program.c3
1 files changed, 2 insertions, 1 deletions
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) {