Created attachment 140941 [details] Probably affected compute shader Hello, a regression that affects OpControlBarrier instructions in compute shaders causes major rendering issues in Final Fantasy XV. The attached shader seems to be the one running into this issue. In short, DXVK translates sync_g_t instructions to the following: OpControlBarrier Workgroup, Workgroup, WorkgroupMemory | AcquireRelease This currently does not work as expected. Interestingly, inserting an additional OpMemoryBarrier seems to fix the problem: OpMemoryBarrier Workgroup, WorkgroupMemory | AcquireRelease OpControlBarrier Workgroup, Workgroup, WorkgroupMemory | AcquireRelease While this is closer to what glslang emits for equivalent GLSL barriers, emitting the extra OpMemoryBarrier instruction should not be necessary according to the SPIR-V spec for OpControlBarrier. The commit which introduced the problem is: [f2b3e96e754a5d722f2b0fa1bd5efa1c0640ed3b] radv: drop copy of ac_create_target_machine. Looking at the difference between the two implementations, there's the following line in ac_create_target_machine: bool barrier_does_waitcnt = family != CHIP_VEGA20; Changing this to 'false' fixes the problem for me. My GPU is an RX 480 (Polaris 10). Unfortunately it is quite hard to isolate the exact issue in the game, a renderdoc capture was not useful because the bug got baked into it for some reason, so here's a D3D11 apitrace that needs to be replayed with DXVK in order to reproduce the bug. https://drive.google.com/file/d/1ywMEhn-P68Sino1_5yBkceLcMACTtDAI/view?usp=sharing
Can you upload a screenshot of the rendering issue, please?
Created attachment 141081 [details] Screenshot that shows the issue Here's a screenshot. Basically, the water geometry is extremely messed up and the game renders randomly flickering garbage. Please note that I implemented the OpMemoryBarrier workaround in DXVK 0.64, so this can only be reproduced with 0.63.
I can confirm the issue with DXVK 0.63 on my RX480, as well as the potential fix. Though, the attached compute shader doesn't seem to be affected. I have to find the good one first. I will let you know.
Should be fixed with https://cgit.freedesktop.org/mesa/mesa/commit/?id=71d5b2fbf83061a1319141d26942771e8c75ff2b
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.