diff options
| author | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-09-03 12:26:32 +0000 |
|---|---|---|
| committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2016-09-03 12:26:32 +0000 |
| commit | a246dccc26667ab8bf6b6b427d1384bb65828509 (patch) | |
| tree | 60bbcd2916362880f1aca447c97d1b1e8067f387 /llvm/lib | |
| parent | ff94d2506346200edf61dd21c8040831ac0539c0 (diff) | |
| download | bcm5719-llvm-a246dccc26667ab8bf6b6b427d1384bb65828509.tar.gz bcm5719-llvm-a246dccc26667ab8bf6b6b427d1384bb65828509.zip | |
AMDGPU: Fix an interaction between WQM and polygon stippling
Summary:
This fixes a rare bug in polygon stippling with non-monolithic pixel shaders.
The underlying problem is as follows: the prolog part contains the polygon
stippling sequence, i.e. a kill. The main part then enables WQM based on the
_reduced_ exec mask, effectively undoing most of the polygon stippling.
Since we cannot know whether polygon stippling will be used, the main part
of a non-monolithic shader must always return to exact mode to fix this
problem.
Reviewers: arsenm, tstellarAMD, mareko
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D23131
llvm-svn: 280589
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstructions.td | 1 | ||||
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td index 9eb7a503a7c..60a571d51bf 100644 --- a/llvm/lib/Target/AMDGPU/SIInstructions.td +++ b/llvm/lib/Target/AMDGPU/SIInstructions.td @@ -1301,6 +1301,7 @@ def SI_RETURN : SPseudoInstSI < let isReturn = 1; let hasSideEffects = 1; let hasNoSchedulingInfo = 1; + let DisableWQM = 1; } let Defs = [M0, EXEC], diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp index c8bfc5aa460..03efd1f3326 100644 --- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp +++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp @@ -219,13 +219,6 @@ char SIWholeQuadMode::scanInstructions(MachineFunction &MF, markInstruction(MI, Flags, Worklist); GlobalFlags |= Flags; } - - if (WQMOutputs && MBB.succ_empty()) { - // This is a prolog shader. Make sure we go back to exact mode at the end. - Blocks[&MBB].OutNeeds = StateExact; - Worklist.push_back(&MBB); - GlobalFlags |= StateExact; - } } return GlobalFlags; |

