[PATCH] D34847: [AMDGPU] Mark all export instructions as DisableWQM

Connor Abbott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 29 19:51:46 PDT 2017


cwabbott added a comment.

In https://reviews.llvm.org/D34847#796305, @michel.daenzer wrote:

> This isn't necessary. Exports can't enable pixels that weren't enabled in the first place.


How sure are you? I haven't found anything in the publically available documentation that would support this assertion, and experimentally it seems this isn't true. This patch (combined with https://reviews.llvm.org/D34847) fixes a fragment shader AMD_shader_ballot test I wrote. The test does addInvocationsNonUniform(1) and then compares the result with the number of active threads with ID less than or equal to the current thread in the subgroup. Due to the way addInvocationsNonUniform is implemented, inactive lanes should return the result of the closest active lane with a smaller thread ID, so the inactive lanes should have a result smaller than the test would expect (but that's ok, because they're inactive!). I wrote the test to report the expected and actual value for each thread that failed, so you would expect any inactive lanes that were accidentally written due to WWM staying enabled would result in pixels with the actual smaller than expected, which is exactly what happened without this patch. With this patch, the test was fixed.


https://reviews.llvm.org/D34847





More information about the llvm-commits mailing list