Skip to content

Commit a2fb4da

Browse files
fix: correct fallback path when creating topology map in Wddm
Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 789a008 commit a2fb4da

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

shared/source/os_interface/windows/wddm/wddm.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ bool Wddm::translateTopologyInfo(TopologyMapping &mapping) {
206206

207207
// subSliceIndex is used to track the index number of subslices from all SS or DSS in this slice
208208
int subSliceIndex = -1;
209+
bool dssEnabled = false;
209210
for (uint32_t dss = 0; dss < GT_MAX_DUALSUBSLICE_PER_SLICE; dss++) {
210211
if (!gtSystemInfo.SliceInfo[x].DSSInfo[dss].Enabled) {
211212
subSliceIndex += 2;
@@ -217,14 +218,16 @@ bool Wddm::translateTopologyInfo(TopologyMapping &mapping) {
217218
if (!gtSystemInfo.SliceInfo[x].DSSInfo[dss].SubSlice[y].Enabled) {
218219
continue;
219220
}
221+
dssEnabled = true;
220222
subSliceCount++;
221223
subSliceIndices.push_back(subSliceIndex);
222224

223225
euCount += gtSystemInfo.SliceInfo[x].DSSInfo[dss].SubSlice[y].EuEnabledCount;
224226
}
225227
}
226228

227-
if (subSliceCount == 0) {
229+
if (!dssEnabled) {
230+
subSliceIndex = -1;
228231
for (uint32_t sss = 0; sss < GT_MAX_SUBSLICE_PER_SLICE; sss++) {
229232
subSliceIndex++;
230233
if (!gtSystemInfo.SliceInfo[x].SubSliceInfo[sss].Enabled) {

shared/test/unit_test/os_interface/windows/wddm_tests.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,8 @@ TEST_F(WddmTests, GivenOnlySubsliceEnabledWhenQueryingTopologyThenExpectTrue) {
453453
EXPECT_EQ(topologyMap.at(0).sliceIndices.size(), 1u);
454454
EXPECT_EQ(topologyMap.at(0).sliceIndices[0], 0);
455455
EXPECT_EQ(topologyMap.at(0).subsliceIndices.size(), 2u);
456-
const auto base = 2 * GT_MAX_DUALSUBSLICE_PER_SLICE;
457-
EXPECT_EQ(topologyMap.at(0).subsliceIndices[0], base + 1);
458-
EXPECT_EQ(topologyMap.at(0).subsliceIndices[1], base + 3);
456+
EXPECT_EQ(topologyMap.at(0).subsliceIndices[0], 1);
457+
EXPECT_EQ(topologyMap.at(0).subsliceIndices[1], 3);
459458
}
460459

461460
TEST_F(WddmTests, GivenBothSublicesAndDualSubslicesEnabledWhenQueryingTopologyThenOnlyDSSInfoCounted) {

0 commit comments

Comments
 (0)