Skip to content
Commit 0f7b29aa authored by Samuel Pitoiset's avatar Samuel Pitoiset Committed by Juan A. Suarez Romero
Browse files

spirv: fix visiting inner loops with same break/continue block

We should stop walking through the CFG when the inner loop's
break block ends up as the same block as the outer loop's
continue block because we are already going to visit it.

This fixes the following assertion which ends up by crashing
in RADV or ANV:

SPIR-V parsing FAILED:
In file ../src/compiler/spirv/vtn_cfg.c:381
block->node.link.next == NULL
0 bytes into the SPIR-V binary

This also fixes a crash with a camera shader from SteamVR.

v2: make use of vtn_get_branch_type() and add an assertion

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106090
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106504


CC: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
Signed-off-by: default avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 6bde8c56)
parent 69ef6e4a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment