consts->GLSLVersion = 120;
_mesa_override_glsl_version(consts);
+#ifdef DEBUG
+ consts->GenerateTemporaryNames = true;
+#else
+ consts->GenerateTemporaryNames = false;
+#endif
+
/* GL_ARB_framebuffer_object */
consts->MaxSamples = 0;
*/
GLboolean DisableVaryingPacking;
+ /**
+ * Should meaningful names be generated for compiler temporary variables?
+ *
+ * Generally, it is not useful to have the compiler generate "meaningful"
+ * names for temporary variables that it creates. This can, however, be a
+ * useful debugging aid. In Mesa debug builds or release builds when
+ * MESA_GLSL is set at run-time, meaningful names will be generated.
+ * Drivers can also force names to be generated by setting this field.
+ * For example, the i965 driver may set it when INTEL_DEBUG=vs (to dump
+ * vertex shader assembly) is set at run-time.
+ */
+ bool GenerateTemporaryNames;
+
/*
* Maximum value supported for an index in DrawElements and friends.
*
ctx->Shader.Flags = _mesa_get_shader_flags();
+ if (ctx->Shader.Flags != 0)
+ ctx->Const.GenerateTemporaryNames = true;
+
/* Extended for ARB_separate_shader_objects */
ctx->Shader.RefCount = 1;
mtx_init(&ctx->Shader.Mutex, mtx_plain);