diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-17 11:45:57 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-18 16:57:24 -0700 |
commit | 0a23ec2b6e3742281a0047da9246039e86e4a7b6 (patch) | |
tree | dbf12bad9aace58ab3e73d6c929f3abbf322fddb /src/glsl | |
parent | 9a9a830b445b5dbd70a4155e0e5e8b896abfb868 (diff) | |
download | external_mesa3d-0a23ec2b6e3742281a0047da9246039e86e4a7b6.zip external_mesa3d-0a23ec2b6e3742281a0047da9246039e86e4a7b6.tar.gz external_mesa3d-0a23ec2b6e3742281a0047da9246039e86e4a7b6.tar.bz2 |
glsl: Delete unused code for handling samplers in array-initializers.
There is existing code to handle sampler uniform initializers. Prior to
GLSL 4.20's "binding" keyword, sampler uniforms don't have initializers
at all, so this is somewhat surprising.
The existing code is broken into two cases: one where both the variable and
initializer are arrays, and a second where the variable and initializer are
scalars.
The first case should never occur, since array-typed initializers do not
exist for sampler uniforms. Even with the binding keyword, the
initializer is a single integer which represents the texture unit to use
for the first array element.
The second is apparently used for some fixed-function code.
v2: Rewrite the commit message - suggested by Paul.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/link_uniform_initializers.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/glsl/link_uniform_initializers.cpp b/src/glsl/link_uniform_initializers.cpp index 54d9bf1..f46f6e2 100644 --- a/src/glsl/link_uniform_initializers.cpp +++ b/src/glsl/link_uniform_initializers.cpp @@ -136,20 +136,6 @@ set_uniform_initializer(void *mem_ctx, gl_shader_program *prog, idx += elements; } - - if (base_type == GLSL_TYPE_SAMPLER) { - for (int sh = 0; sh < MESA_SHADER_TYPES; sh++) { - gl_shader *shader = prog->_LinkedShaders[sh]; - - if (shader && storage->sampler[sh].active) { - for (unsigned i = 0; i < storage->array_elements; i++) { - unsigned index = storage->sampler[sh].index + i; - - shader->SamplerUnits[index] = storage->storage[i].i; - } - } - } - } } else { copy_constant_to_storage(storage->storage, val, |