glsl: Don't do constant propagation on buffer variables
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 24 Apr 2015 09:14:17 +0000 (11:14 +0200)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Tue, 14 Jul 2015 05:04:04 +0000 (07:04 +0200)
commit0b1111d985714816fad20c99b4e6ea762df17b46
treed546201d1950b1738d0573a07535c7cf0f54c374
parent5360ff30c4de966422fde6a574e3959c81bf5037
glsl: Don't do constant propagation on buffer variables

Since the backing storage for these is shared we cannot ensure that
the value won't change by writes from other threads. Normally SSBO
accesses are not guaranteed to be syncronized with other threads,
except when memoryBarrier is used. So, we might be able to optimize
some SSBO accesses, but for now we always take the safe path and emit
the SSBO access.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/glsl/opt_constant_propagation.cpp