nir: Strengthen "no jumps" assertions in instruction insertion API.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Aug 2015 00:30:08 +0000 (17:30 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 27 Aug 2015 20:36:57 +0000 (13:36 -0700)
commitc44d50775209266b5c8bad0ab7a7c4ccd7db14a4
treeb29c709806586fba2feff6e85a0744608e0e612a
parentbcae4640c89bc2775d1a85b2b27d2787cac8f843
nir: Strengthen "no jumps" assertions in instruction insertion API.

Jumps must be the last instruction in a block, so inserting another
instruction after a jump is illegal.

Previously, we only checked this when the new instruction being inserted
was a jump.  This is a red herring - inserting *any* kind of instruction
after a jump is illegal.

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