glsl: fix scons builds with shader cache
For now its disabled for scons so wrap glsl cache calls in a define conditional.
This commit is contained in:
@@ -4626,6 +4626,7 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_SHADER_CACHE
|
||||||
/* If transform feedback used on the program then compile all shaders. */
|
/* If transform feedback used on the program then compile all shaders. */
|
||||||
bool skip_cache = false;
|
bool skip_cache = false;
|
||||||
if (prog->TransformFeedback.NumVarying > 0) {
|
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))
|
if (!skip_cache && shader_cache_read_program_metadata(ctx, prog))
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
void *mem_ctx = ralloc_context(NULL); // temporary linker context
|
void *mem_ctx = ralloc_context(NULL); // temporary linker context
|
||||||
|
|
||||||
|
@@ -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)
|
if (prog->data->LinkStatus)
|
||||||
shader_cache_write_program_metadata(ctx, prog);
|
shader_cache_write_program_metadata(ctx, prog);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* extern "C" */
|
} /* extern "C" */
|
||||||
|
Reference in New Issue
Block a user