summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/program/prog_print.c')
-rw-r--r--src/mesa/program/prog_print.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 6056c459e4c..00aa6de963b 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -540,12 +540,12 @@ fprint_comment(FILE *f, const struct prog_instruction *inst)
}
-static void
-fprint_alu_instruction(FILE *f,
- const struct prog_instruction *inst,
- const char *opcode_string, GLuint numRegs,
- gl_prog_print_mode mode,
- const struct gl_program *prog)
+void
+_mesa_fprint_alu_instruction(FILE *f,
+ const struct prog_instruction *inst,
+ const char *opcode_string, GLuint numRegs,
+ gl_prog_print_mode mode,
+ const struct gl_program *prog)
{
GLuint j;
@@ -582,8 +582,8 @@ void
_mesa_print_alu_instruction(const struct prog_instruction *inst,
const char *opcode_string, GLuint numRegs)
{
- fprint_alu_instruction(stderr, inst, opcode_string,
- numRegs, PROG_PRINT_DEBUG, NULL);
+ _mesa_fprint_alu_instruction(stderr, inst, opcode_string,
+ numRegs, PROG_PRINT_DEBUG, NULL);
}
@@ -791,16 +791,16 @@ _mesa_fprint_instruction_opt(FILE *f,
default:
if (inst->Opcode < MAX_OPCODE) {
/* typical alu instruction */
- fprint_alu_instruction(f, inst,
- _mesa_opcode_string(inst->Opcode),
- _mesa_num_inst_src_regs(inst->Opcode),
- mode, prog);
+ _mesa_fprint_alu_instruction(f, inst,
+ _mesa_opcode_string(inst->Opcode),
+ _mesa_num_inst_src_regs(inst->Opcode),
+ mode, prog);
}
else {
- fprint_alu_instruction(f, inst,
- _mesa_opcode_string(inst->Opcode),
- 3/*_mesa_num_inst_src_regs(inst->Opcode)*/,
- mode, prog);
+ _mesa_fprint_alu_instruction(f, inst,
+ _mesa_opcode_string(inst->Opcode),
+ 3/*_mesa_num_inst_src_regs(inst->Opcode)*/,
+ mode, prog);
}
break;
}
@@ -1033,11 +1033,11 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
fprintf(f, "/* Compile status: %s */\n",
shader->CompileStatus ? "ok" : "fail");
- if (!shader->CompileStatus) {
- fprintf(f, "/* Log Info: */\n");
+ fprintf(f, "/* Log Info: */\n");
+ if (shader->InfoLog) {
fputs(shader->InfoLog, f);
}
- else {
+ if (shader->CompileStatus && shader->Program) {
fprintf(f, "/* GPU code */\n");
fprintf(f, "/*\n");
_mesa_fprint_program_opt(f, shader->Program, PROG_PRINT_DEBUG, GL_TRUE);