Skip to content

glsl: fix slow linking of uniforms in the nir linker

Timothy Arceri requested to merge tarceri/mesa:fix_linking_times into master

Currently the nir linker resizes the amount of storage needed to hold uniform information on the fly while linking. As shaders can contain thousands of uniforms this can be very slow. For example some Godot shaders can take 30 seconds to compile on some machines.

In this change we count the amount of storage needed before we start processing the uniforms. This is what the GLSL IR linker does also.

Fixes: 95f555a9 ("st/glsl_to_nir: make use of nir linker for linking uniforms") Closes: #2996 (closed)

Merge request reports