glsl: mark variable as loop constant when it is set read only
authorTapani Pälli <tapani.palli@intel.com>
Tue, 9 Sep 2014 11:56:06 +0000 (14:56 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Thu, 11 Sep 2014 07:09:12 +0000 (10:09 +0300)
commit096ee4c3b00cf1038830ee5994dd27e9963c24e8
treee508b315da59c82eb7df99ec65de5d9836e3c685
parent82edcb918be3fdff12af3123269552d0829316ed
glsl: mark variable as loop constant when it is set read only

Patch modifies is_loop_constant() to take advantage of 'read_only' bit
in ir_variable to detect a loop constant. Variables marked read-only
are loop constant like mentioned by a comment in the function.

v2: remove unnecessary comment (Francisco)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82537
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/glsl/loop_analysis.h