[llvm] r317754 - AMDGPU: Lower buffer store and atomic intrinsics manually

Marek Olšák via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 13:56:19 PST 2017


It appears to be caused by the GLSL compiler doing something weird
with gl_ClipDistance and this commit only uncovers the bug by giving
the instruction scheduler more freedom.

It looks like it's a read-after-write hazard in LDS. Setting
"volatile" on LDS loads and stores fixes it.

Marek

On Thu, Nov 9, 2017 at 4:49 PM, Michel Dänzer via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
> Hi Marek,
>
>
> On 09/11/17 02:52 AM, Marek Olsak via llvm-commits wrote:
>> Author: mareko
>> Date: Wed Nov  8 17:52:48 2017
>> New Revision: 317754
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=317754&view=rev
>> Log:
>> AMDGPU: Lower buffer store and atomic intrinsics manually
>
> This change broke piglit
> spec at arb_tessellation_shader@execution at tes-input@tes-input-gl_clipdistance
> on my Tonga:
>
> PIGLIT TEST: 61 - tes-input-gl_ClipDistance
> Probe color at (62,62)
>   Expected: 0.000000 1.000000 0.000000
>   Observed: 1.000000 0.000000 0.000000
> Test failure on line 184
> Probe color at (187,62)
>   Expected: 0.000000 1.000000 0.000000
>   Observed: 1.000000 0.000000 0.000000
> Test failure on line 185
> Probe color at (62,187)
>   Expected: 0.000000 1.000000 0.000000
>   Observed: 1.000000 0.000000 0.000000
> Test failure on line 186
> Probe color at (187,187)
>   Expected: 0.000000 1.000000 0.000000
>   Observed: 1.000000 0.000000 0.000000
> Test failure on line 187
>
> Note that it doesn't fail every time, but most of the time. Before this
> change, it always passed.
>
>
> I'm attaching a dump of the affected shader from before and after this
> change. Let me know if you need more information.
>
>
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>


More information about the llvm-commits mailing list