Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix the issue with COLOROUT not being defined anymore. Fix a issue wh…
…ere Mali shader compiler is idiotic in finding an overload for the mix function.
  • Loading branch information
Sonicadvance1 committed Nov 25, 2013
1 parent 2c09e8f commit da3eef1
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/OGL/Src/FramebufferManager.cpp
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/OGL/Src/RasterFont.cpp
Expand Up @@ -127,7 +127,7 @@ static const char *s_fragmentShaderSrc =
"uniform sampler2D samp8;\n"
"uniform vec4 color;\n"
"VARYIN vec2 uv0;\n"
"COLOROUT(ocol0)\n"
"out vec4 ocol0;\n"
"void main(void) {\n"
" ocol0 = texture(samp8,uv0) * color;\n"
"}\n";
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/OGL/Src/Render.cpp
Expand Up @@ -665,7 +665,7 @@ void Renderer::Init()
" c = vec4(color0, 1.0);\n"
"}\n",
"VARYIN vec4 c;\n"
"COLOROUT(ocol0)\n"
"out vec4 ocol0;\n"
"void main(void) {\n"
" ocol0 = c;\n"
"}\n");
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoBackends/OGL/Src/TextureCache.cpp
Expand Up @@ -406,7 +406,7 @@ TextureCache::TextureCache()
"uniform sampler2DRect samp9;\n"
"uniform vec4 colmat[7];\n"
"VARYIN vec2 uv0;\n"
"COLOROUT(ocol0)\n"
"out vec4 ocol0;\n"
"\n"
"void main(){\n"
" vec4 texcol = texture2DRect(samp9, uv0);\n"
Expand All @@ -418,7 +418,7 @@ TextureCache::TextureCache()
"uniform sampler2DRect samp9;\n"
"uniform vec4 colmat[5];\n"
"VARYIN vec2 uv0;\n"
"COLOROUT(ocol0)\n"
"out vec4 ocol0;\n"
"\n"
"void main(){\n"
" vec4 texcol = texture2DRect(samp9, uv0);\n"
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/VideoBackends/OGL/Src/TextureConverter.cpp
Expand Up @@ -77,7 +77,7 @@ void CreatePrograms()
const char *FProgramRgbToYuyv =
"uniform sampler2DRect samp9;\n"
"VARYIN vec2 uv0;\n"
"COLOROUT(ocol0)\n"
"out vec4 ocol0;\n"
"void main()\n"
"{\n"
" vec3 c0 = texture2DRect(samp9, uv0 - dFdx(uv0) * 0.25).rgb;\n"
Expand Down Expand Up @@ -106,7 +106,7 @@ void CreatePrograms()
const char *FProgramYuyvToRgb =
"uniform sampler2DRect samp9;\n"
"VARYIN vec2 uv0;\n"
"COLOROUT(ocol0)\n"
"out vec4 ocol0;\n"
"void main()\n"
"{\n"
" ivec2 uv = ivec2(gl_FragCoord.xy);\n"
Expand All @@ -118,7 +118,7 @@ void CreatePrograms()
" ivec2 ts = textureSize(samp9);\n"
" vec4 c0 = texelFetch(samp9, ivec2(uv.x/2, ts.y-uv.y-1));\n"
#endif
" float y = mix(c0.b, c0.r, uv.x & 1);\n"
" float y = mix(c0.b, c0.r, (uv.x & 1) == 1);\n"
" float yComp = 1.164 * (y - 0.0625);\n"
" float uComp = c0.g - 0.5;\n"
" float vComp = c0.a - 0.5;\n"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/Src/PixelShaderGen.cpp
Expand Up @@ -304,7 +304,7 @@ 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("out vec4 ocol1;\n");

Expand Down

0 comments on commit da3eef1

Please sign in to comment.