From 14d2dd7fdd76677ca0b9d1a22cbfd807cc59b292 Mon Sep 17 00:00:00 2001 From: Kalyan Kondapally Date: Sun, 21 Sep 2014 17:18:14 -0700 Subject: [PATCH] Allow any sort of sampler array indexing with GLSL-ES < 300 Restrictions were added in GLSL 1.30 to allow indexing of arrays with integral constants only. Earlier versions (GLSL <= 1.20 and GLSL-ES <=100) should allow any sort of sampler array indexing. Signed-off-by: Kalyan Kondapally --- src/glsl/ast_array_index.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/glsl/ast_array_index.cpp b/src/glsl/ast_array_index.cpp index 5ca85f6..167ed9e 100644 --- a/src/glsl/ast_array_index.cpp +++ b/src/glsl/ast_array_index.cpp @@ -222,7 +222,7 @@ _mesa_ast_array_index_to_hir(void *mem_ctx, * dynamically uniform expression is undefined. */ if (array->type->element_type()->is_sampler()) { - if (!state->is_version(130, 100)) { + if (state->is_version(120, 100)) { if (state->es_shader) { _mesa_glsl_warning(&loc, state, "sampler arrays indexed with non-constant " -- 1.9.1