This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Don't force WQM for DS op
ClosedPublic

Authored by tpr on Apr 25 2018, 3:23 AM.

Details

Summary

Previously, all DS ops forced WQM in a pixel shader. That was a hack to
allow for graphics frontends using ds_swizzle to implement explicit
derivatives, on SI/CI at least where DPP is not available. But it forced
WQM for _any_ DS op.

With this commit, DS ops no longer force WQM. Both graphics frontends
(Mesa and LLPC) need to change to issue an explicit llvm.amdgcn.wqm
intrinsic call when calculating explicit derivatives.

Diff Detail

Repository
rL LLVM

Event Timeline

tpr created this revision.Apr 25 2018, 3:23 AM

Not planning to land this until you have confirmed that Mesa is ready to cope with it Nicolai.

Thanks. I'll update here once I've finished all the testing.

arsenm added inline comments.Apr 27 2018, 8:31 AM
test/CodeGen/AMDGPU/multi-divergent-exit-region.ll
358 ↗(On Diff #143891)

Should this be upgraded to a GCN-NOT? (or insert a -NEXT)?

nhaehnle accepted this revision.May 4 2018, 2:05 AM

Should be good to go. Please add a reference to Mesa commit "amd/common: use llvm.amdgcn.wqm for explicit derivatives" to the commit message.

This revision is now accepted and ready to land.May 4 2018, 2:05 AM
tpr marked an inline comment as done.May 7 2018, 6:02 AM
This revision was automatically updated to reflect the committed changes.