r600g/sb: fix issues cause by GLSL switching to loops for switch
Since 73dd50ac glsl: implement switch flow control using a loop The SB backend was falling over in an assert or crashing. Tracked this down to the loops having no repeats, but requiring a working break, initial code just called the loop handler for all non-if statements, but this caused a regression in tests/shaders/dead-code-break-interaction.shader_test. So I had to add further code to detect if all the departure nodes are empty and avoid generating an empty loop for that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86089 Cc: "10.4" <mesa-stable@lists.freedesktop.org> Reviewed-By:Glenn Kennard <glenn.kennard@gmail.com> Signed-off-by:
Dave Airlie <airlied@redhat.com>