diff options
| author | flacs <tilkax@gmail.com> | 2015-10-12 18:44:14 +0200 |
|---|---|---|
| committer | flacs <tilkax@gmail.com> | 2015-10-12 18:44:14 +0200 |
| commit | b0bbe52cc96c8182dc46dec20c10d14f05a133db (patch) | |
| tree | 078ec4c2f1bbd1761d4e0529251b8b8a39f2da53 /Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | |
| parent | 97fbbecdc4351290830ea67e0c17f1d65f666bf3 (diff) | |
| parent | 645e4cbbee28a92a19cff5f927b6c3156d3fa578 (diff) | |
Merge pull request #3164 from phire/samplerArrays
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); |
