Skip to content

Commit 2eae53f

Browse files
skarczewigcbot
authored andcommitted
Increase pushed input limits
VRT allows us to have more GRFs per thread, we can utilize this by increasing the limit of pushed inputs.
1 parent 29e99d8 commit 2eae53f

File tree

2 files changed

+21
-24
lines changed

2 files changed

+21
-24
lines changed

IGC/Compiler/CISACodeGen/PushAnalysis.cpp

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,6 @@ namespace IGC
7373

7474
const uint32_t PushAnalysis::MaxConstantBufferIndexSize = 256;
7575

76-
/// The maximum number of input attributes that will be pushed as part of the payload.
77-
/// One attribute is 4 dwords, so e.g. 16 means we allocate max 64 GRFs for input payload.
78-
const uint32_t PushAnalysis::MaxNumOfPushedInputs = 24;
79-
80-
/// The size occupied by the tessellation header in dwords
81-
const uint32_t PushAnalysis::TessFactorsURBHeader = 8;
82-
83-
/// Maximum number of attributes pushed
84-
const uint32_t PushAnalysis::m_pMaxNumOfVSPushedInputs = 24;
85-
86-
const uint32_t PushAnalysis::m_pMaxNumOfHSPushedInputs = 24;
87-
88-
const uint32_t PushAnalysis::m_pMaxNumOfDSPushedInputs = 24;
89-
90-
const uint32_t PushAnalysis::m_pMaxNumOfGSPushedInputs = 24;
91-
9276
template < typename T > std::string to_string(const T& n)
9377
{
9478
std::ostringstream stm;
@@ -1022,7 +1006,11 @@ namespace IGC
10221006
[](inputPairType a, inputPairType b) { return a.second.index < b.second.index; });
10231007
largestIndex = largestPair != inputs.end() ? largestPair->second.index : 0;
10241008
}
1025-
const unsigned int maxPushedGRFs = 96;
1009+
unsigned int maxPushedGRFs = 96;
1010+
if (m_context->platform.isCoreChildOf(IGFX_XE3_CORE))
1011+
{
1012+
maxPushedGRFs *= 2;
1013+
}
10261014
if (largestIndex >= maxPushedGRFs)
10271015
{
10281016
return;
@@ -1620,6 +1608,19 @@ namespace IGC
16201608
m_pullConstantHeuristics = &getAnalysis<PullConstantHeuristics>();
16211609
m_context = getAnalysis<CodeGenContextWrapper>().getCodeGenContext();
16221610

1611+
if (m_context->platform.isCoreChildOf(IGFX_XE3_CORE))
1612+
{
1613+
MaxNumOfPushedInputs = 24 * 2;
1614+
m_pMaxNumOfVSPushedInputs = 24 * 2;
1615+
m_pMaxNumOfDSPushedInputs = 24 * 2;
1616+
}
1617+
else
1618+
{
1619+
MaxNumOfPushedInputs = 24;
1620+
m_pMaxNumOfVSPushedInputs = 24;
1621+
m_pMaxNumOfDSPushedInputs = 24;
1622+
}
1623+
16231624
MapList<Function*, Function*> funcsMapping;
16241625
bool retValue = false;
16251626

IGC/Compiler/CISACodeGen/PushAnalysis.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,9 @@ namespace IGC
3131
{
3232
const llvm::DataLayout* m_DL;
3333
static const uint32_t MaxConstantBufferIndexSize;
34-
static const uint32_t MaxNumOfPushedInputs;
35-
static const uint32_t TessFactorsURBHeader;
36-
static const uint32_t HSEightPatchMaxNumOfPushedControlPoints;
37-
static const uint32_t m_pMaxNumOfVSPushedInputs;
38-
static const uint32_t m_pMaxNumOfHSPushedInputs;
39-
static const uint32_t m_pMaxNumOfDSPushedInputs;
40-
static const uint32_t m_pMaxNumOfGSPushedInputs;
34+
uint32_t MaxNumOfPushedInputs;
35+
uint32_t m_pMaxNumOfVSPushedInputs;
36+
uint32_t m_pMaxNumOfDSPushedInputs;
4137

4238
bool m_funcTypeChanged;
4339
std::map <llvm::Function*, bool> m_isFuncTypeChanged;

0 commit comments

Comments
 (0)