[PATCH] D152247: [AMDGPU] New PAL metadata updates to ps_extra_lds_size and float_mode

David Stuttard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 04:49:30 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6d5a653dda62: [AMDGPU] New PAL metadata updates to ps_extra_lds_size and float_mode (authored by dstuttard).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152247/new/

https://reviews.llvm.org/D152247

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


Index: llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -1045,10 +1045,6 @@
         MD->setRsrc2(CC, S_00B84C_SCRATCH_EN(1));
     }
   } else {
-    // Priority?
-    MD->setHwStage(CC, ".float_mode", CurrentProgramInfo.FloatMode);
-    // Priv?
-    // DX10Clamp?
     MD->setHwStage(CC, ".debug_mode", (bool)CurrentProgramInfo.DebugMode);
     MD->setHwStage(CC, ".ieee_mode", (bool)CurrentProgramInfo.IEEEMode);
     MD->setHwStage(CC, ".wgp_mode", (bool)CurrentProgramInfo.WgpMode);
@@ -1082,7 +1078,12 @@
       MD->setSpiPsInputAddr(MFI->getPSInputAddr());
     } else {
       // Graphics registers
-      MD->setGraphicsRegisters(".ps_extra_lds_size", ExtraLDSSize);
+      const unsigned ExtraLdsDwGranularity =
+          STM.getGeneration() >= AMDGPUSubtarget::GFX11 ? 256 : 128;
+      MD->setGraphicsRegisters(
+          ".ps_extra_lds_size",
+          (unsigned)(ExtraLDSSize * ExtraLdsDwGranularity * sizeof(uint32_t)));
+
       // Set PsInputEna and PsInputAddr .spi_ps_input_ena and .spi_ps_input_addr
       static StringLiteral const PsInputFields[] = {
           ".persp_sample_ena",    ".persp_center_ena",


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152247.528798.patch
Type: text/x-patch
Size: 1296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230606/352e3ba4/attachment.bin>


More information about the llvm-commits mailing list