Skip to content
Snippets Groups Projects
Commit 7b0067d2 authored by Dave Airlie's avatar Dave Airlie
Browse files

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: default avatarGlenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 036f434a
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment