Skip to content

Commit a9961bd

Browse files
fix: do not forbid compression for xe_lpg Windows and DG2
Related-To: NEO-14583, NEO-14593 Signed-off-by: Jaroslaw Warchulski <[email protected]> Source: fb5da0c
1 parent ad9349e commit a9961bd

13 files changed

+79
-60
lines changed

shared/source/xe_hpg_core/dg2/os_agnostic_product_helper_dg2.inl

+5
Original file line numberDiff line numberDiff line change
@@ -244,4 +244,9 @@ uint64_t ProductHelperHw<gfxProduct>::getHostMemCapabilitiesValue() const {
244244
return (UnifiedSharedMemoryFlags::access);
245245
}
246246

247+
template <>
248+
bool ProductHelperHw<gfxProduct>::isCompressionForbidden(const HardwareInfo &hwInfo) const {
249+
return isCompressionForbiddenCommon(false);
250+
}
251+
247252
} // namespace NEO
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2023-2024 Intel Corporation
2+
* Copyright (C) 2023-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8-
#include "shared/source/os_interface/product_helper.h"
8+
#include "shared/source/os_interface/product_helper_hw.h"
99

1010
namespace NEO {
1111

@@ -14,4 +14,9 @@ bool ProductHelperHw<gfxProduct>::isStagingBuffersEnabled() const {
1414
return true;
1515
}
1616

17+
template <>
18+
bool ProductHelperHw<gfxProduct>::isCompressionForbidden(const HardwareInfo &hwInfo) const {
19+
return isCompressionForbiddenCommon(false);
20+
}
21+
1722
} // namespace NEO

shared/test/unit_test/gen12lp/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2021-2023 Intel Corporation
2+
# Copyright (C) 2021-2025 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -16,6 +16,7 @@ if(TESTS_GEN12LP)
1616
${CMAKE_CURRENT_SOURCE_DIR}/gen12lp_shared_tests_wrapper.cpp
1717
${CMAKE_CURRENT_SOURCE_DIR}/hw_cmds_gen12lp_tests.cpp
1818
${CMAKE_CURRENT_SOURCE_DIR}/image_surface_state_tests_gen12lp.cpp
19+
${CMAKE_CURRENT_SOURCE_DIR}/os_agnostic_product_helper_tests_gen12lp.cpp
1920
${CMAKE_CURRENT_SOURCE_DIR}/simd_helper_tests_gen12lp.cpp
2021
${CMAKE_CURRENT_SOURCE_DIR}/tbx_command_stream_receiver_tests_gen12lp.inl
2122
${CMAKE_CURRENT_SOURCE_DIR}/test_command_encoder_gen12lp.cpp

shared/test/unit_test/gen12lp/linux/product_helper_tests_gen12lp.cpp renamed to shared/test/unit_test/gen12lp/os_agnostic_product_helper_tests_gen12lp.cpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
/*
2-
* Copyright (C) 2021-2023 Intel Corporation
2+
* Copyright (C) 2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8-
#include "shared/source/helpers/gfx_core_helper.h"
9-
#include "shared/source/os_interface/os_interface.h"
10-
#include "shared/test/common/helpers/debug_manager_state_restore.h"
11-
#include "shared/test/common/helpers/default_hw_info.h"
8+
#include "shared/source/gen12lp/hw_info_gen12lp.h"
9+
#include "shared/source/os_interface/product_helper.h"
1210
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
13-
#include "shared/test/unit_test/os_interface/linux/product_helper_linux_tests.h"
14-
15-
#include "hw_cmds.h"
11+
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
1612

1713
using namespace NEO;
1814

19-
using Gen12lpProductHelperLinux = ProductHelperTestLinux;
15+
using Gen12lpProductHelper = ProductHelperTest;
2016

21-
GEN12LPTEST_F(Gen12lpProductHelperLinux, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
17+
GEN12LPTEST_F(Gen12lpProductHelper, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
2218

2319
PLATFORM *testPlatform = &outHwInfo.platform;
2420
testPlatform->eDisplayCoreFamily = IGFX_GEN11_CORE;
@@ -29,7 +25,7 @@ GEN12LPTEST_F(Gen12lpProductHelperLinux, givenGen12LpProductWhenAdjustPlatformFo
2925
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily);
3026
}
3127

32-
GEN12LPTEST_F(Gen12lpProductHelperLinux, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
28+
GEN12LPTEST_F(Gen12lpProductHelper, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
3329

3430
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
3531
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
@@ -47,3 +43,8 @@ GEN12LPTEST_F(Gen12lpProductHelperLinux, givenCompressionFtrEnabledWhenAskingFor
4743
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
4844
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
4945
}
46+
47+
GEN12LPTEST_F(Gen12lpProductHelper, givenProductHelperThenCompressionIsForbidden) {
48+
auto hwInfo = *defaultHwInfo;
49+
EXPECT_TRUE(productHelper->isCompressionForbidden(hwInfo));
50+
}

shared/test/unit_test/gen12lp/windows/product_helper_tests_gen12lp.cpp

-30
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,6 @@ using namespace NEO;
1414

1515
using Gen12lpProductHelperWindows = ProductHelperTestWindows;
1616

17-
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenGen12LpProductWhenAdjustPlatformForProductFamilyCalledThenOverrideWithCorrectFamily) {
18-
19-
PLATFORM *testPlatform = &outHwInfo.platform;
20-
testPlatform->eDisplayCoreFamily = IGFX_GEN11_CORE;
21-
testPlatform->eRenderCoreFamily = IGFX_GEN11_CORE;
22-
productHelper->adjustPlatformForProductFamily(&outHwInfo);
23-
24-
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eRenderCoreFamily);
25-
EXPECT_EQ(IGFX_GEN12LP_CORE, testPlatform->eDisplayCoreFamily);
26-
}
27-
28-
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenCompressionFtrEnabledWhenAskingForPageTableManagerThenReturnCorrectValue) {
29-
30-
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
31-
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
32-
EXPECT_FALSE(productHelper->isPageTableManagerSupported(outHwInfo));
33-
34-
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
35-
outHwInfo.capabilityTable.ftrRenderCompressedImages = false;
36-
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
37-
38-
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = false;
39-
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
40-
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
41-
42-
outHwInfo.capabilityTable.ftrRenderCompressedBuffers = true;
43-
outHwInfo.capabilityTable.ftrRenderCompressedImages = true;
44-
EXPECT_TRUE(productHelper->isPageTableManagerSupported(outHwInfo));
45-
}
46-
4717
GEN12LPTEST_F(Gen12lpProductHelperWindows, givenGen12LpSkuWhenGettingCapabilityCoherencyFlagThenExpectValidValue) {
4818
bool coherency = false;
4919
productHelper->setCapabilityCoherencyFlag(outHwInfo, coherency);

shared/test/unit_test/os_interface/product_helper_tests.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -1156,11 +1156,6 @@ HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckingIsCompressionForbidden
11561156
EXPECT_FALSE(productHelper->isCompressionForbidden(hwInfo));
11571157
}
11581158

1159-
HWTEST2_F(ProductHelperTest, givenProductHelperThenCompressionIsForbidden, IsBeforeXe2HpgCore) {
1160-
auto hwInfo = *defaultHwInfo;
1161-
EXPECT_TRUE(productHelper->isCompressionForbidden(hwInfo));
1162-
}
1163-
11641159
HWTEST2_F(ProductHelperTest, givenProductHelperThenCompressionIsNotForbidden, IsAtLeastXe2HpgCore) {
11651160
auto hwInfo = *defaultHwInfo;
11661161
EXPECT_FALSE(productHelper->isCompressionForbidden(hwInfo));

shared/test/unit_test/xe_hpc_core/pvc/test_product_helper_pvc.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,17 @@
77

88
#include "shared/source/command_stream/stream_properties.h"
99
#include "shared/source/helpers/constants.h"
10-
#include "shared/source/helpers/definitions/indirect_detection_versions.h"
1110
#include "shared/source/kernel/kernel_descriptor.h"
1211
#include "shared/source/os_interface/product_helper.h"
1312
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
1413
#include "shared/source/xe_hpc_core/pvc/device_ids_configs_pvc.h"
1514
#include "shared/test/common/helpers/debug_manager_state_restore.h"
1615
#include "shared/test/common/helpers/default_hw_info.h"
17-
#include "shared/test/common/helpers/gtest_helpers.h"
1816
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
19-
#include "shared/test/common/test_macros/test.h"
20-
#include "shared/test/common/xe_hpc_core/pvc/product_configs_pvc.h"
2117
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
2218

2319
#include "aubstream/product_family.h"
20+
#include "gtest/gtest.h"
2421

2522
using namespace NEO;
2623

@@ -302,3 +299,8 @@ PVCTEST_F(PvcProductHelper, givenProductHelperWhenGetRequiredDetectIndirectVersi
302299
PVCTEST_F(ProductHelperTest, givenProductHelperWhenAskingForSharingWith3dOrMediaSupportThenFalseReturned) {
303300
EXPECT_FALSE(productHelper->isSharingWith3dOrMediaAllowed());
304301
}
302+
303+
PVCTEST_F(ProductHelperTest, givenProductHelperThenCompressionIsForbidden) {
304+
auto hwInfo = *defaultHwInfo;
305+
EXPECT_TRUE(productHelper->isCompressionForbidden(hwInfo));
306+
}

shared/test/unit_test/xe_hpg_core/arl/linux/product_helper_tests_arl.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@ ARLTEST_F(ArlProductHelperLinux, givenBooleanUncachedWhenCallOverridePatIndexThe
9898
EXPECT_EQ(0u, productHelper->overridePatIndex(isUncached, patIndex, AllocationType::buffer));
9999
EXPECT_EQ(3u, productHelper->overridePatIndex(isUncached, patIndex, AllocationType::commandBuffer));
100100
}
101+
102+
ARLTEST_F(ArlProductHelperLinux, givenProductHelperThenCompressionIsForbidden) {
103+
auto hwInfo = *defaultHwInfo;
104+
EXPECT_TRUE(productHelper->isCompressionForbidden(hwInfo));
105+
}
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#
2-
# Copyright (C) 2022-2023 Intel Corporation
2+
# Copyright (C) 2025 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
66

7-
if(UNIX)
7+
if(WIN32)
88
target_sources(neo_shared_tests PRIVATE
9-
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_gen12lp.cpp
9+
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
10+
${CMAKE_CURRENT_SOURCE_DIR}/product_helper_tests_arl_windows.cpp
1011
)
1112
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* Copyright (C) 2025 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: MIT
5+
*
6+
*/
7+
8+
#include "shared/source/xe_hpg_core/hw_info_xe_hpg_core.h"
9+
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
10+
#include "shared/test/unit_test/os_interface/windows/product_helper_win_tests.h"
11+
12+
using namespace NEO;
13+
14+
using ArlProductHelperWindows = ProductHelperTestWindows;
15+
16+
ARLTEST_F(ArlProductHelperWindows, givenProductHelperThenCompressionIsNotForbidden) {
17+
auto hwInfo = *defaultHwInfo;
18+
EXPECT_FALSE(productHelper->isCompressionForbidden(hwInfo));
19+
}

