OSDN Git Service

glsl: Only set ir_variable::constant_value for const-decorated variables
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 7 Oct 2015 19:52:58 +0000 (12:52 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 21 Oct 2015 13:23:21 +0000 (14:23 +0100)
commit2d5b8efd7d26c836e46720f7b349994fe7be6ecd
tree1ccc911ecf09dccdae90ee967bb63612a75f2121
parent0c6b2107499f6f5653808f4d1181ecb1871ff695
glsl: Only set ir_variable::constant_value for const-decorated variables

Right now we're also setting for uniforms, and that doesn't seem to hurt
things.  The next patch will make general global variables in GLSL ES,
and those definitely should not have constant_value set!

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 3524d6df33b1e3716992f9a555ffb0f7b1ae2f4f)
src/glsl/ast_to_hir.cpp