[PATCH] D63808: AMDGPU/GFX10: fix scratch resource descriptor
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 00:53:26 PDT 2019
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, rampitec, mareko.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.
The stride should depend on the wave size, not the hardware generation.
Also, the 32_FLOAT format is 0x16, not 16; though that shouldn't be
relevant.
Change-Id: I088f93bf6708974d085d1c50967f119061da6dc6
Repository:
rL LLVM
https://reviews.llvm.org/D63808
Files:
lib/Target/AMDGPU/SIInstrInfo.cpp
Index: lib/Target/AMDGPU/SIInstrInfo.cpp
===================================================================
--- lib/Target/AMDGPU/SIInstrInfo.cpp
+++ lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5542,7 +5542,7 @@
uint64_t SIInstrInfo::getDefaultRsrcDataFormat() const {
if (ST.getGeneration() >= AMDGPUSubtarget::GFX10) {
- return (16ULL << 44) | // IMG_FORMAT_32_FLOAT
+ return (22ULL << 44) | // IMG_FORMAT_32_FLOAT
(1ULL << 56) | // RESOURCE_LEVEL = 1
(3ULL << 60); // OOB_SELECT = 3
}
@@ -5574,7 +5574,7 @@
}
// IndexStride = 64 / 32.
- uint64_t IndexStride = ST.getGeneration() <= AMDGPUSubtarget::GFX9 ? 3 : 2;
+ uint64_t IndexStride = ST.getWavefrontSize() == 64 ? 3 : 2;
Rsrc23 |= IndexStride << AMDGPU::RSRC_INDEX_STRIDE_SHIFT;
// If TID_ENABLE is set, DATA_FORMAT specifies stride bits [14:17].
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63808.206604.patch
Type: text/x-patch
Size: 856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190626/78822240/attachment.bin>
More information about the llvm-commits
mailing list