Skip to content

nir/validate: Don't abort() until after the shader has printed

In the case where SSA use/def chains are broken, NIR prints out a very cryptic error and then aborts. This abort happens during validation rather than after the print is complete, hiding any other errors that may have been found. One might think, "So what? Fix your use/def issue first." However, what makes this especially bad is that, when use/def chains are broken, there's usually a much nicer error inline in the shader that would have been printed had we not aborted early so the current behavior simply ensures you get the most cryptic error possible in an already difficult-to-debug case.

While we're at it, we remove the one other case of abort() which is in the validation of phi instruction sources.

Merge request reports