Skip to content

mesa/st: clear parameters when reading back base serialized nir

Since the shader program already went through st_finalize_nir the parameters have been optimized already, and for driver that don't use packed uniforms this may result in some or all of the state parameters being replaced by a new parameter. After readeing the base serialization of a shader, that was not yet lowered to UBO, the state parameters will be added again in addition toi the optimized parameter resultin in wrong UBO offsets after lowering the uniforms to UBO.

Therefore, for drivers that don't use packed uniforms clear the program parameters when reading back the base serialization.

Fixes: 5eb0136a3c561e25d3f274e33a86812cfb2af589
    mesa/st: when creating draw shader variants,
    use the base nir and skip driver opts


Merge request reports