The filenames will be "shader_X.vert" or "shader_X.frag" where X
the shader ID.
<li><b>cache_info</b> - print debug information about shader cache
+<li><b>cache_fb</b> - force cached shaders to be ignored and do a full
+ recompile via the fallback path</li>
<li><b>uniform</b> - print message to stdout when glUniform is called
<li><b>nopvert</b> - force vertex shaders to be a simple shader that just transforms
the vertex position with ftransform() and passes through the color and
#define GLSL_REPORT_ERRORS 0x40 /**< Print compilation errors */
#define GLSL_DUMP_ON_ERROR 0x80 /**< Dump shaders to stderr on compile error */
#define GLSL_CACHE_INFO 0x100 /**< Print debug information about shader cache */
+#define GLSL_CACHE_FALLBACK 0x200 /**< Force shader cache fallback paths */
/**
flags |= GLSL_DUMP;
if (strstr(env, "log"))
flags |= GLSL_LOG;
+ if (strstr(env, "cache_fb"))
+ flags |= GLSL_CACHE_FALLBACK;
if (strstr(env, "cache_info"))
flags |= GLSL_CACHE_INFO;
if (strstr(env, "nopvert"))
if (prog->data->LinkStatus != linking_skipped)
return false;
- struct st_context *st = st_context(ctx);
uint8_t *buffer = NULL;
+ if (ctx->_Shader->Flags & GLSL_CACHE_FALLBACK) {
+ goto fallback_recompile;
+ }
+
+ struct st_context *st = st_context(ctx);
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
if (prog->_LinkedShaders[i] == NULL)
continue;