as stated in the title, when building mesa (both latest -git and 18.2.3) against LLVM 8, Lighting in Mass Effect Andromeda is broken; there are blocky artifacts. Applying https://reviews.llvm.org/D53359 does not solve the issue.
This renderdoc capture shows the problem, recorded with Renderdoc 1.1 (stable) on Polaris:
With LLVM 7, everything renders correctly.
Created attachment 142301 [details]
Screenshot with broken rendering
Created attachment 142302 [details]
Screenshot with correct rendering
Introduced by the following LLVM commit:
cc436fd26637b0629b95fd8e60fde61cec4b421f is the first bad commit
Author: Nicolai Haehnle <firstname.lastname@example.org>
Date: Wed Oct 17 15:37:30 2018 +0000
AMDGPU: Divergence-driven selection of scalar buffer load intrinsics
Moving SMRD to VMEM in SIFixSGPRCopies is rather bad for performance if
the load is really uniform. So select the scalar load intrinsics directly
to either VMEM or SMRD buffer loads based on divergence analysis.
If an offset happens to end up in a VGPR -- either because a floating
point calculation was involved, or due to other remaining deficiencies
in SIFixSGPRCopies -- we use v_readfirstlane.
There is some unrelated churn in tests since we now select MUBUF offsets
in a unified way with non-scalar buffer loads.
Reviewers: arsenm, alex-t, rampitec, tpr
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, t-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D53283
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344696 91177308-0d34-0410-b5e6-96231b3b80d8
Same problem in another Frostbite-source title - NFS Payback.
I can reproduce this based on the RenderDoc trace and will investigate.
I'm reverting the commit to LLVM for now. The change exposed a bug in how divergence analysis info is passed through code generation, and it looks like I will have to touch common code to fix that bug.