aco: fix a hazard with v_interp_* and v_{read,readfirst}lane_* on GFX6
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 21 Jan 2020 15:49:22 +0000 (16:49 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Jan 2020 18:34:27 +0000 (18:34 +0000)
commit1ac49ba908acf70a8ae4aad71dc715bf625aea1e
tree8881182bad162dbe6bd4bb766e8eadc21d1b9a06
parentb9cc50fbce4c5aeab035d855c9368e24e2ed2d20
aco: fix a hazard with v_interp_* and v_{read,readfirst}lane_* on GFX6

It's required to insert 1 wait state if the dst VGPR of any v_interp_*
is followed by a read with v_readfirstlane or v_readlane to fix GPU
hangs on GFX6. Note that v_writelane_* is apparently not affected.
This hazard isn't documented anywhere but AMD confirmed it.

This fixes a GPU hang with the texturemipmapgen Sascha demo on GFX6.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3533>
src/amd/compiler/README.md
src/amd/compiler/aco_insert_NOPs.cpp