9e625307d2
The value of STATE_PRIV is captured by the 1st level trap handler, and passed on to the second level trap handler. The value is to be restored before exit. However it is possible for the value of STATE_PRIV.BARRIER_COMPLETE to change while the wave is in the trap handler (all the other waves in the workgroup has signaled the work-gropu barrier), and in this case restoring STATE_PRIV in full would result in STATE_PRIV.BARRIER_COMPLETE to be cleared. Restore every bits of STATE_PRIV except for BARRIER_COMPLETE before return to prevent this race. Change-Id: I76c875bced7d23c58670b28f257d22c933f99fc5 Signed-off-by: Chris Freehill <cfreehil@amd.com>