From bc9ef95643c73838800274be9afd691b542b9f1a Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sat, 7 Jun 2014 00:29:21 -0500 Subject: Support Sampler binding in the shader. In the cases where we support the binding layout keyword, use it for more than binding UBO location. This changes it so it is supported for samplers as well. Instances when this is enabled is if a device supports GL_ARB_shading_language_420pack, or if it supports GLES 3.10. --- Source/Core/VideoBackends/OGL/FramebufferManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/FramebufferManager.cpp') diff --git a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp index cb21fc382f..62f112af2e 100644 --- a/Source/Core/VideoBackends/OGL/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/OGL/FramebufferManager.cpp @@ -169,7 +169,7 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms { // non-msaa, so just fetch the pixel sampler = - "uniform sampler2D samp9;\n" + "SAMPLER_BINDING(9) uniform sampler2D samp9;\n" "vec4 sampleEFB(ivec2 pos) {\n" " return texelFetch(samp9, pos, 0);\n" "}\n"; @@ -180,7 +180,7 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms // This will lead to sample shading, but it's the only way to not loose // the values of each sample. sampler = - "uniform sampler2DMS samp9;\n" + "SAMPLER_BINDING(9) uniform sampler2DMS samp9;\n" "vec4 sampleEFB(ivec2 pos) {\n" " return texelFetch(samp9, pos, gl_SampleID);\n" "}\n"; @@ -191,7 +191,7 @@ FramebufferManager::FramebufferManager(int targetWidth, int targetHeight, int ms std::stringstream samples; samples << m_msaaSamples; sampler = - "uniform sampler2DMS samp9;\n" + "SAMPLER_BINDING(9) uniform sampler2DMS samp9;\n" "vec4 sampleEFB(ivec2 pos) {\n" " vec4 color = vec4(0.0, 0.0, 0.0, 0.0);\n" " for(int i=0; i<" + samples.str() + "; i++)\n" -- cgit v1.2.3