Revert "Fix shader warnings"

This commit is contained in:
Twinaphex 2018-11-23 04:18:38 +01:00 committed by GitHub
parent 350a7477d6
commit 8514d6ccc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -23,11 +23,11 @@
"#else\n" \ "#else\n" \
" precision mediump float;\n" \ " precision mediump float;\n" \
"#endif\n" #src "#endif\n" #src
#define GLSL_300(src) "#version 300 es\n" #src
#else #else
#define CG(src) "" #src #define CG(src) "" #src
#define GLSL(src) "" #src #define GLSL(src) "" #src
#define GLSL_330(src) "#version 330\n" #src #define GLSL_300(src) "#version 300 es\n" #src
#define GLSL_330(src) "#version 330 core\n" #src
#endif #endif
#endif #endif

View File

@ -344,6 +344,7 @@ static bool gl_glsl_compile_shader(glsl_shader_data_t *glsl,
} }
#endif #endif
snprintf(version, sizeof(version), "#version %u%s\n", version_no, version_extra); snprintf(version, sizeof(version), "#version %u%s\n", version_no, version_extra);
RARCH_LOG("[GLSL]: Using GLSL version %u%s.\n", version_no, version_extra);
} }
else if (glsl_core) else if (glsl_core)
{ {
@ -367,14 +368,9 @@ static bool gl_glsl_compile_shader(glsl_shader_data_t *glsl,
} }
snprintf(version, sizeof(version), "#version %u\n", version_no); snprintf(version, sizeof(version), "#version %u\n", version_no);
} RARCH_LOG("[GLSL]: Using GLSL version %u.\n", version_no);
else
{
/* Don't leave version empty, prevent the compiler warning */
snprintf(version, sizeof(version), "#version 110\n");
} }
RARCH_LOG("[GLSL]: Using GLSL %s", version);
source[0] = version; source[0] = version;
source[1] = define; source[1] = define;
source[2] = glsl->alias_define; source[2] = glsl->alias_define;