glsl: remove dead uniforms in the nir linker
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 29 Apr 2020 02:20:47 +0000 (12:20 +1000)
committerMarge Bot <eric+marge@anholt.net>
Wed, 3 Jun 2020 02:22:23 +0000 (02:22 +0000)
commita494b6241016d3d5995902748b40c70ae8d1ecbd
treee8aa0e6871b00d0d18a58ae128b43c30bb1dfc27
parent60bee4c70c0d956ecdcae542a515f3e3a4ee328c
glsl: remove dead uniforms in the nir linker

This is now possible as we do uniform linking via a nir based linker.

Shader-db results for IRIS (SKL):

total instructions in shared programs: 14947192 -> 14946397 (<.01%)
instructions in affected programs: 39498 -> 38703 (-2.01%)
helped: 230
HURT: 18

total cycles in shared programs: 324868402 -> 324847058 (<.01%)
cycles in affected programs: 706701 -> 685357 (-3.02%)
helped: 599
HURT: 449

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
src/compiler/glsl/gl_nir_linker.c