glsl: Do not kill dead assignments to buffer variables or SSBO declarations.
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 6 Apr 2015 08:19:50 +0000 (10:19 +0200)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Tue, 14 Jul 2015 05:04:04 +0000 (07:04 +0200)
commit5360ff30c4de966422fde6a574e3959c81bf5037
treef44b57d6d3ca4836292b85627513e3bd63bcfeb8
parent3ad92589f29466383c0218aa4a73bff52019c4be
glsl: Do not kill dead assignments to buffer variables or SSBO declarations.

If we kill dead assignments we lose the buffer writes.

Also, we never kill UBO declarations even if they are never referenced
by the shader, they are always considered active. Although the spec
does not seem say this specifically for SSBOs, it is probably implied
since SSBOs are pretty much the same as UBOs, only that you can write
to them.

v2:
- Fix the comment (Jordan)

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