mesa: remove unreachable code from _mesa_write_shader_to_file()
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 30 Jun 2016 04:52:21 +0000 (14:52 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 30 Jun 2016 06:51:25 +0000 (16:51 +1000)
_mesa_write_shader_to_file() is only used to print gl shader objects
so Program should never be set as it only gets set for linked shaders.

Acked-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/program/prog_print.c

index 755d6440e4a9973ace724e1c81607311f51ce30d..8f46bc56d229a51e053438da1557e47e557b1c76 100644 (file)
@@ -994,16 +994,6 @@ _mesa_write_shader_to_file(const struct gl_shader *shader)
    if (shader->InfoLog) {
       fputs(shader->InfoLog, f);
    }
-   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);
-      fprintf(f, "*/\n");
-      fprintf(f, "/* Parameters / constants */\n");
-      fprintf(f, "/*\n");
-      _mesa_fprint_parameter_list(f, shader->Program->Parameters);
-      fprintf(f, "*/\n");
-   }
 
    fclose(f);
 }