pan/va: Terminate helper threads
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 31 May 2022 19:12:13 +0000 (15:12 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 1 Jun 2022 16:14:38 +0000 (16:14 +0000)
commit03d8439c0aa6b57e3de85d0969204cab76a51d3e
tree95ff8db107d7c6492a2d4c6e588949baa296a5b3
parent41b39d6d5d80e549733985775d07492b6bd34a51
pan/va: Terminate helper threads

On Bifrost, to terminate helper threads we set the td bit on the clause. On
Valhall, we need to use the .discard flow control. Extend the flow control NOP
insertion to insert NOP.discard where necessary to terminate helper threads.
This should reduce wasted work in fragment shaders.

This requires fairly involved data flow analysis, but the handling here should
be optimal.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16804>
src/panfrost/bifrost/valhall/va_insert_flow.c