glsl: only set stage ref when uniforms referenced in stage
authorTimothy Arceri <tarceri@itsqueeze.com>
Thu, 12 Mar 2020 23:17:08 +0000 (10:17 +1100)
committerMarge Bot <eric+marge@anholt.net>
Sat, 18 Apr 2020 11:50:44 +0000 (11:50 +0000)
commit36d2a0eed69b6f584c417bdbe0ea0f4623f1b514
treea532040e85844aff69935d7d5f8e13f6e87aa472
parent6afd0954e12eb75a4ce19580907b1fc4145369b9
glsl: only set stage ref when uniforms referenced in stage

This updates the NIR uniform linker to behave like the GLSL IR
linker and fixes a number of CTS tests once we enable the NIR
linker for glsl.

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