glsl: don't set uniform block as used when its not
authorTimothy Arceri <tarceri@itsqueeze.com>
Tue, 3 Dec 2019 13:14:03 +0000 (00:14 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Thu, 5 Dec 2019 02:18:23 +0000 (13:18 +1100)
commitf0cb0fe1c0804ce87bb66d0ad4c9d31e36ef985f
tree25dd2f00a996a106d36e57654844d39a43040733
parent50dc4b77f6ba7f70c110b8b35479c8ee8ddaaa96
glsl: don't set uniform block as used when its not

The spec requires unused uniform block to be set as active in the
program resource list. To support this we tell opt dead code not to
remove them. However we can mark them as unused internally and
avoid unnecessarily state changes.

This change is also required for the folowing clean-up patch.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/compiler/glsl/link_uniforms.cpp
src/compiler/glsl/opt_dead_code.cpp