int i;
struct gl_program *prog;
GLenum target;
+ const char *target_string;
GLboolean progress;
switch (shader->Type) {
- case GL_VERTEX_SHADER: target = GL_VERTEX_PROGRAM_ARB; break;
- case GL_FRAGMENT_SHADER: target = GL_FRAGMENT_PROGRAM_ARB; break;
- default: assert(!"should not be reached"); break;
+ case GL_VERTEX_SHADER:
+ target = GL_VERTEX_PROGRAM_ARB;
+ target_string = "vertex";
+ break;
+ case GL_FRAGMENT_SHADER:
+ target = GL_FRAGMENT_PROGRAM_ARB;
+ target_string = "fragment";
+ break;
+ default:
+ assert(!"should not be reached");
+ break;
}
validate_ir_tree(shader->ir);
}
set_branchtargets(&v, mesa_instructions, num_instructions);
- if (0) {
+ if (ctx->Shader.Flags & GLSL_DUMP) {
+ printf("Mesa %s program:\n", target_string);
print_program(mesa_instructions, mesa_instruction_annotation,
num_instructions);
}