glsl: validate sampler array indexing for 'constant-index-expression'
authorTapani Pälli <tapani.palli@intel.com>
Tue, 19 May 2015 12:01:49 +0000 (15:01 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 30 Jun 2015 08:12:44 +0000 (11:12 +0300)
commit9350ea6979c48772e1fb55d4f1c7c5a3cfa987b0
tree1d22f39863a12ddd850c745df66bf775ad674438
parentf17c8c287f3581fccb52714fbd4b2ea09a58e3d3
glsl: validate sampler array indexing for 'constant-index-expression'

Desktop GLSL < 130 and GLSL ES < 300 allow sampler array indexing where
index can contain a loop induction variable. This extra check will warn
during linking if some of the indexes could not be turned in to constant
expressions.

v2: warning instead of error for backends that did not enable
    EmitNoIndirectSampler option (have dynamic indexing)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: "10.5" and "10.6" <mesa-stable@lists.freedesktop.org>
src/glsl/linker.cpp