Skip to content

glsl: don't duplicate state vars as uniforms in the NIR linker

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

The linker was adding all state vars as uniforms, doubling the storage size for shaders using only builtin uniforms, which increased CPU overhead for constant buffer uploads.

When this code was originally ported from the GLSL IR linker we forgot to exclude builtins because the check was not done in the add_uniform_to_shader class but rather a check was done when passing variables to this class for processing.

Fixes: 664e4a61 ("glsl/nir: Fill in the Parameters in NIR linker")

Merge request reports