list of keywords to control some aspects of the GLSL compiler and shader
execution. These are generally used for debugging.
-- **dump** - print GLSL shader code to stdout at link time
+- **dump** - print GLSL shader code, IR, and NIR to stdout at link time
+- **source** - print GLSL shader code to stdout at link time
- **log** - log all GLSL shaders to files. The filenames will be
"shader_X.vert" or "shader_X.frag" where X the shader ID.
- **cache_info** - print debug information about shader cache
#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 */
+#define GLSL_SOURCE 0x400 /**< Only dump GLSL */
/**
flags |= GLSL_DUMP;
if (strstr(env, "log"))
flags |= GLSL_LOG;
+ if (strstr(env, "source"))
+ flags |= GLSL_SOURCE;
#endif
if (strstr(env, "cache_fb"))
flags |= GLSL_CACHE_FALLBACK;
*/
sh->CompileStatus = COMPILE_FAILURE;
} else {
- if (ctx->_Shader->Flags & GLSL_DUMP) {
+ if (ctx->_Shader->Flags & (GLSL_DUMP | GLSL_SOURCE)) {
_mesa_log("GLSL source for %s shader %d:\n",
_mesa_shader_stage_to_string(sh->Stage), sh->Name);
_mesa_log_direct(sh->Source);