[PATCH] D91086: AMDGPU: Document why we use (non-volatile) BUFFER_WBINVL1 in graphics

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 08:41:25 PST 2020


nhaehnle created this revision.
nhaehnle added reviewers: t-tye, arsenm, foad, mareko.
Herald added subscribers: kerbowa, hiraditya, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: LLVM.
nhaehnle requested review of this revision.
Herald added a subscriber: wdng.

Graphics never used volatile vs. non-volatile in anything even
approaching a principled way, and trying to fix all the drivers years
later is fraught with unnecessary risk.

Let's just document why things are the way they are and be done with it.

Change-Id: If937c95834b712da8561e262bc41c5669e45c78c


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91086

Files:
  llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp


Index: llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
+++ llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp
@@ -898,6 +898,9 @@
 
   const GCNSubtarget &STM = MBB.getParent()->getSubtarget<GCNSubtarget>();
 
+  // Graphics environments never added a principled use of volatile vs.
+  // non-volatile, and the default MTYPE in buffer descriptors is NC_NV
+  // (non-coherent, non-volatile), so a non-volatile wbinv is required.
   const unsigned InvalidateL1 = STM.isAmdPalOS() || STM.isMesa3DOS()
                                     ? AMDGPU::BUFFER_WBINVL1
                                     : AMDGPU::BUFFER_WBINVL1_VOL;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91086.303891.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201109/8315a101/attachment.bin>


More information about the llvm-commits mailing list