diff options
| author | Scott Mansell <phiren@gmail.com> | 2015-10-12 02:47:15 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2015-10-12 05:06:39 +1300 |
| commit | 645e4cbbee28a92a19cff5f927b6c3156d3fa578 (patch) | |
| tree | 28c29a370594930346c43b0434aa664466657b1a /Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | |
| parent | dd5df05c01aa221ac73a2d2aba44d87ccb095ca9 (diff) | |
PixelShaderGen: Use arrays of texture samplers.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index eca51c5fc9..60a5b4bc99 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -88,11 +88,14 @@ void SHADER::SetProgramVariables() if (GSBlock_id != -1) glUniformBlockBinding(glprogid, GSBlock_id, 3); - // Bind Texture Sampler + // Bind Texture Samplers for (int a = 0; a <= 9; ++a) { - char name[8]; - snprintf(name, 8, "samp%d", a); + char name[10]; + if (a < 8) + snprintf(name, 8, "samp[%d]", a); + else + snprintf(name, 8, "samp%d", a); // Still need to get sampler locations since we aren't binding them statically in the shaders int loc = glGetUniformLocation(glprogid, name); |
