#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 */
/**
flags |= GLSL_DUMP;
if (_mesa_strstr(env, "log"))
flags |= GLSL_LOG;
+ if (_mesa_strstr(env, "nopvert"))
+ flags |= GLSL_NOP_VERT;
+ if (_mesa_strstr(env, "nopfrag"))
+ flags |= GLSL_NOP_FRAG;
if (_mesa_strstr(env, "nopt"))
flags |= GLSL_NO_OPT;
else if (_mesa_strstr(env, "opt"))
(ctx->Shader.Flags & GLSL_NO_OPT) == 0) {
_mesa_optimize_program(ctx, shader->Program);
}
+ if ((ctx->Shader.Flags & GLSL_NOP_VERT) &&
+ shader->Program->Target == GL_VERTEX_PROGRAM_ARB) {
+ _mesa_nop_vertex_program(ctx,
+ (struct gl_vertex_program *) shader->Program);
+ }
+ if ((ctx->Shader.Flags & GLSL_NOP_FRAG) &&
+ shader->Program->Target == GL_FRAGMENT_PROGRAM_ARB) {
+ _mesa_nop_fragment_program(ctx,
+ (struct gl_fragment_program *) shader->Program);
+ }
}
if (ctx->Shader.Flags & GLSL_LOG) {