Skip to content

Commit ec7821e

Browse files
performance: configure Xe2 compression
Related-To: NEO-9421 Signed-off-by: Tomasz Biernacik <[email protected]>
1 parent 2b7e92b commit ec7821e

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

shared/source/os_interface/windows/product_helper_wddm.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2024 Intel Corporation
2+
* Copyright (C) 2020-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -9,6 +9,7 @@
99
#include "shared/source/execution_environment/root_device_environment.h"
1010
#include "shared/source/helpers/hw_info.h"
1111
#include "shared/source/os_interface/product_helper.h"
12+
#include "shared/source/release_helper/release_helper.h"
1213

1314
#include "hw_cmds.h"
1415

@@ -18,6 +19,10 @@ int ProductHelper::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInf
1819
outHwInfo->capabilityTable.ftrSvm = outHwInfo->featureTable.flags.ftrSVM;
1920
this->setCapabilityCoherencyFlag(*outHwInfo, outHwInfo->capabilityTable.ftrSupportsCoherency);
2021
outHwInfo->capabilityTable.ftrSupportsCoherency &= inHwInfo->featureTable.flags.ftrL3IACoherency;
22+
auto releaseHelper = rootDeviceEnvironment.getReleaseHelper();
23+
if (releaseHelper) {
24+
outHwInfo->featureTable.flags.ftrXe2Compression = releaseHelper->getFtrXe2Compression();
25+
}
2126

2227
setupDefaultEngineType(*outHwInfo, rootDeviceEnvironment);
2328
setupPreemptionMode(*outHwInfo, rootDeviceEnvironment, true);

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018-2024 Intel Corporation
2+
* Copyright (C) 2018-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -12,6 +12,7 @@
1212
#include "shared/source/os_interface/os_interface.h"
1313
#include "shared/source/os_interface/product_helper.h"
1414
#include "shared/source/os_interface/windows/wddm/wddm.h"
15+
#include "shared/source/release_helper/release_helper.h"
1516
#include "shared/test/common/helpers/debug_manager_state_restore.h"
1617
#include "shared/test/common/mocks/mock_execution_environment.h"
1718
#include "shared/test/common/test_macros/hw_test.h"
@@ -65,6 +66,23 @@ TEST_F(ProductHelperTestWindows, givenCorrectParametersWhenConfiguringHwInfoThen
6566
EXPECT_EQ(outHwInfo.capabilityTable.ftrSvm, ftrSvm);
6667
}
6768

69+
TEST_F(ProductHelperTestWindows, givenCorrectParametersWhenConfiguringHwInfoThenSetXe2CompressionCorrectly) {
70+
71+
auto releaseHelper = rootDeviceEnvironment->getReleaseHelper();
72+
if (releaseHelper) {
73+
outHwInfo.featureTable.flags.ftrXe2Compression = !releaseHelper->getFtrXe2Compression();
74+
}
75+
76+
int ret = productHelper->configureHwInfoWddm(&pInHwInfo, &outHwInfo, *rootDeviceEnvironment.get());
77+
ASSERT_EQ(0, ret);
78+
79+
if (releaseHelper) {
80+
EXPECT_EQ(releaseHelper->getFtrXe2Compression(), outHwInfo.featureTable.flags.ftrXe2Compression);
81+
} else {
82+
EXPECT_EQ(false, outHwInfo.featureTable.flags.ftrXe2Compression);
83+
}
84+
}
85+
6886
TEST_F(ProductHelperTestWindows, givenInstrumentationForHardwareIsEnabledOrDisabledWhenConfiguringHwInfoThenOverrideItUsingHaveInstrumentation) {
6987
int ret;
7088

0 commit comments

Comments
 (0)