From 755ceda4f99330791584762ae4ad4b6c3c98c011 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 24 Mar 2017 00:30:14 +0100 Subject: [PATCH] More consistent log messages --- gfx/drivers_shader/shader_gl_cg.c | 18 +++++++++--------- gfx/drivers_shader/shader_glsl.c | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 418e5153bb..fc50ffd2f0 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -442,7 +442,7 @@ static void gl_cg_deinit_progs(void *data) if (!cg) return; - RARCH_LOG("CG: Destroying programs.\n"); + RARCH_LOG("[CG]: Destroying programs.\n"); cgGLUnbindProgram(cg->cgFProf); cgGLUnbindProgram(cg->cgVProf); @@ -495,7 +495,7 @@ static void gl_cg_deinit_context_state(void *data) cg_shader_data_t *cg = (cg_shader_data_t*)data; if (cg->cgCtx) { - RARCH_LOG("CG: Destroying context.\n"); + RARCH_LOG("[CG]: Destroying context.\n"); cgDestroyContext(cg->cgCtx); } cg->cgCtx = NULL; @@ -609,7 +609,7 @@ static void gl_cg_set_program_base_attrib(void *data, unsigned i) if (!semantic) continue; - RARCH_LOG("CG: Found semantic \"%s\" in prog #%u.\n", semantic, i); + RARCH_LOG("[CG]: Found semantic \"%s\" in prog #%u.\n", semantic, i); semantic_hash = djb2_calculate(semantic); @@ -678,7 +678,7 @@ static bool gl_cg_load_plain(void *data, const char *path) if (string_is_empty(path)) { - RARCH_LOG("Loading stock Cg file.\n"); + RARCH_LOG("[CG]: Loading stock Cg file.\n"); cg->prg[1] = cg->prg[0]; } else @@ -688,7 +688,7 @@ static bool gl_cg_load_plain(void *data, const char *path) program_info.combined = path; program_info.is_file = true; - RARCH_LOG("Loading Cg file: %s\n", path); + RARCH_LOG("[CG]: Loading Cg file: %s\n", path); strlcpy(cg->shader->pass[0].source.path, path, sizeof(cg->shader->pass[0].source.path)); if (!gl_cg_compile_program(data, 1, &cg->prg[1], &program_info)) @@ -773,7 +773,7 @@ static bool gl_cg_load_shader(void *data, unsigned i) program_info.combined = cg->shader->pass[i].source.path; program_info.is_file = true; - RARCH_LOG("Loading Cg shader: \"%s\".\n", + RARCH_LOG("[CG]: Loading Cg shader: \"%s\".\n", cg->shader->pass[i].source.path); if (!gl_cg_compile_program(data, i + 1, &cg->prg[i + 1],&program_info)) @@ -791,7 +791,7 @@ static bool gl_cg_load_preset(void *data, const char *path) if (!gl_cg_load_stock(cg)) return false; - RARCH_LOG("Loading Cg meta-shader: %s\n", path); + RARCH_LOG("[CG]: Loading Cg meta-shader: %s\n", path); conf = config_file_new(path); if (!conf) { @@ -1044,8 +1044,8 @@ static void *gl_cg_init(void *data, const char *path) goto error; } - RARCH_LOG("[Cg]: Vertex profile: %s\n", cgGetProfileString(cg->cgVProf)); - RARCH_LOG("[Cg]: Fragment profile: %s\n", cgGetProfileString(cg->cgFProf)); + RARCH_LOG("[CG]: Vertex profile: %s\n", cgGetProfileString(cg->cgVProf)); + RARCH_LOG("[CG]: Fragment profile: %s\n", cgGetProfileString(cg->cgFProf)); cgGLSetOptimalOptions(cg->cgFProf); cgGLSetOptimalOptions(cg->cgVProf); cgGLEnableProfile(cg->cgFProf); diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index 8fb6d80d3c..2ad6e0eb37 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -282,7 +282,7 @@ static bool gl_glsl_compile_shader(glsl_shader_data_t *glsl, } snprintf(version, sizeof(version), "#version %u\n", version_no); - RARCH_LOG("[GL]: Using GLSL version %u.\n", version_no); + RARCH_LOG("[GLSL]: Using GLSL version %u.\n", version_no); } source[0] = version; @@ -334,7 +334,7 @@ static bool gl_glsl_compile_program( if (program_info->vertex) { - RARCH_LOG("Found GLSL vertex shader.\n"); + RARCH_LOG("[GLSL]: Found GLSL vertex shader.\n"); program->vprg = glCreateShader(GL_VERTEX_SHADER); if (!gl_glsl_compile_shader( @@ -351,7 +351,7 @@ static bool gl_glsl_compile_program( if (program_info->fragment) { - RARCH_LOG("Found GLSL fragment shader.\n"); + RARCH_LOG("[GLSL]: Found GLSL fragment shader.\n"); program->fprg = glCreateShader(GL_FRAGMENT_SHADER); if (!gl_glsl_compile_shader(glsl, program->fprg, "#define FRAGMENT\n#define PARAMETER_UNIFORM\n", program_info->fragment)) @@ -365,7 +365,7 @@ static bool gl_glsl_compile_program( if (program_info->vertex || program_info->fragment) { - RARCH_LOG("Linking GLSL program.\n"); + RARCH_LOG("[GLSL]: Linking GLSL program.\n"); if (!gl_glsl_link_program(prog)) goto error; @@ -728,7 +728,7 @@ static void *gl_glsl_init(void *data, const char *path) (void)shader_support; #ifndef HAVE_OPENGLES - RARCH_LOG("Checking GLSL shader support ...\n"); + RARCH_LOG("[GLSL]: Checking GLSL shader support ...\n"); shader_support = glCreateProgram && glUseProgram && glCreateShader && glDeleteShader && glShaderSource && glCompileShader && glAttachShader && glDetachShader && glLinkProgram && glGetUniformLocation