diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-17 11:24:11 -0700 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-07-18 16:57:24 -0700 |
commit | 34e2ccc9f099affa78298203db015b9a17ab6de3 (patch) | |
tree | 2297b437d8ccce258291fca07e3c1678d7020938 /src/glsl/ast_to_hir.cpp | |
parent | 67038c6ba27ea55d8d65557922bfe758a01101ef (diff) | |
download | external_mesa3d-34e2ccc9f099affa78298203db015b9a17ab6de3.zip external_mesa3d-34e2ccc9f099affa78298203db015b9a17ab6de3.tar.gz external_mesa3d-34e2ccc9f099affa78298203db015b9a17ab6de3.tar.bz2 |
glsl: Handle the binding qualifier for arrays of samplers.
Normally, uniform array variables are initialized by array literals.
That is, val->type->array_elements >= storage->array_elements.
However, samplers are different. Consider a declaration such as:
layout(binding = 5) uniform sampler2D[3];
The initializer value is a single integer (5), while the storage has 3
array elements. The proper behavior here is to increment one for each
element; they should be initialized to 5, 6, and 7.
This patch introduces new code for sampler types which handles both
arrays of samplers and single samplers correctly.
v2: Move into the other function; use binding, not constant_value.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
0 files changed, 0 insertions, 0 deletions