aco: fix WQM handling in nested loops
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 17 Jun 2020 11:41:09 +0000 (12:41 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 13:40:15 +0000 (13:40 +0000)
commit3817fa7a4d1f51c385b28a2e45a1edf227526028
treec33f39835ae759acc2e7a944a22b319f60c24e2d
parent8ce8895b69a7523513eceed096233c3a348880a7
aco: fix WQM handling in nested loops

If on a nested loop
- the outer loop needs WQM but
- the inner loop doesn't need WQM and
- the break condition of the inner loop is computed in the outer loop
then it could happen that we transitioned to Exact before entering the inner loop
which could create an empty exec mask and lead to an infinite loop.

Fixes a GPU hang with RDR2

Cc: 20.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5518>
src/amd/compiler/aco_insert_exec_mask.cpp