shared/test/unit_test/xe_hpg_core/dg2/test_product_helper_dg2.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
* Copyright (C) 2021-2024 Intel Corporation
2+
* Copyright (C) 2021-2025 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
66
*/
77

8-
#include "shared/source/helpers/compiler_product_helper.h"
98
#include "shared/source/helpers/local_memory_access_modes.h"
109
#include "shared/source/os_interface/product_helper.h"
1110
#include "shared/source/xe_hpg_core/hw_cmds_dg2.h"
1211
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
13-
#include "shared/test/common/test_macros/test.h"
1412
#include "shared/test/unit_test/os_interface/product_helper_tests.h"
1513

14+
#include "gtest/gtest.h"
15+
1616
using namespace NEO;
1717

1818
using Dg2ProductHelper = ProductHelperTest;
@@ -112,4 +112,9 @@ DG2TEST_F(Dg2ProductHelper, whenConfiguringHardwareInfoThenWa15010089951IsSet) {
112112

113113
DG2TEST_F(Dg2ProductHelper, givenProductHelperWhenCallIsNewCoherencyModelSupportedThenFalseIsReturned) {
114114
EXPECT_FALSE(productHelper->isNewCoherencyModelSupported());
115-
}
115+
}
116+
117+
DG2TEST_F(Dg2ProductHelper, givenProductHelperThenCompressionIsNotForbidden) {
118+
auto hwInfo = *defaultHwInfo;
119+
EXPECT_FALSE(productHelper->isCompressionForbidden(hwInfo));
120+
}

shared/test/unit_test/xe_hpg_core/mtl/linux/product_helper_tests_mtl_linux.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,8 @@ MTLTEST_F(MtlProductHelperLinux, givenBooleanUncachedWhenCallOverridePatIndexThe
7373
EXPECT_EQ(0u, productHelper->overridePatIndex(isUncached, patIndex, AllocationType::buffer));
7474
EXPECT_EQ(3u, productHelper->overridePatIndex(isUncached, patIndex, AllocationType::commandBuffer));
7575
}
76+
77+
MTLTEST_F(MtlProductHelperLinux, givenProductHelperThenCompressionIsForbidden) {
78+
auto hwInfo = *defaultHwInfo;
79+
EXPECT_TRUE(productHelper->isCompressionForbidden(hwInfo));
80+
}

shared/test/unit_test/xe_hpg_core/mtl/windows/product_helper_tests_mtl_windows.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ MTLTEST_F(MtlProductHelperWindows, whenCheckingIsTimestampWaitSupportedForEvents
2424
MTLTEST_F(MtlProductHelperWindows, givenProductHelperWhenIsStagingBuffersEnabledThenTrueIsReturned) {
2525
EXPECT_TRUE(productHelper->isStagingBuffersEnabled());
2626
}
27+
28+
MTLTEST_F(MtlProductHelperWindows, givenProductHelperThenCompressionIsNotForbidden) {
29+
auto hwInfo = *defaultHwInfo;
30+
EXPECT_FALSE(productHelper->isCompressionForbidden(hwInfo));
31+
}

0 commit comments

Comments
 (0)