1243d575a5
Some GPU hangs witnessed in the wild on RDNA4 in Control and Arc Raiders seem to point towards closest-hit shaders reading a stale value for the SGPR pair containing the currently-executing shader's address. This SGPR pair was read by VALU in the preceding traversal shader, making it susceptible to VALUReadSGPRHazard. Inserting VALUReadSGPRHazard mitigations before accessing the s_setpc target seems to fix the hang. We don't have conclusive proof that this is hazardous, but given that all signs point towards it and we have a reasonably simple workaround, let's roll with this for now to mitigate the hangs. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38290>