From: Ilia Mirkin Date: Tue, 23 Jun 2015 04:16:59 +0000 (-0400) Subject: glsl: binding point is a texture unit, which is a combined space X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fccf012adc0d3aad877de095244324aa1d2d046a;p=mesa.git 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 Reviewed-by: Chris Forbes Reviewed-by: Timothy Arceri Tested-by: Nick Sarnie Cc: "10.5 10.6" --- diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 259e01e0ca4..8cb46beab1e 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2086,7 +2086,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 "