Skip to content

gallium & radeonsi NIR: Disable GLSL const initializer lowering

We now have a better alternative with nir_opt_large_constants. Also, NIR optimizations may mean that indirect accesses to the variable turn into direct ones, e.g. because NIR unrolled a loop that GLSL didn't, and the old pass left no way for NIR to recover the original constant value and remove the variable.

This has to be a separate PIPE_CAP because some NIR-using gallium drivers don't call nir_opt_large_constants yet. We enable the cap for radeonsi when NIR is enabled, but other drivers like iris or i965 that use nir_opt_large_constants could also benefit.

This is based on !1844 (merged).

Merge request reports