glsl: count uniform components and storage better in nir linking
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 13 Jan 2020 05:09:10 +0000 (16:09 +1100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Jan 2020 01:02:25 +0000 (01:02 +0000)
commitd3a4d1775e5e8b193c2c3dc1ab550e6855e158f1
tree4a2546049f8e447fa9ec8d1022d58da450ab855b
parente5b3cf433e8b0e31e257a8e1216b6f8c08f7e780
glsl: count uniform components and storage better in nir linking

This helps avoid incorrect validation error when linking glsl
shaders and avoids assigning uniform storage slots that will
never be used.

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3468>
src/compiler/glsl/gl_nir_link_uniforms.c