diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 25ab6221da..8460df12d6 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -562,7 +562,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType // A few required defines and ones that will make our lives a lot easier if (g_ActiveConfig.backend_info.bSupportsGLSLBinding || g_ActiveConfig.backend_info.bSupportsGLSLUBO) { - WRITE(p, "#version 330 compatibility\n"); + WRITE(p, "#version 130\n"); if (g_ActiveConfig.backend_info.bSupportsGLSLBinding) WRITE(p, "#extension GL_ARB_shading_language_420pack : enable\n"); if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index d0de57c8cf..871043da5d 100644 --- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp @@ -850,7 +850,7 @@ const char *GenerateEncodingShader(u32 format,API_TYPE ApiType) // A few required defines and ones that will make our lives a lot easier if (g_ActiveConfig.backend_info.bSupportsGLSLBinding || g_ActiveConfig.backend_info.bSupportsGLSLUBO) { - WRITE(p, "#version 330 compatibility\n"); + WRITE(p, "#version 130\n"); if (g_ActiveConfig.backend_info.bSupportsGLSLBinding) WRITE(p, "#extension GL_ARB_shading_language_420pack : enable\n"); if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 788f2bab7e..de4a93d65b 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -190,7 +190,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType) // A few required defines and ones that will make our lives a lot easier if (g_ActiveConfig.backend_info.bSupportsGLSLBinding || g_ActiveConfig.backend_info.bSupportsGLSLUBO) { - WRITE(p, "#version 330 compatibility\n"); + WRITE(p, "#version 130\n"); if (g_ActiveConfig.backend_info.bSupportsGLSLBinding) WRITE(p, "#extension GL_ARB_shading_language_420pack : enable\n"); if (g_ActiveConfig.backend_info.bSupportsGLSLUBO) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp index 7e843796db..129d3060b4 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp @@ -73,6 +73,7 @@ void PixelShaderCache::Init() sprintf(pmatrixprog, "#version %s\n" "#extension GL_ARB_texture_rectangle : enable\n" "%s\n" + "%s\n" "%suniform sampler2DRect samp0;\n" "%s\n" "%svec4 " I_COLORS"[7];\n" @@ -91,8 +92,9 @@ void PixelShaderCache::Init() "Temp1.w = dot(Temp0, " I_COLORS"[%d]);\n" "gl_FragData[0] = Temp1 + " I_COLORS"[%d];\n" "}\n", - (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "330 compatibility" : "120", + (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "130" : "120", g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "#extension GL_ARB_shading_language_420pack : enable" : "", + g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "#extension GL_ARB_uniform_buffer_object : enable" : "", g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "layout(binding = 0) " : "", g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "layout(std140) uniform PSBlock {" : "", g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "" : "uniform ", @@ -109,6 +111,7 @@ void PixelShaderCache::Init() sprintf(pmatrixprog, "#version %s\n" "#extension GL_ARB_texture_rectangle : enable\n" "%s\n" + "%s\n" "%suniform sampler2DRect samp0;\n" "%s\n" "%svec4 " I_COLORS"[5];\n" @@ -137,8 +140,9 @@ void PixelShaderCache::Init() "R1.w = dot(R0, " I_COLORS"[%d]);\n" "gl_FragData[0] = R1 * " I_COLORS"[%d];\n" "}\n", - (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "330 compatibility" : "120", + (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "130" : "120", g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "#extension GL_ARB_shading_language_420pack : enable" : "", + g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "#extension GL_ARB_uniform_buffer_object : enable" : "", g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "layout(binding = 0) " : "", g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "layout(std140) uniform PSBlock {" : "", g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "" : "uniform ", diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index 349600dd60..e8a6bd1c06 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -72,9 +72,10 @@ void CreateRgbToYuyvProgram() if (g_ActiveConfig.backend_info.bSupportsGLSLBinding) { const char *FProgram = - "#version 330 compatibility\n" + "#version 130\n" "#extension GL_ARB_texture_rectangle : enable\n" "#extension GL_ARB_shading_language_420pack : enable\n" + "#extension GL_ARB_explicit_attrib_location : enable\n" "layout(binding = 0) uniform sampler2DRect samp0;\n" "void main()\n" "{\n" @@ -119,9 +120,10 @@ void CreateYuyvToRgbProgram() if (g_ActiveConfig.backend_info.bSupportsGLSLBinding) { const char *FProgram = - "#version 330 compatibility\n" + "#version 130\n" "#extension GL_ARB_texture_rectangle : enable\n" "#extension GL_ARB_shading_language_420pack : enable\n" + "#extension GL_ARB_explicit_attrib_location : enable\n" "layout(binding = 0) uniform sampler2DRect samp0;\n" "void main()\n" "{\n"