From: Timothy Arceri Date: Fri, 17 Feb 2017 05:27:53 +0000 (+1100) Subject: glsl: fix scons builds with shader cache X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=172c48cc15e2a7b42a7de8ff9164ad8733155667;p=mesa.git glsl: fix scons builds with shader cache For now its disabled for scons so wrap glsl cache calls in a define conditional. --- diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index 72fea65a894..b6f8bc4212e 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -4626,6 +4626,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) return; } +#ifdef ENABLE_SHADER_CACHE /* If transform feedback used on the program then compile all shaders. */ bool skip_cache = false; if (prog->TransformFeedback.NumVarying > 0) { @@ -4640,6 +4641,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog) if (!skip_cache && shader_cache_read_program_metadata(ctx, prog)) return; +#endif void *mem_ctx = ralloc_context(NULL); // temporary linker context diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 67c9267ac09..a4f61ac23ef 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -3130,8 +3130,10 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) } } +#ifdef ENABLE_SHADER_CACHE if (prog->data->LinkStatus) shader_cache_write_program_metadata(ctx, prog); +#endif } } /* extern "C" */