OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 1 Jul 2015 14:22:41 +0000 (15:22 +0100)
commit81ac47605f887c9cbf5d2f3a77e7a71a28fbe37f
tree2f78b8f297756701285e618b0cf1df11727f4511
parentf8ea1430ae0bbaf68f73aa3a706d9112402e396d
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>
(cherry picked from commit 9350ea6979c48772e1fb55d4f1c7c5a3cfa987b0)
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Conflicts:
src/glsl/linker.cpp
src/glsl/linker.cpp