mesa/st: don't use base shader serialization when uniforms are not packed
This is a hotfix for #10881 (closed)
When loading the base shader serialization there is a discrepancy between the state parameters that may already have been optimized, because after storing the serialization the shader went through st_finalize_nir, and _mesa_optimize_state_parameters was run, so that original state parameters may have been optimized and replaced by new parameters.
After get_nir_shader is called, the original state parameters are re-added - in addition to the optimized parameters. This lead to an bug with the uniform offsets when lowering uniforms to UBOs.
Therefore, as a hotfix for drivers that don't support packed uniforms, ignore the base serialization and use the serialization obtained after st_finalize_nir was run. With that the problem can be avoided.
Fixes: 5eb0136a mesa/st: when creating draw shader variants, use the base nir and skip driver opts
Closes: #10881 (closed)