AMDGPU: Fix an interaction between WQM and polygon stippling
authorNicolai Haehnle <nhaehnle@gmail.com>
Sat, 3 Sep 2016 12:26:32 +0000 (12:26 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Sat, 3 Sep 2016 12:26:32 +0000 (12:26 +0000)
commita246dccc26667ab8bf6b6b427d1384bb65828509
tree60bbcd2916362880f1aca447c97d1b1e8067f387
parentff94d2506346200edf61dd21c8040831ac0539c0
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
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
llvm/test/CodeGen/AMDGPU/wqm.ll