diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 459ae0733c..03d1677b2c 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -309,9 +309,9 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T if (ApiType == API_OPENGL) { - out.Write("COLOROUT(ocol0)\n"); + out.Write("out vec4 ocol0;\n"); if (dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND) - out.Write("COLOROUT(ocol1)\n"); + out.Write("out vec4 ocol1;\n"); if (per_pixel_depth) out.Write("#define depth gl_FragDepth\n"); diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index de5198c9fe..bf2f2737ea 100644 --- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp @@ -96,7 +96,7 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType) if (ApiType == API_OPENGL) { - WRITE(p, " COLOROUT(ocol0)\n"); + WRITE(p, " out vec4 ocol0;\n"); WRITE(p, " VARYIN float2 uv0;\n"); WRITE(p, "void main()\n"); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp index a9ea7fbb4e..ed36b5dd6d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp @@ -200,7 +200,7 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms char ps_rgba6_to_rgb8[] = "uniform sampler2DRect samp9;\n" - "COLOROUT(ocol0)\n" + "out vec4 ocol0;\n" "void main()\n" "{\n" " ivec4 src6 = ivec4(round(texture2DRect(samp9, gl_FragCoord.xy) * 63.f));\n" @@ -214,7 +214,7 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms char ps_rgb8_to_rgba6[] = "uniform sampler2DRect samp9;\n" - "COLOROUT(ocol0)\n" + "out vec4 ocol0;\n" "void main()\n" "{\n" " ivec4 src8 = ivec4(round(texture2DRect(samp9, gl_FragCoord.xy) * 255.f));\n" @@ -226,13 +226,8 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms " ocol0 = float4(dst6) / 63.f;\n" "}"; - if(g_ogl_config.eSupportedGLSLVersion != GLSL_120) - { - // HACK: This shaders aren't glsl120 compatible as glsl120 don't support bit operations - // it could be workaround by floor + frac + tons off additions, but I think it isn't worth - ProgramShaderCache::CompileShader(m_pixel_format_shaders[0], vs, ps_rgb8_to_rgba6); - ProgramShaderCache::CompileShader(m_pixel_format_shaders[1], vs, ps_rgba6_to_rgb8); - } + ProgramShaderCache::CompileShader(m_pixel_format_shaders[0], vs, ps_rgb8_to_rgba6); + ProgramShaderCache::CompileShader(m_pixel_format_shaders[1], vs, ps_rgba6_to_rgb8); } @@ -364,18 +359,6 @@ GLuint FramebufferManager::ResolveAndGetDepthTarget(const EFBRectangle &source_r void FramebufferManager::ReinterpretPixelData(unsigned int convtype) { - if(g_ogl_config.eSupportedGLSLVersion == GLSL_120) { - // This feature isn't supported by glsl120 - - // TODO: move this to InitBackendInfo - // We have to disable both the active and the stored config. Else we would either - // show this line per format change in one frame or once per frame. - OSD::AddMessage("Format Change Emulation isn't supported by your GPU.", 10000); - g_ActiveConfig.bEFBEmulateFormatChanges = false; - g_Config.bEFBEmulateFormatChanges = false; - return; - } - g_renderer->ResetAPIState(); GLuint src_texture = 0; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 5cc9ec36cd..f27f56d701 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -524,10 +524,10 @@ void ProgramShaderCache::CreateHeader ( void ) "%s\n" // early-z "\n"// A few required defines and ones that will make our lives a lot easier - "#define ATTRIN %s\n" - "#define ATTROUT %s\n" - "#define VARYIN %s\n" - "#define VARYOUT %s\n" + "#define ATTRIN in\n" + "#define ATTROUT out\n" + "#define VARYIN %s in\n" + "#define VARYOUT %s out\n" // Silly differences "#define float2 vec2\n" @@ -538,35 +538,18 @@ void ProgramShaderCache::CreateHeader ( void ) "#define frac fract\n" "#define lerp mix\n" - // glsl 120 hack - "%s\n" - "%s\n" - "%s\n" - "%s\n" - "%s\n" - "#define COLOROUT(name) %s\n" - // texture2d hack "%s\n" "%s\n" "%s\n" - , v==GLSLES3 ? "300 es" : v==GLSL_120 ? "120" : v==GLSL_130 ? "130" : v==GLSL_140 ? "140" : "150" + , v==GLSLES3 ? "300 es" : v==GLSL_130 ? "130" : v==GLSL_140 ? "140" : "150" , v==GLSLES3 ? "precision highp float;" : "" , g_ActiveConfig.backend_info.bSupportsGLSLUBO && v