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>nopt</b> - disable compiler optimizations
<li><b>opt</b> - force compiler optimizations
<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
#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */
#define GLSL_LOG 0x2 /**< Write shaders to files */
#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */
-#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */
-#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */
-#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */
-#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */
-#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */
-#define GLSL_REPORT_ERRORS 0x100 /**< Print compilation errors */
-#define GLSL_DUMP_ON_ERROR 0x200 /**< Dump shaders to stderr on compile error */
-#define GLSL_CACHE_INFO 0x400 /**< Print debug information about shader cache */
+#define GLSL_UNIFORMS 0x8 /**< Print glUniform calls */
+#define GLSL_NOP_VERT 0x10 /**< Force no-op vertex shaders */
+#define GLSL_NOP_FRAG 0x20 /**< Force no-op fragment shaders */
+#define GLSL_USE_PROG 0x40 /**< Log glUseProgram calls */
+#define GLSL_REPORT_ERRORS 0x80 /**< Print compilation errors */
+#define GLSL_DUMP_ON_ERROR 0x100 /**< Dump shaders to stderr on compile error */
+#define GLSL_CACHE_INFO 0x200 /**< Print debug information about shader cache */
/**
flags |= GLSL_NOP_VERT;
if (strstr(env, "nopfrag"))
flags |= GLSL_NOP_FRAG;
- if (strstr(env, "nopt"))
- flags |= GLSL_NO_OPT;
else if (strstr(env, "opt"))
flags |= GLSL_OPT;
if (strstr(env, "uniform"))
return;
}
- if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0)
- _mesa_optimize_program(ctx, &prog, program);
+ _mesa_optimize_program(ctx, &prog, program);
ralloc_free(program->String);
prog->info.fs.depth_layout = shader_program->FragDepthLayout;
}
- if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) {
- _mesa_optimize_program(ctx, prog, prog);
- }
+ _mesa_optimize_program(ctx, prog, prog);
/* This has to be done last. Any operation that can cause
* prog->ParameterValues to get reallocated (e.g., anything that adds a