Add logging to shader_init.
This commit is contained in:
parent
59fd1fe22a
commit
ec5c12f3f9
8
gfx/gl.c
8
gfx/gl.c
|
@ -252,7 +252,10 @@ static bool gl_shader_init(void *data)
|
||||||
|
|
||||||
#if DEFAULT_SHADER_TYPE == RARCH_SHADER_NONE
|
#if DEFAULT_SHADER_TYPE == RARCH_SHADER_NONE
|
||||||
if (!g_settings.video.shader_enable)
|
if (!g_settings.video.shader_enable)
|
||||||
|
{
|
||||||
|
RARCH_LOG("[GL]: Not loading any shader.\n");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *shader_path = *g_settings.video.shader_path ? g_settings.video.shader_path : NULL;
|
const char *shader_path = *g_settings.video.shader_path ? g_settings.video.shader_path : NULL;
|
||||||
|
@ -265,12 +268,14 @@ static bool gl_shader_init(void *data)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CG
|
#ifdef HAVE_CG
|
||||||
case RARCH_SHADER_CG:
|
case RARCH_SHADER_CG:
|
||||||
|
RARCH_LOG("[GL]: Using Cg shader backend.\n");
|
||||||
backend = &gl_cg_backend;
|
backend = &gl_cg_backend;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_GLSL
|
#ifdef HAVE_GLSL
|
||||||
case RARCH_SHADER_GLSL:
|
case RARCH_SHADER_GLSL:
|
||||||
|
RARCH_LOG("[GL]: Using GLSL shader backend.\n");
|
||||||
backend = &gl_glsl_backend;
|
backend = &gl_glsl_backend;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -280,7 +285,10 @@ static bool gl_shader_init(void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!backend)
|
if (!backend)
|
||||||
|
{
|
||||||
|
RARCH_ERR("[GL]: Didn't find valid shader backend. Continuing without shaders.\n");
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
gl->shader = backend;
|
gl->shader = backend;
|
||||||
return gl->shader->init(shader_path);
|
return gl->shader->init(shader_path);
|
||||||
|
|
Loading…
Reference in New Issue