ac/nir: Avoid data race with task shader payloads.
Device memory scope is necessary because we need to ensure there is always a waitcnt_vscnt instruction in order to avoid a race condition between payload stores and their loads after mesh shaders launch.
This fixes CTS test flakes on dEQP-VK.mesh_shader.ext.api.*
which can be reproduced running these tests in parallel (using deqp-runner
) repeatedly. About 1 run out of 100 a flake would occur without this patch.
Edited by Timur Kristóf