r300: fix reader detection with breaks
authorPavel Ondračka <pavel.ondracka@gmail.com>
Tue, 20 Sep 2022 14:55:52 +0000 (16:55 +0200)
committerPavel Ondračka <pavel.ondracka@gmail.com>
Mon, 3 Oct 2022 06:49:37 +0000 (08:49 +0200)
commitd1dbf6fe7ed0ba1a8e7c387db178b5ae737affb9
tree4e404f1565fa968a8298917249d40e8d1e100d50
parentff933485b7e328c5041050d5e41a2dd28a032a92
r300: fix reader detection with breaks

We were previously ignoring the breaks completelly. This patch
is heavily based on analysis and draft patch from Filip Gawin.

It mostly mirrors the current behavior for ENDIF with minor
differences. If the reader is in a branch leading directly to BRK,
we set the AbortOnRead mask as when encountering ENDIF but jump to
the ENDLOOP. If the reader was before the branch, we save the
AbortOnRead mask as if in normal branch handling and restore it
at the end of the loop.

Besides the single dEQP fix, this also fixes one more dEQP and few
piglits when the loop unrolling is disabled.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7249

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18900>
src/gallium/drivers/r300/ci/r300-rv515-fails.txt
src/gallium/drivers/r300/compiler/radeon_dataflow.c