From 1520869a82fcac2e650bea5b6ae73f4cfb5115af Mon Sep 17 00:00:00 2001 From: sephiroth99 Date: Mon, 8 Feb 2016 20:40:52 -0500 Subject: [PATCH 1/2] Revert "AMD people: have at it. I ain't gonna guarantee it'll work, though." This reverts commit 8c0614b2025c8d5c4d819510ad67c9e1e25a0a5b. Recent changes to generated shaders require GLSL 4.50. --- src/xenia/ui/gl/gl_context.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/ui/gl/gl_context.cc b/src/xenia/ui/gl/gl_context.cc index 7a3da67c1..c908aaf40 100644 --- a/src/xenia/ui/gl/gl_context.cc +++ b/src/xenia/ui/gl/gl_context.cc @@ -287,8 +287,8 @@ void GLContext::AssertExtensionsPresent() { reinterpret_cast(glGetString(GL_SHADING_LANGUAGE_VERSION)); std::string glsl_version(glsl_version_raw); if (glsl_version.find("4.50") != 0) { - XELOGW("GLSL version reported as %s; you may have a bad time!", - glsl_version_raw); + FatalGLError("OpenGL GLSL version 4.50 is required."); + return; } if (!GLEW_ARB_bindless_texture || !glMakeTextureHandleResidentARB) { From 00674736feabe8ca2117d4ce0d615bb995346162 Mon Sep 17 00:00:00 2001 From: sephiroth99 Date: Mon, 8 Feb 2016 20:42:09 -0500 Subject: [PATCH 2/2] Fix minor syntax error in shaders. Discovered with glslangValidator. --- src/xenia/gpu/glsl_shader_translator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/gpu/glsl_shader_translator.cc b/src/xenia/gpu/glsl_shader_translator.cc index da3b3031c..cf7b9e1a9 100644 --- a/src/xenia/gpu/glsl_shader_translator.cc +++ b/src/xenia/gpu/glsl_shader_translator.cc @@ -179,7 +179,7 @@ vec4 cube(vec4 src0, vec4 src1) { float s = (sc / ma + 1.0) / 2.0; float t = (tc / ma + 1.0) / 2.0; return vec4(t, s, 2.0 * ma, float(face_id)); -}; +} )"); if (is_vertex_shader()) { @@ -234,7 +234,7 @@ vec4 applyTransform(const in StateData state, vec4 pos) { pos.xyz = mix(pos.xyz, pos.xyz / pos.w, notEqual(state.vtx_fmt.xyz, vec3(0.0))); pos.xy *= state.window_scale.xy; return pos; -}; +} void processVertex(const in StateData state); void main() { gl_Position = vec4(0.0, 0.0, 0.0, 1.0);