Skip to content

nir/serialize: fix load_const def's divergence

Iago Toral requested to merge itoral/mesa:nir_serialize_load_const into main

We are not reconstructing divergence information for the destination of load_const instrinsics when deserializing the NIR, which results in an undefined value. We have observed this to cause some asserts to trigger for V3D and V3DV when running NIR_DEBUG=serialize, I'd expect the same would happen with more drivers.

Constant loads are never divergent, so there is little value in serializing the divergence info, instead we can initialize it properly when deserializing the instruction.

Merge request reports