compiler/glsl: explicitly store NumUniformBlocks
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 28 Apr 2020 11:28:16 +0000 (13:28 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 5 May 2020 09:17:51 +0000 (09:17 +0000)
commit8471f7a5fa1d5c00de9f314eaccd23dd0e62e71b
treed3a03bc56454dc7fc3ceec38e9eb35f05f3730ac
parent8059f206da88a7a2147c66b3057d60d775cbbfce
compiler/glsl: explicitly store NumUniformBlocks

It's not great to use shader_info for this information, because it
might have gone through lowering of uniforms to UBOs, which can change
the number of UBOs. So let's make sure we know the size of the
UniformBlocks array from when the shader was linked instead.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4734>
src/compiler/glsl/gl_nir_link_uniform_blocks.c
src/compiler/glsl/linker.cpp
src/compiler/glsl/serialize.cpp
src/mesa/main/mtypes.h