Skip to content

Commit b8d7d1f

Browse files
JaroszPiotrigcbot
authored andcommitted
Restore Subslice count calculation for Xe3
The number of SubSlices for given platform should be taken from MaxSubSlicesSupported, not from the number of enabled SubSlices. For fused configurations the indices of SubSlices are based on the number of SubSlices before fusing. Therefore we need to allocate the stack as if the platform was not fused.
1 parent bbb2707 commit b8d7d1f

File tree

2 files changed

+3
-35
lines changed

2 files changed

+3
-35
lines changed

IGC/AdaptorCommon/RayTracing/RTBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ std::pair<uint32_t, uint32_t> RTBuilder::getDualSubsliceIDBitsInSR0() const {
12331233
// globalDSSID is the combined value of sliceID and dssID on slice.
12341234
Value* RTBuilder::getGlobalDSSID()
12351235
{
1236-
if (isChildOfXe2)
1236+
if (Ctx.platform.isCoreChildOf(IGFX_XE2_HPG_CORE))
12371237
{
12381238
if (Ctx.platform.supportsWMTPForShaderType(Ctx.type))
12391239
{
@@ -1252,7 +1252,7 @@ Value* RTBuilder::getGlobalDSSID()
12521252
{
12531253
return emitStateRegID(dssIDBits.first, sliceIDBits.second);
12541254
}
1255-
else if (isChildOfXe3)
1255+
else if (Ctx.platform.isCoreChildOf(IGFX_XE3_CORE))
12561256
{
12571257
Value* sliceID = emitStateRegID(sliceIDBits.first, sliceIDBits.second);
12581258
Value* dssID = emitStateRegID(dssIDBits.first, dssIDBits.second);

IGC/AdaptorCommon/RayTracing/RTBuilder.h

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ class RTBuilder : public IGCIRBuilder<>
5858
static constexpr char *PrintfFuncName = "printf";
5959

6060

61-
bool isChildOfXe2 = false;
62-
bool isChildOfXe3 = false;
63-
6461
// Field for explicit GlobalBufferPtr - used on OpenCL path.
6562
Value* GlobalBufferPtr = nullptr;
6663
bool DisableRTGlobalsKnownValues = false;
@@ -76,37 +73,8 @@ class RTBuilder : public IGCIRBuilder<>
7673
enabledSlices++;
7774
}
7875
}
79-
isChildOfXe3 = Ctx.platform.isCoreChildOf(IGFX_XE3_CORE);
80-
isChildOfXe2 = Ctx.platform.isCoreChildOf(IGFX_XE2_HPG_CORE);
81-
82-
if (isChildOfXe3)
83-
{
84-
EuCountPerDSS = SysInfo.MaxEuPerSubSlice;
85-
MaxDualSubSlicesSupported = 0;
86-
87-
IGC_ASSERT(NumDSSPerSlice <= GT_MAX_SUBSLICE_PER_SLICE);
8876

89-
for (unsigned int sliceID = 0; sliceID < GT_MAX_SLICE; ++sliceID)
90-
{
91-
if (SysInfo.SliceInfo[sliceID].Enabled)
92-
{
93-
NumDSSPerSlice = SysInfo.SliceInfo[sliceID].SubSliceEnabledCount;
94-
95-
// SubSliceInfo size is GT_MAX_SUBSLICE_PER_SLICE, but
96-
// actual number, calculated for given platform, of SubSlices is used
97-
// to iterate only through SubSlices present on the platform.
98-
for (unsigned int ssID = 0; ssID < NumDSSPerSlice; ++ssID)
99-
{
100-
if (SysInfo.SliceInfo[sliceID].SubSliceInfo[ssID].Enabled)
101-
{
102-
MaxDualSubSlicesSupported = std::max(MaxDualSubSlicesSupported, (sliceID * NumDSSPerSlice) + ssID + 1);
103-
}
104-
}
105-
}
106-
}
107-
}
108-
else // this will chain into if from Xe2 branch forming else if
109-
if (isChildOfXe2 || Ctx.platform.isProductChildOf(IGFX_PVC))
77+
if (Ctx.platform.isCoreChildOf(IGFX_XE2_HPG_CORE) || Ctx.platform.isProductChildOf(IGFX_PVC))
11078
{
11179
NumDSSPerSlice = SysInfo.MaxSubSlicesSupported / std::max(SysInfo.MaxSlicesSupported, enabledSlices);
11280
EuCountPerDSS = SysInfo.MaxEuPerSubSlice;

0 commit comments

Comments
 (0)