Skip to content
Snippets Groups Projects
Commit f1acf492 authored by Timothy Arceri's avatar Timothy Arceri Committed by Marge Bot
Browse files

glsl: fix slow linking of uniforms in the nir linker

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: mesa/mesa#2996



Reviewed-by: default avatarAlejandro Piñeiro <apinheiro@igalia.com>
Part-of: <mesa/mesa!5137>
parent f6214750
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment