summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2015-06-23 00:16:59 -0400
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-01 15:22:39 +0100
commit54ac5920094806def6a8f9a4d13231020daf639b (patch)
treedee6d5836205303a3febee5a15d3461c44e09657
parent7b528f0d78ef88f0b90b11c7b3b17ee127a9a391 (diff)
glsl: binding point is a texture unit, which is a combined space
This fixes compilation failures in Dota 2 Reborn where a texture unit binding point was used that was numerically higher than the max per stage. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au> Tested-by: Nick Sarnie <commendsarnex@gmail.com> Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org> (cherry picked from commit fccf012adc0d3aad877de095244324aa1d2d046a)
-rw-r--r--src/glsl/ast_to_hir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 1dcb924410..31a9dbadd2 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2108,7 +2108,7 @@ validate_binding_qualifier(struct _mesa_glsl_parse_state *state,
* with an array of size N, all elements of the array from binding
* through binding + N - 1 must be within this range."
*/
- unsigned limit = ctx->Const.Program[state->stage].MaxTextureImageUnits;
+ unsigned limit = ctx->Const.MaxCombinedTextureImageUnits;
if (max_index >= limit) {
_mesa_glsl_error(loc, state, "layout(binding = %d) for %d samplers "