mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Move HwInfoConfig ownership to RootDeviceEnvironment 1/n
Related-To: NEO-6853 Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> - Added HwInfoConfig getter in RootDeviceEnvironment, which temporarily takes HwInfoConfig from the global array - use HwInfoConfig from RootDeviceEnvironment to call ConfigureHardwareCustom function - Added getHwInfoConfig in DeviceFixture - ConfigureHardwareCustom function and few others changed to const - Small code cleanup
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
68300a9605
commit
eafea5e2fe
@ -18,6 +18,7 @@
|
|||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/os_interface/os_interface.h"
|
#include "shared/source/os_interface/os_interface.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||||
#include "shared/test/common/helpers/variable_backup.h"
|
#include "shared/test/common/helpers/variable_backup.h"
|
||||||
@ -1047,16 +1048,16 @@ HWTEST_F(PipeControlHelperTests, WhenProgrammingCacheFlushThenExpectBasicFieldsS
|
|||||||
EXPECT_TRUE(pipeControl->getTlbInvalidate());
|
EXPECT_TRUE(pipeControl->getTlbInvalidate());
|
||||||
}
|
}
|
||||||
|
|
||||||
using HwInfoConfigCommonTest = ::testing::Test;
|
using HwInfoConfigCommonTest = Test<DeviceFixture>;
|
||||||
|
|
||||||
HWTEST2_F(HwInfoConfigCommonTest, givenBlitterPreferenceWhenEnablingBlitterOperationsSupportThenHonorThePreference, IsAtLeastGen12lp) {
|
HWTEST2_F(HwInfoConfigCommonTest, givenBlitterPreferenceWhenEnablingBlitterOperationsSupportThenHonorThePreference, IsAtLeastGen12lp) {
|
||||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
|
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
|
|
||||||
const auto expectedBlitterSupport = hwInfoConfig->obtainBlitterPreference(hardwareInfo);
|
const auto expectedBlitterSupport = hwInfoConfig.obtainBlitterPreference(hardwareInfo);
|
||||||
EXPECT_EQ(expectedBlitterSupport, hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_EQ(expectedBlitterSupport, hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1092,15 +1093,14 @@ TEST_F(HwHelperTest, givenInvalidEngineTypeWhenGettingEngineGroupTypeThenThrow)
|
|||||||
HWTEST2_F(HwInfoConfigCommonTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenHonorTheFlag, IsAtLeastGen12lp) {
|
HWTEST2_F(HwInfoConfigCommonTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenHonorTheFlag, IsAtLeastGen12lp) {
|
||||||
DebugManagerStateRestore restore{};
|
DebugManagerStateRestore restore{};
|
||||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
||||||
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "shared/source/xe_hp_core/hw_cmds.h"
|
#include "shared/source/xe_hp_core/hw_cmds.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||||
@ -118,7 +119,7 @@ XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenRevisionEnumAndPlatformFamilyType
|
|||||||
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_B, REVISION_A0, hardwareInfo));
|
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_B, REVISION_A0, hardwareInfo));
|
||||||
} else if (stepping == REVISION_A1) {
|
} else if (stepping == REVISION_A1) {
|
||||||
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_A1, hardwareInfo));
|
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_A1, hardwareInfo));
|
||||||
} else if (stepping == REVISION_C || stepping == REVISION_D) { //undefined
|
} else if (stepping == REVISION_C || stepping == REVISION_D) { // undefined
|
||||||
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_D, hardwareInfo));
|
EXPECT_FALSE(hwHelper.isWorkaroundRequired(REVISION_A0, REVISION_D, hardwareInfo));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -197,31 +198,31 @@ XE_HP_CORE_TEST_F(HwHelperTestXE_HP_CORE, givenXeHPAndLaterPlatformWhenCheckAssi
|
|||||||
EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported(*defaultHwInfo));
|
EXPECT_FALSE(hwHelper.isAssignEngineRoundRobinSupported(*defaultHwInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
using HwInfoConfigTestXE_HP_CORE = ::testing::Test;
|
using HwInfoConfigTestXE_HP_CORE = Test<DeviceFixture>;
|
||||||
|
|
||||||
XE_HP_CORE_TEST_F(HwInfoConfigTestXE_HP_CORE, givenDebugVariableSetWhenConfigureIsCalledThenSetupBlitterOperationsSupportedFlag) {
|
XE_HP_CORE_TEST_F(HwInfoConfigTestXE_HP_CORE, givenDebugVariableSetWhenConfigureIsCalledThenSetupBlitterOperationsSupportedFlag) {
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_FALSE(hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_FALSE(hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
XE_HP_CORE_TEST_F(HwInfoConfigTestXE_HP_CORE, givenMultitileConfigWhenConfiguringHwInfoThenEnableBlitter) {
|
XE_HP_CORE_TEST_F(HwInfoConfigTestXE_HP_CORE, givenMultitileConfigWhenConfiguringHwInfoThenEnableBlitter) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
for (uint32_t tileCount = 0; tileCount <= 4; tileCount++) {
|
for (uint32_t tileCount = 0; tileCount <= 4; tileCount++) {
|
||||||
hwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = tileCount;
|
hwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = tileCount;
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(true, hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_EQ(true, hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#include "shared/source/command_stream/stream_properties.h"
|
#include "shared/source/command_stream/stream_properties.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||||
#include "shared/test/common/mocks/mock_device.h"
|
#include "shared/test/common/mocks/mock_device.h"
|
||||||
@ -20,29 +21,29 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using XeHPHwInfoConfig = ::testing::Test;
|
using XeHPHwInfoConfig = Test<DeviceFixture>;
|
||||||
|
|
||||||
XEHPTEST_F(XeHPHwInfoConfig, givenXeHPMultiConfigWhenConfigureHardwareCustomIsCalledThenCapabilityTableIsSetProperly) {
|
XEHPTEST_F(XeHPHwInfoConfig, givenXeHPMultiConfigWhenConfigureHardwareCustomIsCalledThenCapabilityTableIsSetProperly) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
hwInfo.featureTable.flags.ftrE2ECompression = true;
|
hwInfo.featureTable.flags.ftrE2ECompression = true;
|
||||||
|
|
||||||
hwInfo.gtSystemInfo.EUCount = 256u;
|
hwInfo.gtSystemInfo.EUCount = 256u;
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
EXPECT_FALSE(hwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||||
EXPECT_FALSE(hwInfo.capabilityTable.ftrRenderCompressedImages);
|
EXPECT_FALSE(hwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||||
|
|
||||||
hwInfo.gtSystemInfo.EUCount = 512u;
|
hwInfo.gtSystemInfo.EUCount = 512u;
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_TRUE(hwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
EXPECT_TRUE(hwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||||
EXPECT_TRUE(hwInfo.capabilityTable.ftrRenderCompressedImages);
|
EXPECT_TRUE(hwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||||
}
|
}
|
||||||
|
|
||||||
XEHPTEST_F(XeHPHwInfoConfig, givenXeHPWhenConfiguringThenDisableRcs) {
|
XEHPTEST_F(XeHPHwInfoConfig, givenXeHPWhenConfiguringThenDisableRcs) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_FALSE(hwInfo.featureTable.flags.ftrRcsNode);
|
EXPECT_FALSE(hwInfo.featureTable.flags.ftrRcsNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,10 +51,10 @@ XEHPTEST_F(XeHPHwInfoConfig, givenDebugVariableSetWhenConfiguringThenEnableRcs)
|
|||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS));
|
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_RCS));
|
||||||
|
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +65,7 @@ XEHPTEST_F(XeHPHwInfoConfig, givenXeHpWhenCallingGetDeviceMemoryNameThenHbmIsRet
|
|||||||
}
|
}
|
||||||
|
|
||||||
XEHPTEST_F(XeHPHwInfoConfig, givenA0OrA1SteppingWhenAskingIfExtraParametersAreInvalidThenReturnTrue) {
|
XEHPTEST_F(XeHPHwInfoConfig, givenA0OrA1SteppingWhenAskingIfExtraParametersAreInvalidThenReturnTrue) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
std::array<std::pair<uint32_t, bool>, 4> revisions = {
|
std::array<std::pair<uint32_t, bool>, 4> revisions = {
|
||||||
{{REVISION_A0, true},
|
{{REVISION_A0, true},
|
||||||
{REVISION_A1, true},
|
{REVISION_A1, true},
|
||||||
@ -73,11 +74,11 @@ XEHPTEST_F(XeHPHwInfoConfig, givenA0OrA1SteppingWhenAskingIfExtraParametersAreIn
|
|||||||
|
|
||||||
for (const auto &[revision, paramBool] : revisions) {
|
for (const auto &[revision, paramBool] : revisions) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->extraParametersInvalid(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.extraParametersInvalid(hwInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/helpers/engine_node_helper.h"
|
#include "shared/source/helpers/engine_node_helper.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||||
#include "shared/test/common/helpers/ult_hw_config.h"
|
#include "shared/test/common/helpers/ult_hw_config.h"
|
||||||
@ -650,7 +651,7 @@ XE_HPC_CORETEST_F(HwHelperTestsXeHpcCore, givenHwHelperWhenGettingThreadsPerEUCo
|
|||||||
EXPECT_EQ(8U, configs[1]);
|
EXPECT_EQ(8U, configs[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
using HwInfoConfigTestXeHpcCore = ::testing::Test;
|
using HwInfoConfigTestXeHpcCore = Test<DeviceFixture>;
|
||||||
|
|
||||||
XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenDefaultHwInfoConfigHwWhenGettingIsBlitCopyRequiredForLocalMemoryThenFalseIsReturned) {
|
XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenDefaultHwInfoConfigHwWhenGettingIsBlitCopyRequiredForLocalMemoryThenFalseIsReturned) {
|
||||||
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
||||||
@ -662,27 +663,26 @@ XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenDefaultHwInfoConfigHwWhenGetti
|
|||||||
|
|
||||||
XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenDebugVariableSetWhenConfigureIsCalledThenSetupBlitterOperationsSupportedFlag) {
|
XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenDebugVariableSetWhenConfigureIsCalledThenSetupBlitterOperationsSupportedFlag) {
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_FALSE(hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_FALSE(hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenMultitileConfigWhenConfiguringHwInfoThenEnableBlitter) {
|
XE_HPC_CORETEST_F(HwInfoConfigTestXeHpcCore, givenMultitileConfigWhenConfiguringHwInfoThenEnableBlitter) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
for (uint32_t tileCount = 0; tileCount <= 4; tileCount++) {
|
for (uint32_t tileCount = 0; tileCount <= 4; tileCount++) {
|
||||||
hwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = tileCount;
|
hwInfo.gtSystemInfo.MultiTileArchInfo.TileCount = tileCount;
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(true, hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_EQ(true, hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
@ -124,6 +124,11 @@ BindlessHeapsHelper *RootDeviceEnvironment::getBindlessHeapsHelper() const {
|
|||||||
return bindlessHeapsHelper.get();
|
return bindlessHeapsHelper.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const HwInfoConfig &RootDeviceEnvironment::getHwInfoConfig() const {
|
||||||
|
auto &hwInfoConfig = *HwInfoConfig::get(this->getHardwareInfo()->platform.eProductFamily);
|
||||||
|
return hwInfoConfig;
|
||||||
|
}
|
||||||
|
|
||||||
void RootDeviceEnvironment::createBindlessHeapsHelper(MemoryManager *memoryManager, bool availableDevices, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
void RootDeviceEnvironment::createBindlessHeapsHelper(MemoryManager *memoryManager, bool availableDevices, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield) {
|
||||||
bindlessHeapsHelper = std::make_unique<BindlessHeapsHelper>(memoryManager, availableDevices, rootDeviceIndex, deviceBitfield);
|
bindlessHeapsHelper = std::make_unique<BindlessHeapsHelper>(memoryManager, availableDevices, rootDeviceIndex, deviceBitfield);
|
||||||
}
|
}
|
||||||
|
@ -34,6 +34,7 @@ class OSInterface;
|
|||||||
class OSTime;
|
class OSTime;
|
||||||
class SipKernel;
|
class SipKernel;
|
||||||
class SWTagsManager;
|
class SWTagsManager;
|
||||||
|
class HwInfoConfig;
|
||||||
struct HardwareInfo;
|
struct HardwareInfo;
|
||||||
|
|
||||||
struct RootDeviceEnvironment {
|
struct RootDeviceEnvironment {
|
||||||
@ -66,6 +67,7 @@ struct RootDeviceEnvironment {
|
|||||||
void createBindlessHeapsHelper(MemoryManager *memoryManager, bool availableDevices, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
void createBindlessHeapsHelper(MemoryManager *memoryManager, bool availableDevices, uint32_t rootDeviceIndex, DeviceBitfield deviceBitfield);
|
||||||
void limitNumberOfCcs(uint32_t numberOfCcs);
|
void limitNumberOfCcs(uint32_t numberOfCcs);
|
||||||
bool isNumberOfCcsLimited() const;
|
bool isNumberOfCcsLimited() const;
|
||||||
|
const HwInfoConfig &getHwInfoConfig() const;
|
||||||
|
|
||||||
std::unique_ptr<SipKernel> sipKernels[static_cast<uint32_t>(SipKernelType::COUNT)];
|
std::unique_ptr<SipKernel> sipKernels[static_cast<uint32_t>(SipKernelType::COUNT)];
|
||||||
std::unique_ptr<GmmHelper> gmmHelper;
|
std::unique_ptr<GmmHelper> gmmHelper;
|
||||||
|
@ -19,7 +19,7 @@ constexpr static auto gfxProduct = IGFX_ELKHARTLAKE;
|
|||||||
#include "shared/source/gen11/ehl/os_agnostic_hw_info_config_ehl.inl"
|
#include "shared/source/gen11/ehl/os_agnostic_hw_info_config_ehl.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ constexpr static auto gfxProduct = IGFX_ICELAKE_LP;
|
|||||||
#include "shared/source/gen11/icllp/os_agnostic_hw_info_config_icllp.inl"
|
#include "shared/source/gen11/icllp/os_agnostic_hw_info_config_icllp.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ constexpr static auto gfxProduct = IGFX_LAKEFIELD;
|
|||||||
#include "shared/source/gen11/lkf/os_agnostic_hw_info_config_lkf.inl"
|
#include "shared/source/gen11/lkf/os_agnostic_hw_info_config_lkf.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ constexpr static auto gfxProduct = IGFX_ALDERLAKE_P;
|
|||||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(hwInfo->platform.eProductFamily);
|
||||||
|
@ -20,7 +20,7 @@ constexpr static auto gfxProduct = IGFX_DG1;
|
|||||||
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
#include "shared/source/gen12lp/os_agnostic_hw_info_config_gen12lp.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ constexpr static auto gfxProduct = IGFX_ROCKETLAKE;
|
|||||||
#include "shared/source/gen12lp/rkl/os_agnostic_hw_info_config_rkl.inl"
|
#include "shared/source/gen12lp/rkl/os_agnostic_hw_info_config_rkl.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
hwInfo->featureTable.flags.ftrGpGpuMidThreadLevelPreempt = false;
|
hwInfo->featureTable.flags.ftrGpGpuMidThreadLevelPreempt = false;
|
||||||
|
@ -20,7 +20,7 @@ constexpr static auto gfxProduct = IGFX_TIGERLAKE_LP;
|
|||||||
#include "shared/source/gen12lp/tgllp/os_agnostic_hw_info_config_tgllp.inl"
|
#include "shared/source/gen12lp/tgllp/os_agnostic_hw_info_config_tgllp.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||||
gtSystemInfo->SliceCount = 1;
|
gtSystemInfo->SliceCount = 1;
|
||||||
hwInfo->featureTable.flags.ftrGpGpuMidThreadLevelPreempt = false;
|
hwInfo->featureTable.flags.ftrGpGpuMidThreadLevelPreempt = false;
|
||||||
|
@ -19,7 +19,7 @@ constexpr static auto gfxProduct = IGFX_BROADWELL;
|
|||||||
#include "shared/source/gen8/bdw/os_agnostic_hw_info_config_bdw.inl"
|
#include "shared/source/gen8/bdw/os_agnostic_hw_info_config_bdw.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ constexpr static auto gfxProduct = IGFX_BROXTON;
|
|||||||
#include "shared/source/gen9/bxt/os_agnostic_hw_info_config_bxt.inl"
|
#include "shared/source/gen9/bxt/os_agnostic_hw_info_config_bxt.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ constexpr static auto gfxProduct = IGFX_COFFEELAKE;
|
|||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ constexpr static auto gfxProduct = IGFX_GEMINILAKE;
|
|||||||
#include "shared/source/gen9/glk/os_agnostic_hw_info_config_glk.inl"
|
#include "shared/source/gen9/glk/os_agnostic_hw_info_config_glk.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ constexpr static auto gfxProduct = IGFX_KABYLAKE;
|
|||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ constexpr static auto gfxProduct = IGFX_SKYLAKE;
|
|||||||
#include "shared/source/gen9/skl/os_agnostic_hw_info_config_skl.inl"
|
#include "shared/source/gen9/skl/os_agnostic_hw_info_config_skl.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (nullptr == osIface) {
|
if (nullptr == osIface) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,8 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
|
|||||||
DebugManager.getHardwareInfoOverride(hwInfoConfigStr);
|
DebugManager.getHardwareInfoOverride(hwInfoConfigStr);
|
||||||
|
|
||||||
for (auto rootDeviceIndex = 0u; rootDeviceIndex < numRootDevices; rootDeviceIndex++) {
|
for (auto rootDeviceIndex = 0u; rootDeviceIndex < numRootDevices; rootDeviceIndex++) {
|
||||||
auto hardwareInfo = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getMutableHardwareInfo();
|
auto &rootDeviceEnvironment = *executionEnvironment.rootDeviceEnvironments[rootDeviceIndex].get();
|
||||||
|
auto hardwareInfo = rootDeviceEnvironment.getMutableHardwareInfo();
|
||||||
*hardwareInfo = *hwInfoConst;
|
*hardwareInfo = *hwInfoConst;
|
||||||
|
|
||||||
if (hwInfoConfigStr == "default") {
|
if (hwInfoConfigStr == "default") {
|
||||||
@ -62,8 +63,8 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
|
|||||||
|
|
||||||
hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig);
|
hardwareInfoSetup[hwInfoConst->platform.eProductFamily](hardwareInfo, true, hwInfoConfig);
|
||||||
|
|
||||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hardwareInfo->platform.eProductFamily);
|
auto &hwConfig = rootDeviceEnvironment.getHwInfoConfig();
|
||||||
hwConfig->configureHardwareCustom(hardwareInfo, nullptr);
|
hwConfig.configureHardwareCustom(hardwareInfo, nullptr);
|
||||||
|
|
||||||
if (productConfigFound) {
|
if (productConfigFound) {
|
||||||
const auto &compilerHwInfoConfig = *CompilerHwInfoConfig::get(hardwareInfo->platform.eProductFamily);
|
const auto &compilerHwInfoConfig = *CompilerHwInfoConfig::get(hardwareInfo->platform.eProductFamily);
|
||||||
@ -83,17 +84,17 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
|
|||||||
hardwareInfo->platform.usDeviceID = static_cast<unsigned short>(std::stoi(DebugManager.flags.ForceDeviceId.get(), nullptr, 16));
|
hardwareInfo->platform.usDeviceID = static_cast<unsigned short>(std::stoi(DebugManager.flags.ForceDeviceId.get(), nullptr, 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
[[maybe_unused]] bool result = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAilConfiguration();
|
[[maybe_unused]] bool result = rootDeviceEnvironment.initAilConfiguration();
|
||||||
DEBUG_BREAK_IF(!result);
|
DEBUG_BREAK_IF(!result);
|
||||||
|
|
||||||
auto csrType = DebugManager.flags.SetCommandStreamReceiver.get();
|
auto csrType = DebugManager.flags.SetCommandStreamReceiver.get();
|
||||||
if (csrType > 0) {
|
if (csrType > 0) {
|
||||||
auto &hwHelper = HwHelper::get(hardwareInfo->platform.eRenderCoreFamily);
|
auto &hwHelper = HwHelper::get(hardwareInfo->platform.eRenderCoreFamily);
|
||||||
auto localMemoryEnabled = hwHelper.getEnableLocalMemory(*hardwareInfo);
|
auto localMemoryEnabled = hwHelper.getEnableLocalMemory(*hardwareInfo);
|
||||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initGmm();
|
rootDeviceEnvironment.initGmm();
|
||||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initAubCenter(localMemoryEnabled, "", static_cast<CommandStreamReceiverType>(csrType));
|
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, "", static_cast<CommandStreamReceiverType>(csrType));
|
||||||
auto aubCenter = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.get();
|
auto aubCenter = rootDeviceEnvironment.aubCenter.get();
|
||||||
executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->memoryOperationsInterface = std::make_unique<AubMemoryOperationsHandler>(aubCenter->getAubManager());
|
rootDeviceEnvironment.memoryOperationsInterface = std::make_unique<AubMemoryOperationsHandler>(aubCenter->getAubManager());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class HwInfoConfig {
|
|||||||
static constexpr uint32_t luidSize = 8u;
|
static constexpr uint32_t luidSize = 8u;
|
||||||
int configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, OSInterface *osIface);
|
int configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, OSInterface *osIface);
|
||||||
int configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, OSInterface *osIface);
|
int configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, OSInterface *osIface);
|
||||||
virtual int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) = 0;
|
virtual int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const = 0;
|
||||||
virtual void adjustPlatformForProductFamily(HardwareInfo *hwInfo) = 0;
|
virtual void adjustPlatformForProductFamily(HardwareInfo *hwInfo) = 0;
|
||||||
virtual void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) = 0;
|
virtual void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) = 0;
|
||||||
virtual uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) = 0;
|
virtual uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) = 0;
|
||||||
@ -186,7 +186,7 @@ class HwInfoConfigHw : public HwInfoConfig {
|
|||||||
static HwInfoConfigHw<gfxProduct> instance;
|
static HwInfoConfigHw<gfxProduct> instance;
|
||||||
return &instance;
|
return &instance;
|
||||||
}
|
}
|
||||||
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) override;
|
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override;
|
||||||
void adjustPlatformForProductFamily(HardwareInfo *hwInfo) override;
|
void adjustPlatformForProductFamily(HardwareInfo *hwInfo) override;
|
||||||
void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) override;
|
void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) override;
|
||||||
uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) override;
|
uint64_t getHostMemCapabilities(const HardwareInfo *hwInfo) override;
|
||||||
@ -307,8 +307,8 @@ class HwInfoConfigHw : public HwInfoConfig {
|
|||||||
protected:
|
protected:
|
||||||
HwInfoConfigHw() = default;
|
HwInfoConfigHw() = default;
|
||||||
|
|
||||||
void enableCompression(HardwareInfo *hwInfo);
|
void enableCompression(HardwareInfo *hwInfo) const;
|
||||||
void enableBlitterOperationsSupport(HardwareInfo *hwInfo);
|
void enableBlitterOperationsSupport(HardwareInfo *hwInfo) const;
|
||||||
bool getConcurrentAccessMemCapabilitiesSupported(UsmAccessCapabilities capability);
|
bool getConcurrentAccessMemCapabilitiesSupported(UsmAccessCapabilities capability);
|
||||||
uint64_t getHostMemCapabilitiesValue();
|
uint64_t getHostMemCapabilitiesValue();
|
||||||
bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo);
|
bool getHostMemCapabilitiesSupported(const HardwareInfo *hwInfo);
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
namespace NEO {
|
namespace NEO {
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
enableBlitterOperationsSupport(hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ template <PRODUCT_FAMILY gfxProduct>
|
|||||||
void HwInfoConfigHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) {}
|
void HwInfoConfigHw<gfxProduct>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) {}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void HwInfoConfigHw<gfxProduct>::enableBlitterOperationsSupport(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<gfxProduct>::enableBlitterOperationsSupport(HardwareInfo *hwInfo) const {
|
||||||
hwInfo->capabilityTable.blitterOperationsSupported = obtainBlitterPreference(*hwInfo);
|
hwInfo->capabilityTable.blitterOperationsSupported = obtainBlitterPreference(*hwInfo);
|
||||||
|
|
||||||
if (DebugManager.flags.EnableBlitterOperationsSupport.get() != -1) {
|
if (DebugManager.flags.EnableBlitterOperationsSupport.get() != -1) {
|
||||||
|
@ -20,7 +20,7 @@ uint64_t HwInfoConfigHw<gfxProduct>::getCrossDeviceSharedMemCapabilities() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void HwInfoConfigHw<gfxProduct>::enableCompression(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<gfxProduct>::enableCompression(HardwareInfo *hwInfo) const {
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.flags.ftrE2ECompression;
|
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.flags.ftrE2ECompression;
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.flags.ftrE2ECompression;
|
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.flags.ftrE2ECompression;
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,7 @@ uint64_t HwInfoConfigHw<gfxProduct>::getCrossDeviceSharedMemCapabilities() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <PRODUCT_FAMILY gfxProduct>
|
template <PRODUCT_FAMILY gfxProduct>
|
||||||
void HwInfoConfigHw<gfxProduct>::enableCompression(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<gfxProduct>::enableCompression(HardwareInfo *hwInfo) const {
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.flags.ftrE2ECompression;
|
hwInfo->capabilityTable.ftrRenderCompressedImages = hwInfo->featureTable.flags.ftrE2ECompression;
|
||||||
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.flags.ftrE2ECompression;
|
hwInfo->capabilityTable.ftrRenderCompressedBuffers = hwInfo->featureTable.flags.ftrE2ECompression;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ const std::map<std::string, std::pair<uint32_t, uint32_t>> guidUuidOffsetMap = {
|
|||||||
#include "shared/source/xe_hp_core/os_agnostic_hw_info_config_xe_hp_core.inl"
|
#include "shared/source/xe_hp_core/os_agnostic_hw_info_config_xe_hp_core.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (allowCompression(*hwInfo)) {
|
if (allowCompression(*hwInfo)) {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ constexpr static auto gfxProduct = IGFX_XE_HP_SDV;
|
|||||||
#include "shared/source/xe_hp_core/os_agnostic_hw_info_config_xe_hp_core.inl"
|
#include "shared/source/xe_hp_core/os_agnostic_hw_info_config_xe_hp_core.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (allowCompression(*hwInfo)) {
|
if (allowCompression(*hwInfo)) {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace NEO {
|
namespace NEO {
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
|
|
||||||
hwInfo->featureTable.flags.ftr57bGPUAddressing = (hwInfo->capabilityTable.gpuAddressSpace == maxNBitValue(57));
|
hwInfo->featureTable.flags.ftr57bGPUAddressing = (hwInfo->capabilityTable.gpuAddressSpace == maxNBitValue(57));
|
||||||
|
@ -21,7 +21,7 @@ constexpr static auto gfxProduct = IGFX_PVC;
|
|||||||
#include "shared/source/xe_hpc_core/pvc/os_agnostic_hw_info_config_pvc.inl"
|
#include "shared/source/xe_hpc_core/pvc/os_agnostic_hw_info_config_pvc.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
enableBlitterOperationsSupport(hwInfo);
|
enableBlitterOperationsSupport(hwInfo);
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ constexpr static auto gfxProduct = IGFX_DG2;
|
|||||||
#include "os_agnostic_hw_info_config_dg2_extra.inl"
|
#include "os_agnostic_hw_info_config_dg2_extra.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (allowCompression(*hwInfo)) {
|
if (allowCompression(*hwInfo)) {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ constexpr static auto gfxProduct = IGFX_DG2;
|
|||||||
#include "os_agnostic_hw_info_config_dg2_extra.inl"
|
#include "os_agnostic_hw_info_config_dg2_extra.inl"
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int HwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
if (allowCompression(*hwInfo)) {
|
if (allowCompression(*hwInfo)) {
|
||||||
enableCompression(hwInfo);
|
enableCompression(hwInfo);
|
||||||
}
|
}
|
||||||
|
@ -37,4 +37,9 @@ MockDevice *DeviceFixture::createWithUsDeviceIdRevId(unsigned short usDeviceId,
|
|||||||
hardwareInfo.platform.usRevId = usRevId;
|
hardwareInfo.platform.usRevId = usRevId;
|
||||||
return MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo);
|
return MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hardwareInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const HwInfoConfig &DeviceFixture::getHwInfoConfig() const {
|
||||||
|
return this->pDevice->getRootDeviceEnvironment().getHwInfoConfig();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
@ -23,5 +23,6 @@ struct DeviceFixture {
|
|||||||
HardwareInfo hardwareInfo = {};
|
HardwareInfo hardwareInfo = {};
|
||||||
PLATFORM platformHelper = {};
|
PLATFORM platformHelper = {};
|
||||||
const uint32_t rootDeviceIndex = 0u;
|
const uint32_t rootDeviceIndex = 0u;
|
||||||
|
const HwInfoConfig &getHwInfoConfig() const;
|
||||||
};
|
};
|
||||||
} // namespace NEO
|
} // namespace NEO
|
||||||
|
@ -17,7 +17,7 @@ struct MockHwInfoConfigHw : NEO::HwInfoConfigHw<productFamily> {
|
|||||||
bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override;
|
bool isCooperativeEngineSupported(const HardwareInfo &hwInfo) const override;
|
||||||
bool getUuid(Device *device, std::array<uint8_t, HwInfoConfig::uuidSize> &uuid) const override;
|
bool getUuid(Device *device, std::array<uint8_t, HwInfoConfig::uuidSize> &uuid) const override;
|
||||||
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
|
uint32_t getSteppingFromHwRevId(const HardwareInfo &hwInfo) const override;
|
||||||
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) override;
|
int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const override;
|
||||||
uint64_t getDeviceMemoryPhysicalSizeInBytes(const OSInterface *osIface, uint32_t subDeviceIndex) override;
|
uint64_t getDeviceMemoryPhysicalSizeInBytes(const OSInterface *osIface, uint32_t subDeviceIndex) override;
|
||||||
uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) override;
|
uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo &hwInfo, const OSInterface *osIface, uint32_t subDeviceIndex) override;
|
||||||
uint32_t getL1CachePolicy(bool isDebuggerActive) const override;
|
uint32_t getL1CachePolicy(bool isDebuggerActive) const override;
|
||||||
|
@ -25,7 +25,7 @@ uint32_t MockHwInfoConfigHw<gfxProduct>::getSteppingFromHwRevId(const HardwareIn
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
int MockHwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
int MockHwInfoConfigHw<gfxProduct>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const {
|
||||||
FeatureTable *featureTable = &hwInfo->featureTable;
|
FeatureTable *featureTable = &hwInfo->featureTable;
|
||||||
featureTable->flags.ftrGpGpuMidThreadLevelPreempt = 0;
|
featureTable->flags.ftrGpGpuMidThreadLevelPreempt = 0;
|
||||||
featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = 0;
|
featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = 0;
|
||||||
|
@ -66,10 +66,13 @@ apply_macro_for_each_core_type("TESTED")
|
|||||||
append_sources_from_properties(neo_libult_common_SRCS_ENABLE_TESTED_HW NEO_SRCS_ENABLE_CORE)
|
append_sources_from_properties(neo_libult_common_SRCS_ENABLE_TESTED_HW NEO_SRCS_ENABLE_CORE)
|
||||||
|
|
||||||
set(neo_libult_common_SRCS_LIB_ULT
|
set(neo_libult_common_SRCS_LIB_ULT
|
||||||
|
${NEO_SHARED_DIRECTORY}/gmm_helper/resource_info_impl.cpp
|
||||||
|
${NEO_SHARED_TEST_DIRECTORY}/common/base_ult_config_listener.cpp
|
||||||
|
${NEO_SHARED_TEST_DIRECTORY}/common/base_ult_config_listener.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/aub_command_stream_receiver_fixture.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/aub_command_stream_receiver_fixture.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/command_stream_receiver_fixture.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/command_stream_receiver_fixture.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/command_stream_receiver_fixture.inl
|
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/command_stream_receiver_fixture.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/command_stream_receiver_fixture.h
|
||||||
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/command_stream_receiver_fixture.inl
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/device_fixture.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/device_fixture.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/device_fixture.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/device_fixture.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/gmm_callbacks_fixture.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/gmm_callbacks_fixture.h
|
||||||
@ -83,11 +86,12 @@ set(neo_libult_common_SRCS_LIB_ULT
|
|||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/mock_execution_environment_gmm_fixture.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/mock_execution_environment_gmm_fixture.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/tbx_command_stream_fixture.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/tbx_command_stream_fixture.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/tbx_command_stream_fixture.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/fixtures/tbx_command_stream_fixture.h
|
||||||
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/debug_helpers.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/execution_environment_helper.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/execution_environment_helper.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/execution_environment_helper.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/execution_environment_helper.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_binary_helper_hash_value.cpp
|
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_binary_helper.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_binary_helper.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_binary_helper.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_binary_helper.h
|
||||||
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_binary_helper_hash_value.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_filename_helper.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/kernel_filename_helper.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/memory_leak_listener.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/memory_leak_listener.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/memory_leak_listener.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/memory_leak_listener.h
|
||||||
@ -115,15 +119,11 @@ set(neo_libult_common_SRCS_LIB_ULT
|
|||||||
${NEO_SHARED_TEST_DIRECTORY}/common/libult/source_level_debugger_ult.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/libult/source_level_debugger_ult.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/libult/ult_aub_command_stream_receiver.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/libult/ult_aub_command_stream_receiver.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/libult/ult_command_stream_receiver.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/libult/ult_command_stream_receiver.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_memory_manager.cpp
|
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_gmm_page_table_mngr.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_gmm_page_table_mngr.cpp
|
||||||
|
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_memory_manager.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/test_macros/test_excludes.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/test_macros/test_excludes.cpp
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/test_macros/test_excludes.h
|
${NEO_SHARED_TEST_DIRECTORY}/common/test_macros/test_excludes.h
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/base_ult_config_listener.cpp
|
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/base_ult_config_listener.h
|
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/helpers/debug_helpers.cpp
|
|
||||||
${NEO_SHARED_TEST_DIRECTORY}/common/utilities/cpuintrinsics.cpp
|
${NEO_SHARED_TEST_DIRECTORY}/common/utilities/cpuintrinsics.cpp
|
||||||
${NEO_SHARED_DIRECTORY}/gmm_helper/resource_info_impl.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(TESTS_XEHP_AND_LATER)
|
if(TESTS_XEHP_AND_LATER)
|
||||||
|
@ -351,7 +351,7 @@ void HwInfoConfigHw<IGFX_UNKNOWN>::updateIddCommand(void *const commandPtr, uint
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void HwInfoConfigHw<IGFX_UNKNOWN>::enableCompression(HardwareInfo *hwInfo) {
|
void HwInfoConfigHw<IGFX_UNKNOWN>::enableCompression(HardwareInfo *hwInfo) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
@ -168,7 +168,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
|
|||||||
EXPECT_EQ(expectedDevices, exeEnv.rootDeviceEnvironments.size());
|
EXPECT_EQ(expectedDevices, exeEnv.rootDeviceEnvironments.size());
|
||||||
for (auto i = 0u; i < expectedDevices; i++) {
|
for (auto i = 0u; i < expectedDevices; i++) {
|
||||||
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
|
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
|
||||||
|
auto &hwConfig = exeEnv.rootDeviceEnvironments[i]->getHwInfoConfig();
|
||||||
switch (csrType) {
|
switch (csrType) {
|
||||||
case CSR_HW:
|
case CSR_HW:
|
||||||
case CSR_HW_WITH_AUB:
|
case CSR_HW_WITH_AUB:
|
||||||
@ -197,8 +197,8 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
|
|||||||
hwInfoFromTable.workaroundTable = {};
|
hwInfoFromTable.workaroundTable = {};
|
||||||
hwInfoFromTable.gtSystemInfo = {};
|
hwInfoFromTable.gtSystemInfo = {};
|
||||||
hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0);
|
hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0);
|
||||||
HwInfoConfig *hwConfig = HwInfoConfig::get(hwInfoFromTable.platform.eProductFamily);
|
|
||||||
hwConfig->configureHardwareCustom(&hwInfoFromTable, nullptr);
|
hwConfig.configureHardwareCustom(&hwInfoFromTable, nullptr);
|
||||||
EXPECT_EQ(0, memcmp(&hwInfoFromTable.platform, &hwInfo->platform, sizeof(PLATFORM)));
|
EXPECT_EQ(0, memcmp(&hwInfoFromTable.platform, &hwInfo->platform, sizeof(PLATFORM)));
|
||||||
|
|
||||||
EXPECT_STREQ(hardwarePrefix[i], deprecatedAcronym.c_str());
|
EXPECT_STREQ(hardwarePrefix[i], deprecatedAcronym.c_str());
|
||||||
@ -238,6 +238,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
|
|||||||
EXPECT_EQ(expectedDevices, exeEnv.rootDeviceEnvironments.size());
|
EXPECT_EQ(expectedDevices, exeEnv.rootDeviceEnvironments.size());
|
||||||
for (auto i = 0u; i < expectedDevices; i++) {
|
for (auto i = 0u; i < expectedDevices; i++) {
|
||||||
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
|
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
|
||||||
|
auto &hwConfig = exeEnv.rootDeviceEnvironments[i]->getHwInfoConfig();
|
||||||
|
|
||||||
switch (csrType) {
|
switch (csrType) {
|
||||||
case CSR_HW:
|
case CSR_HW:
|
||||||
@ -256,9 +257,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
|
|||||||
expectedHwInfo.workaroundTable = {};
|
expectedHwInfo.workaroundTable = {};
|
||||||
expectedHwInfo.gtSystemInfo = {};
|
expectedHwInfo.gtSystemInfo = {};
|
||||||
hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0);
|
hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0);
|
||||||
|
hwConfig.configureHardwareCustom(&expectedHwInfo, nullptr);
|
||||||
HwInfoConfig *hwConfig = HwInfoConfig::get(expectedHwInfo.platform.eProductFamily);
|
|
||||||
hwConfig->configureHardwareCustom(&expectedHwInfo, nullptr);
|
|
||||||
|
|
||||||
const auto &compilerHwInfoConfig = *NEO::CompilerHwInfoConfig::get(expectedHwInfo.platform.eProductFamily);
|
const auto &compilerHwInfoConfig = *NEO::CompilerHwInfoConfig::get(expectedHwInfo.platform.eProductFamily);
|
||||||
compilerHwInfoConfig.setProductConfigForHwInfo(expectedHwInfo, deviceAot.aotConfig);
|
compilerHwInfoConfig.setProductConfigForHwInfo(expectedHwInfo, deviceAot.aotConfig);
|
||||||
@ -322,6 +321,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
|
|||||||
EXPECT_EQ(expectedDevices, exeEnv.rootDeviceEnvironments.size());
|
EXPECT_EQ(expectedDevices, exeEnv.rootDeviceEnvironments.size());
|
||||||
for (auto i = 0u; i < expectedDevices; i++) {
|
for (auto i = 0u; i < expectedDevices; i++) {
|
||||||
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
|
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
|
||||||
|
auto &hwConfig = exeEnv.rootDeviceEnvironments[i]->getHwInfoConfig();
|
||||||
|
|
||||||
switch (csrType) {
|
switch (csrType) {
|
||||||
case CSR_HW:
|
case CSR_HW:
|
||||||
@ -347,8 +347,8 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
|
|||||||
baseHwInfo.workaroundTable = {};
|
baseHwInfo.workaroundTable = {};
|
||||||
baseHwInfo.gtSystemInfo = {};
|
baseHwInfo.gtSystemInfo = {};
|
||||||
hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0);
|
hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0);
|
||||||
HwInfoConfig *hwConfig = HwInfoConfig::get(baseHwInfo.platform.eProductFamily);
|
|
||||||
hwConfig->configureHardwareCustom(&baseHwInfo, nullptr);
|
hwConfig.configureHardwareCustom(&baseHwInfo, nullptr);
|
||||||
EXPECT_EQ(0, memcmp(&baseHwInfo.platform, &hwInfo->platform, sizeof(PLATFORM)));
|
EXPECT_EQ(0, memcmp(&baseHwInfo.platform, &hwInfo->platform, sizeof(PLATFORM)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -9,24 +9,25 @@
|
|||||||
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/os_interface/os_interface.h"
|
#include "shared/source/os_interface/os_interface.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
#include "shared/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
#include "shared/test/unit_test/os_interface/linux/hw_info_config_linux_tests.h"
|
||||||
|
|
||||||
using HwInfoConfigTestLinuxDg1 = ::testing::Test;
|
using HwInfoConfigTestLinuxDg1 = Test<DeviceFixture>;
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
DG1TEST_F(HwInfoConfigTestLinuxDg1, GivenDG1WhenConfigureHardwareCustomThenMTPIsNotSet) {
|
DG1TEST_F(HwInfoConfigTestLinuxDg1, GivenDG1WhenConfigureHardwareCustomThenMTPIsNotSet) {
|
||||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
HwInfoConfig *hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
OSInterface osIface;
|
OSInterface osIface;
|
||||||
hardwareInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
|
hardwareInfo.capabilityTable.defaultPreemptionMode = PreemptionMode::ThreadGroup;
|
||||||
PreemptionHelper::adjustDefaultPreemptionMode(hardwareInfo.capabilityTable, true, true, true);
|
PreemptionHelper::adjustDefaultPreemptionMode(hardwareInfo.capabilityTable, true, true, true);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hardwareInfo, &osIface);
|
hwInfoConfig.configureHardwareCustom(&hardwareInfo, &osIface);
|
||||||
EXPECT_FALSE(hardwareInfo.featureTable.flags.ftrGpGpuMidThreadLevelPreempt);
|
EXPECT_FALSE(hardwareInfo.featureTable.flags.ftrGpGpuMidThreadLevelPreempt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
#include "shared/source/gen12lp/hw_cmds_dg1.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
@ -16,7 +17,7 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using Dg1HwInfoConfig = ::testing::Test;
|
using Dg1HwInfoConfig = Test<DeviceFixture>;
|
||||||
|
|
||||||
DG1TEST_F(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
|
DG1TEST_F(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpectThrow) {
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
@ -32,20 +33,20 @@ DG1TEST_F(Dg1HwInfoConfig, givenInvalidSystemInfoWhenSettingHardwareInfoThenExpe
|
|||||||
}
|
}
|
||||||
|
|
||||||
DG1TEST_F(Dg1HwInfoConfig, givenA0SteppingAndDg1PlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
DG1TEST_F(Dg1HwInfoConfig, givenA0SteppingAndDg1PlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
std::array<std::pair<uint32_t, bool>, 2> revisions = {
|
std::array<std::pair<uint32_t, bool>, 2> revisions = {
|
||||||
{{REVISION_A0, true},
|
{{REVISION_A0, true},
|
||||||
{REVISION_B, false}}};
|
{REVISION_B, false}}};
|
||||||
|
|
||||||
for (const auto &[revision, paramBool] : revisions) {
|
for (const auto &[revision, paramBool] : revisions) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->pipeControlWARequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.pipeControlWARequired(hwInfo));
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->imagePitchAlignmentWARequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.imagePitchAlignmentWARequired(hwInfo));
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,8 +110,8 @@ DG1TEST_F(Dg1HwInfo, whenPlatformIsDg1ThenExpectSvmIsSet) {
|
|||||||
EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm);
|
EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm);
|
||||||
}
|
}
|
||||||
|
|
||||||
DG1TEST_F(Dg1HwInfo, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
|
DG1TEST_F(Dg1HwInfoConfig, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
|
||||||
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
auto hardwareInfo = *defaultHwInfo;
|
auto hardwareInfo = *defaultHwInfo;
|
||||||
|
|
||||||
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
|
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "shared/source/helpers/compiler_hw_info_config.h"
|
#include "shared/source/helpers/compiler_hw_info_config.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
@ -118,10 +119,10 @@ RKLTEST_F(RklHwInfo, givenHwInfoConfigWhenGetCommandsStreamPropertiesSupportThen
|
|||||||
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
EXPECT_FALSE(hwInfoConfig.getPipelineSelectPropertySystolicModeSupport());
|
||||||
}
|
}
|
||||||
|
|
||||||
using RklHwInfoConfig = ::testing::Test;
|
using RklHwInfoConfig = Test<DeviceFixture>;
|
||||||
|
|
||||||
RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||||
{{REVISION_A0, true},
|
{{REVISION_A0, true},
|
||||||
{REVISION_B, true},
|
{REVISION_B, true},
|
||||||
@ -129,11 +130,11 @@ RKLTEST_F(RklHwInfoConfig, givenA0OrBSteppingAndRklPlatformWhenAskingIfWAIsRequi
|
|||||||
|
|
||||||
for (const auto &[revision, paramBool] : revisions) {
|
for (const auto &[revision, paramBool] : revisions) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
|
#include "shared/source/gen12lp/hw_cmds_tgllp.h"
|
||||||
#include "shared/source/os_interface/device_factory.h"
|
#include "shared/source/os_interface/device_factory.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/mocks/mock_execution_environment.h"
|
#include "shared/test/common/mocks/mock_execution_environment.h"
|
||||||
@ -18,7 +19,7 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using HwInfoConfigTestTgllp = ::testing::Test;
|
using HwInfoConfigTestTgllp = Test<DeviceFixture>;
|
||||||
|
|
||||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
TGLLPTEST_F(HwInfoConfigTestTgllp, givenHwInfoConfigWhenGettingEvictIfNecessaryFlagSupportedThenExpectTrue) {
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
@ -90,7 +91,7 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, whenUsingCorrectConfigValueThenCorrectHwInfoI
|
|||||||
}
|
}
|
||||||
|
|
||||||
TGLLPTEST_F(HwInfoConfigTestTgllp, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
TGLLPTEST_F(HwInfoConfigTestTgllp, givenA0SteppingAndTgllpPlatformWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
std::array<std::pair<uint32_t, bool>, 3> revisions = {
|
||||||
{{REVISION_A0, true},
|
{{REVISION_A0, true},
|
||||||
{REVISION_B, false},
|
{REVISION_B, false},
|
||||||
@ -98,13 +99,12 @@ TGLLPTEST_F(HwInfoConfigTestTgllp, givenA0SteppingAndTgllpPlatformWhenAskingIfWA
|
|||||||
|
|
||||||
for (const auto &[revision, paramBool] : revisions) {
|
for (const auto &[revision, paramBool] : revisions) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
EXPECT_EQ(paramBool, hwInfoConfig.pipeControlWARequired(hwInfo));
|
||||||
|
EXPECT_EQ(paramBool, hwInfoConfig.imagePitchAlignmentWARequired(hwInfo));
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->pipeControlWARequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isForceEmuInt32DivRemSPWARequired(hwInfo));
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->imagePitchAlignmentWARequired(hwInfo));
|
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isForceEmuInt32DivRemSPWARequired(hwInfo));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "shared/source/execution_environment/root_device_environment.h"
|
||||||
#include "shared/source/os_interface/os_interface.h"
|
#include "shared/source/os_interface/os_interface.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/libult/gen12lp/special_ult_helper_gen12lp.h"
|
#include "shared/test/common/libult/gen12lp/special_ult_helper_gen12lp.h"
|
||||||
@ -17,15 +18,15 @@ using HwInfoConfigTestWindowsGen12lp = HwInfoConfigTestWindows;
|
|||||||
GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenE2ECSetByKmdWhenConfiguringHwThenAdjustInternalImageFlag) {
|
GEN12LPTEST_F(HwInfoConfigTestWindowsGen12lp, givenE2ECSetByKmdWhenConfiguringHwThenAdjustInternalImageFlag) {
|
||||||
FeatureTable &localFeatureTable = outHwInfo.featureTable;
|
FeatureTable &localFeatureTable = outHwInfo.featureTable;
|
||||||
|
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = rootDeviceEnvironment->getHwInfoConfig();
|
||||||
|
|
||||||
localFeatureTable.flags.ftrE2ECompression = true;
|
localFeatureTable.flags.ftrE2ECompression = true;
|
||||||
hwInfoConfig->configureHardwareCustom(&outHwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&outHwInfo, nullptr);
|
||||||
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||||
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
EXPECT_TRUE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||||
|
|
||||||
localFeatureTable.flags.ftrE2ECompression = false;
|
localFeatureTable.flags.ftrE2ECompression = false;
|
||||||
hwInfoConfig->configureHardwareCustom(&outHwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&outHwInfo, nullptr);
|
||||||
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||||
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
EXPECT_FALSE(outHwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||||
}
|
}
|
||||||
|
@ -39,16 +39,13 @@ TEST_F(HwInfoConfigTestLinuxDummy, GivenDummyConfigWhenConfiguringHwInfoThenSucc
|
|||||||
int ret = hwConfig.configureHwInfoDrm(&pInHwInfo, &outHwInfo, osInterface);
|
int ret = hwConfig.configureHwInfoDrm(&pInHwInfo, &outHwInfo, osInterface);
|
||||||
EXPECT_EQ(0, ret);
|
EXPECT_EQ(0, ret);
|
||||||
}
|
}
|
||||||
using HwInfoConfigCommonLinuxTest = ::testing::Test;
|
|
||||||
|
|
||||||
HWTEST2_F(HwInfoConfigCommonLinuxTest, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenIgnore, IsAtMostGen11) {
|
HWTEST2_F(HwInfoConfigTestLinuxDummy, givenDebugFlagSetWhenEnablingBlitterOperationsSupportThenIgnore, IsAtMostGen11) {
|
||||||
DebugManagerStateRestore restore{};
|
DebugManagerStateRestore restore{};
|
||||||
HardwareInfo hardwareInfo = *defaultHwInfo;
|
HardwareInfo hardwareInfo = *defaultHwInfo;
|
||||||
|
|
||||||
auto hwInfoConfig = HwInfoConfig::get(hardwareInfo.platform.eProductFamily);
|
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
hwInfoConfig->configureHardwareCustom(&hardwareInfo, nullptr);
|
hwConfig.configureHardwareCustom(&hardwareInfo, nullptr);
|
||||||
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,6 +55,10 @@ struct HwInfoConfigTestLinux : public HwInfoConfigTest {
|
|||||||
HwInfoConfigTest::TearDown();
|
HwInfoConfigTest::TearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const HwInfoConfig &getHwInfoConfig() {
|
||||||
|
return executionEnvironment->rootDeviceEnvironments[0]->getHwInfoConfig();
|
||||||
|
}
|
||||||
|
|
||||||
OSInterface *osInterface;
|
OSInterface *osInterface;
|
||||||
std::unique_ptr<ExecutionEnvironment> executionEnvironment;
|
std::unique_ptr<ExecutionEnvironment> executionEnvironment;
|
||||||
DrmMock *drm;
|
DrmMock *drm;
|
||||||
|
@ -29,9 +29,9 @@ XEHPTEST_F(HwInfoConfigTestLinuxXeHp, WhenConfiguringHwInfoThenZeroIsReturned) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
XEHPTEST_F(HwInfoConfigTestLinuxXeHp, GivenXeHpSdvWhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
XEHPTEST_F(HwInfoConfigTestLinuxXeHp, GivenXeHpSdvWhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
||||||
HwInfoConfig *hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&pInHwInfo, osInterface);
|
hwInfoConfig.configureHardwareCustom(&pInHwInfo, osInterface);
|
||||||
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
||||||
EXPECT_EQ(150ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
EXPECT_EQ(150ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
||||||
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
||||||
|
@ -35,27 +35,27 @@ PVCTEST_F(HwInfoConfigTestLinuxPvc, WhenConfiguringHwInfoThenZeroIsReturned) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(HwInfoConfigTestLinuxPvc, given57bAddressSpaceWhenConfiguringHwInfoThenSetFtrFlag) {
|
PVCTEST_F(HwInfoConfigTestLinuxPvc, given57bAddressSpaceWhenConfiguringHwInfoThenSetFtrFlag) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
outHwInfo.featureTable.flags.ftr57bGPUAddressing = false;
|
outHwInfo.featureTable.flags.ftr57bGPUAddressing = false;
|
||||||
outHwInfo.platform.eRenderCoreFamily = defaultHwInfo->platform.eRenderCoreFamily;
|
outHwInfo.platform.eRenderCoreFamily = defaultHwInfo->platform.eRenderCoreFamily;
|
||||||
|
|
||||||
outHwInfo.capabilityTable.gpuAddressSpace = maxNBitValue(48);
|
outHwInfo.capabilityTable.gpuAddressSpace = maxNBitValue(48);
|
||||||
int ret = hwInfoConfig->configureHardwareCustom(&outHwInfo, osInterface);
|
int ret = hwInfoConfig.configureHardwareCustom(&outHwInfo, osInterface);
|
||||||
EXPECT_EQ(0, ret);
|
EXPECT_EQ(0, ret);
|
||||||
EXPECT_FALSE(outHwInfo.featureTable.flags.ftr57bGPUAddressing);
|
EXPECT_FALSE(outHwInfo.featureTable.flags.ftr57bGPUAddressing);
|
||||||
|
|
||||||
outHwInfo.capabilityTable.gpuAddressSpace = maxNBitValue(57);
|
outHwInfo.capabilityTable.gpuAddressSpace = maxNBitValue(57);
|
||||||
ret = hwInfoConfig->configureHardwareCustom(&outHwInfo, osInterface);
|
ret = hwInfoConfig.configureHardwareCustom(&outHwInfo, osInterface);
|
||||||
EXPECT_EQ(0, ret);
|
EXPECT_EQ(0, ret);
|
||||||
auto value = outHwInfo.featureTable.flags.ftr57bGPUAddressing;
|
auto value = outHwInfo.featureTable.flags.ftr57bGPUAddressing;
|
||||||
EXPECT_EQ(1u, value);
|
EXPECT_EQ(1u, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(HwInfoConfigTestLinuxPvc, GivenPvcWhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
PVCTEST_F(HwInfoConfigTestLinuxPvc, GivenPvcWhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
||||||
HwInfoConfig *hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
OSInterface osIface;
|
OSInterface osIface;
|
||||||
hwInfoConfig->configureHardwareCustom(&pInHwInfo, &osIface);
|
hwInfoConfig.configureHardwareCustom(&pInHwInfo, &osIface);
|
||||||
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
||||||
EXPECT_EQ(150ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
EXPECT_EQ(150ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
||||||
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
|
#include "shared/source/xe_hpc_core/hw_cmds_pvc.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||||
@ -18,7 +19,7 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using PvcHwInfoConfig = ::testing::Test;
|
using PvcHwInfoConfig = Test<DeviceFixture>;
|
||||||
|
|
||||||
PVCTEST_F(PvcHwInfoConfig, givenPVCRevId3AndAboveWhenGettingThreadEuRatioForScratchThen16IsReturned) {
|
PVCTEST_F(PvcHwInfoConfig, givenPVCRevId3AndAboveWhenGettingThreadEuRatioForScratchThen16IsReturned) {
|
||||||
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
const auto &hwInfoConfig = *HwInfoConfig::get(productFamily);
|
||||||
@ -185,10 +186,10 @@ PVCTEST_F(PvcHwInfoConfig, givenHwInfoConfigAndProgramExtendedPipeControlPriorTo
|
|||||||
}
|
}
|
||||||
|
|
||||||
PVCTEST_F(PvcHwInfoConfig, givenPvcWhenConfiguringThenDisableCccs) {
|
PVCTEST_F(PvcHwInfoConfig, givenPvcWhenConfiguringThenDisableCccs) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_FALSE(hwInfo.featureTable.flags.ftrRcsNode);
|
EXPECT_FALSE(hwInfo.featureTable.flags.ftrRcsNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,10 +197,10 @@ PVCTEST_F(PvcHwInfoConfig, givenDebugVariableSetWhenConfiguringThenEnableCccs) {
|
|||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS));
|
DebugManager.flags.NodeOrdinal.set(static_cast<int32_t>(aub_stream::EngineType::ENGINE_CCCS));
|
||||||
|
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
EXPECT_TRUE(hwInfo.featureTable.flags.ftrRcsNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "shared/source/helpers/constants.h"
|
#include "shared/source/helpers/constants.h"
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/default_hw_info.h"
|
#include "shared/test/common/helpers/default_hw_info.h"
|
||||||
#include "shared/test/common/test_macros/test.h"
|
#include "shared/test/common/test_macros/test.h"
|
||||||
@ -17,7 +18,7 @@
|
|||||||
|
|
||||||
using namespace NEO;
|
using namespace NEO;
|
||||||
|
|
||||||
using HwInfoConfigTestDg2 = ::testing::Test;
|
using HwInfoConfigTestDg2 = Test<DeviceFixture>;
|
||||||
|
|
||||||
DG2TEST_F(HwInfoConfigTestDg2, givenDg2ConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
|
DG2TEST_F(HwInfoConfigTestDg2, givenDg2ConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
@ -122,7 +123,7 @@ DG2TEST_F(HwInfoConfigTestDg2, whenAdjustingDefaultEngineTypeThenSelectEngineTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(HwInfoConfigTestDg2, givenA0OrA1SteppingWhenAskingIfWAIsRequiredThenReturnTrue) {
|
DG2TEST_F(HwInfoConfigTestDg2, givenA0OrA1SteppingWhenAskingIfWAIsRequiredThenReturnTrue) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
std::array<std::pair<uint32_t, bool>, 4> revisions = {
|
std::array<std::pair<uint32_t, bool>, 4> revisions = {
|
||||||
{{REVISION_A0, true},
|
{{REVISION_A0, true},
|
||||||
{REVISION_A1, true},
|
{REVISION_A1, true},
|
||||||
@ -131,13 +132,13 @@ DG2TEST_F(HwInfoConfigTestDg2, givenA0OrA1SteppingWhenAskingIfWAIsRequiredThenRe
|
|||||||
|
|
||||||
for (const auto &[revision, paramBool] : revisions) {
|
for (const auto &[revision, paramBool] : revisions) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isDefaultEngineTypeAdjustmentRequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isDefaultEngineTypeAdjustmentRequired(hwInfo));
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isAllocationSizeAdjustmentRequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isAllocationSizeAdjustmentRequired(hwInfo));
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isPrefetchDisablingRequired(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isPrefetchDisablingRequired(hwInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +238,7 @@ DG2TEST_F(HwInfoConfigTestDg2, givenDg2WhenIsBlitterForImagesSupportedIsCalledTh
|
|||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(HwInfoConfigTestDg2, givenB0rCSteppingWhenAskingIfTile64With3DSurfaceOnBCSIsSupportedThenReturnTrue) {
|
DG2TEST_F(HwInfoConfigTestDg2, givenB0rCSteppingWhenAskingIfTile64With3DSurfaceOnBCSIsSupportedThenReturnTrue) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
std::array<std::pair<uint32_t, bool>, 4> revisions = {
|
std::array<std::pair<uint32_t, bool>, 4> revisions = {
|
||||||
{{REVISION_A0, false},
|
{{REVISION_A0, false},
|
||||||
{REVISION_A1, false},
|
{REVISION_A1, false},
|
||||||
@ -246,32 +247,32 @@ DG2TEST_F(HwInfoConfigTestDg2, givenB0rCSteppingWhenAskingIfTile64With3DSurfaceO
|
|||||||
|
|
||||||
for (const auto &[revision, paramBool] : revisions) {
|
for (const auto &[revision, paramBool] : revisions) {
|
||||||
auto hwInfo = *defaultHwInfo;
|
auto hwInfo = *defaultHwInfo;
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
EXPECT_EQ(paramBool, hwInfoConfig->isTile64With3DSurfaceOnBCSSupported(hwInfo));
|
EXPECT_EQ(paramBool, hwInfoConfig.isTile64With3DSurfaceOnBCSSupported(hwInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(HwInfoConfigTestDg2, givenA0SteppingAnd128EuWhenConfigureCalledThenDisableCompression) {
|
DG2TEST_F(HwInfoConfigTestDg2, givenA0SteppingAnd128EuWhenConfigureCalledThenDisableCompression) {
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
for (uint8_t revision : {REVISION_A0, REVISION_A1}) {
|
for (uint8_t revision : {REVISION_A0, REVISION_A1}) {
|
||||||
for (uint32_t euCount : {127, 128, 129}) {
|
for (uint32_t euCount : {127, 128, 129}) {
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
hwInfo.featureTable.flags.ftrE2ECompression = true;
|
hwInfo.featureTable.flags.ftrE2ECompression = true;
|
||||||
|
|
||||||
hwInfo.platform.usRevId = hwInfoConfig->getHwRevIdFromStepping(revision, hwInfo);
|
hwInfo.platform.usRevId = hwInfoConfig.getHwRevIdFromStepping(revision, hwInfo);
|
||||||
hwInfo.gtSystemInfo.EUCount = euCount;
|
hwInfo.gtSystemInfo.EUCount = euCount;
|
||||||
|
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
|
|
||||||
auto compressionExpected = (euCount == 128) ? true : (revision != REVISION_A0);
|
auto compressionExpected = (euCount == 128) ? true : (revision != REVISION_A0);
|
||||||
|
|
||||||
EXPECT_EQ(compressionExpected, hwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
EXPECT_EQ(compressionExpected, hwInfo.capabilityTable.ftrRenderCompressedBuffers);
|
||||||
EXPECT_EQ(compressionExpected, hwInfo.capabilityTable.ftrRenderCompressedImages);
|
EXPECT_EQ(compressionExpected, hwInfo.capabilityTable.ftrRenderCompressedImages);
|
||||||
EXPECT_EQ(compressionExpected, hwInfoConfig->allowCompression(hwInfo));
|
EXPECT_EQ(compressionExpected, hwInfoConfig.allowCompression(hwInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,10 @@ DG2TEST_F(HwInfoConfigTestLinuxDg2, WhenConfiguringHwInfoThenZeroIsReturned) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DG2TEST_F(HwInfoConfigTestLinuxDg2, GivenDg2WhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
DG2TEST_F(HwInfoConfigTestLinuxDg2, GivenDg2WhenConfigureHardwareCustomThenKmdNotifyIsEnabled) {
|
||||||
HwInfoConfig *hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
OSInterface osIface;
|
OSInterface osIface;
|
||||||
hwInfoConfig->configureHardwareCustom(&pInHwInfo, &osIface);
|
hwInfoConfig.configureHardwareCustom(&pInHwInfo, &osIface);
|
||||||
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableKmdNotify);
|
||||||
EXPECT_EQ(150ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
EXPECT_EQ(150ll, pInHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
|
||||||
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
EXPECT_TRUE(pInHwInfo.capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForDirectSubmission);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||||
#include "shared/test/common/cmd_parse/hw_parse.h"
|
#include "shared/test/common/cmd_parse/hw_parse.h"
|
||||||
|
#include "shared/test/common/fixtures/device_fixture.h"
|
||||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||||
#include "shared/test/common/helpers/hw_helper_tests.h"
|
#include "shared/test/common/helpers/hw_helper_tests.h"
|
||||||
#include "shared/test/common/helpers/unit_test_helper.h"
|
#include "shared/test/common/helpers/unit_test_helper.h"
|
||||||
@ -50,20 +51,20 @@ XE_HPG_CORETEST_F(HwHelperTestXeHpgCore, givenDebugFlagWhenCheckingIfBufferIsSui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
using HwInfoConfigTestXeHpgCore = ::testing::Test;
|
using HwInfoConfigTestXeHpgCore = Test<DeviceFixture>;
|
||||||
|
|
||||||
XE_HPG_CORETEST_F(HwInfoConfigTestXeHpgCore, givenDebugVariableSetWhenConfigureIsCalledThenSetupBlitterOperationsSupportedFlag) {
|
XE_HPG_CORETEST_F(HwInfoConfigTestXeHpgCore, givenDebugVariableSetWhenConfigureIsCalledThenSetupBlitterOperationsSupportedFlag) {
|
||||||
DebugManagerStateRestore restore;
|
DebugManagerStateRestore restore;
|
||||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
auto &hwInfoConfig = getHwInfoConfig();
|
||||||
|
|
||||||
HardwareInfo hwInfo = *defaultHwInfo;
|
HardwareInfo hwInfo = *defaultHwInfo;
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(0);
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_FALSE(hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_FALSE(hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
|
|
||||||
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
DebugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||||
hwInfoConfig->configureHardwareCustom(&hwInfo, nullptr);
|
hwInfoConfig.configureHardwareCustom(&hwInfo, nullptr);
|
||||||
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported);
|
EXPECT_TRUE(hwInfo.capabilityTable.blitterOperationsSupported);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user