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.
This commit is contained in:
Ryan Houdek 2014-06-07 00:29:21 -05:00
parent b9dc69105d
commit bc9ef95643
51 changed files with 76 additions and 75 deletions

View file

@ -346,7 +346,7 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo
TextureCache::TextureCache()
{
const char *pColorMatrixProg =
"uniform sampler2D samp9;\n"
"SAMPLER_BINDING(9) uniform sampler2D samp9;\n"
"uniform vec4 colmat[7];\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
@ -358,7 +358,7 @@ TextureCache::TextureCache()
"}\n";
const char *pDepthMatrixProg =
"uniform sampler2D samp9;\n"
"SAMPLER_BINDING(9) uniform sampler2D samp9;\n"
"uniform vec4 colmat[5];\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
@ -372,7 +372,7 @@ TextureCache::TextureCache()
const char *VProgram =
"out vec2 uv0;\n"
"uniform sampler2D samp9;\n"
"SAMPLER_BINDING(9) uniform sampler2D samp9;\n"
"uniform vec4 copy_position;\n" // left, top, right, bottom
"void main()\n"
"{\n"