summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2017-12-13 09:32:06 +0100
committerGitHub <noreply@github.com>2017-12-13 09:32:06 +0100
commit49a55e0a930f866fbca12a0e83b7e9d60beebdbf (patch)
treeb70e3d73e6305ad0312ebff1bcb165f6d71c6813 /Source/Core/VideoCommon
parenta70c03a1c0a6fce6724a323db3bdc41d8b905090 (diff)
parenta38103afbf78bf30be3dd9ecf15637aefb8695a9 (diff)
Merge pull request #6252 from JonnyH/WIP/gles-gpu-texture-conversion-fixes
Fix GLES GPU texture conversion shader
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/TextureConverterShaderGen.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
index 5133555980..39141edb21 100644
--- a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
+++ b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
@@ -179,14 +179,13 @@ ShaderCode GenerateShader(APIType api_type, const UidData* uid_data)
color_mask[4] = color_mask[5] = color_mask[6] = color_mask[7] = 1.0f / 15.0f;
}
}
- out.Write(" const float4 colmat[7] = {\n");
+ out.Write(" float4 colmat[7];\n");
for (size_t i = 0; i < colmat.size() / 4; i++)
{
- out.Write(" float4(%f, %f, %f, %f)%s\n", colmat[i * 4 + 0], colmat[i * 4 + 1],
- colmat[i * 4 + 2], colmat[i * 4 + 3], i < 7 ? "," : "");
+ out.Write(" colmat[%zu] = float4(%f, %f, %f, %f);\n", i, colmat[i * 4 + 0],
+ colmat[i * 4 + 1], colmat[i * 4 + 2], colmat[i * 4 + 3]);
}
- out.Write(" };\n"
- " texcol = floor(texcol * colmat[5]) * colmat[6];\n"
+ out.Write(" texcol = floor(texcol * colmat[5]) * colmat[6];\n"
" ocol0 = float4(dot(texcol, colmat[0]), dot(texcol, colmat[1]), dot(texcol, "
"colmat[2]), dot(texcol, colmat[3])) + colmat[4];\n");
break;