diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index c42696074b3..36e70405965 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -66,18 +66,6 @@ output_if_debug(enum mesa_log_level level, const char *outputString) mesa_log(level, "Mesa", "%s", outputString); } - -/** - * Return the file handle to use for debug/logging. Defaults to stderr - * unless MESA_LOG_FILE is defined. - */ -FILE * -_mesa_get_log_file(void) -{ - return mesa_log_get_file(); -} - - /** * When a new type of error is recorded, print a message describing * previous errors which were accumulated. diff --git a/src/mesa/main/errors.h b/src/mesa/main/errors.h index 3effdf39af4..b859625c447 100644 --- a/src/mesa/main/errors.h +++ b/src/mesa/main/errors.h @@ -70,9 +70,6 @@ extern void _mesa_log_direct(const char *string); -extern FILE * -_mesa_get_log_file(void); - void _mesa_shader_debug(struct gl_context *ctx, GLenum type, GLuint *id, const char *msg); diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 337acf0e8c8..0f6e39c18ca 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -63,6 +63,7 @@ #include "util/crc32.h" #include "util/os_file.h" #include "util/list.h" +#include "util/log.h" #include "util/perf/cpu_trace.h" #include "util/u_process.h" #include "util/u_string.h" @@ -1241,7 +1242,7 @@ _mesa_compile_shader(struct gl_context *ctx, struct gl_shader *sh) if (sh->CompileStatus) { if (sh->ir) { _mesa_log("GLSL IR for shader %d:\n", sh->Name); - _mesa_print_ir(_mesa_get_log_file(), sh->ir, NULL); + _mesa_print_ir(mesa_log_get_file(), sh->ir, NULL); } else { _mesa_log("No GLSL IR for shader %d (shader may be from " "cache)\n", sh->Name); diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 2ea9b1787e1..19944a2be48 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -55,6 +55,8 @@ #include "compiler/glsl/shader_cache.h" #include "compiler/glsl/string_to_uint_map.h" +#include "util/log.h" + static int type_size(const struct glsl_type *type) { @@ -395,7 +397,7 @@ st_glsl_to_nir_post_opts(struct st_context *st, struct gl_program *prog, _mesa_log("NIR IR for linked %s program %d:\n", _mesa_shader_stage_to_string(prog->info.stage), shader_program->Name); - nir_print_shader(nir, _mesa_get_log_file()); + nir_print_shader(nir, mesa_log_get_file()); _mesa_log("\n\n"); } @@ -537,7 +539,7 @@ st_link_glsl_to_nir(struct gl_context *ctx, _mesa_log("GLSL IR for linked %s program %d:\n", _mesa_shader_stage_to_string(shader->Stage), shader_program->Name); - _mesa_print_ir(_mesa_get_log_file(), shader->ir, NULL); + _mesa_print_ir(mesa_log_get_file(), shader->ir, NULL); _mesa_log("\n\n"); }