[Mesa-dev] [Bug 107460] radv: OpControlBarrier does not always work correctly (bisected)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Aug 2 20:04:14 UTC 2018


            Bug ID: 107460
           Summary: radv: OpControlBarrier does not always work correctly
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Vulkan/radeon
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: philip.rebohle at tu-dortmund.de
        QA Contact: mesa-dev at lists.freedesktop.org

Created attachment 140941
  --> https://bugs.freedesktop.org/attachment.cgi?id=140941&action=edit
Probably affected compute shader


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:

    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

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.


You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180802/b7fe2fbc/attachment.html>

More information about the mesa-dev mailing list