nir: Validate that a block doesn't have two identical successors.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 3 Sep 2015 08:29:38 +0000 (01:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Sep 2015 17:59:59 +0000 (10:59 -0700)
commit6a67ede6b33cfb3bc35d09dcd25a731cba3b7780
tree8276e2c646199798d18fa60bab4985a34de3d1c1
parent8dcbca59572a856ca554af9ab3f52120b6f2a929
nir: Validate that a block doesn't have two identical successors.

This is invalid, and causes disasters if we try to unlink successors:
removing the first will work, but removing the second copy will fail
because the block isn't in the successor's predecessor set any longer.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/glsl/nir/nir_validate.c