zink: handle ntv case of nested loop instructions more permissively
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 10 Jun 2020 15:09:47 +0000 (11:09 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 13 Jul 2020 21:13:45 +0000 (21:13 +0000)
commit97ec109d8fa07c02531c9f54b7edf7085d6130bf
tree7d40e37f86bac7f41fae6241b8e53225dea7456e
parente40a77ea5d0ba77f44e9266b43c069d921aec30d
zink: handle ntv case of nested loop instructions more permissively

if the last instruction in a loop's body terminates a block, e.g., from
a nested loop with a jump as its final instruction, then no block will
have been started when returning to the original loop, and there's no need
to emit a branch

fixes shaders@glsl-vs-continue-in-switch-in-do-while

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5852>
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c