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>