Enable blitter for DG1+WSL&Linux

Related-To: NEO-6710, NEO-6685
Signed-off-by: Kamil Diedrich <kamil.diedrich@intel.com>
This commit is contained in:
Kamil Diedrich 2022-02-25 13:20:45 +01:00 committed by Compute-Runtime-Automation
parent ba2c97358e
commit 371358c8c7
7 changed files with 22 additions and 93 deletions

View File

@ -42,6 +42,11 @@ bool HwInfoConfigHw<gfxProduct>::isForceEmuInt32DivRemSPWARequired(const Hardwar
return HwHelper::get(hwInfo.platform.eRenderCoreFamily).isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo);
}
template <>
bool HwInfoConfigHw<gfxProduct>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
return true;
}
template <>
bool HwInfoConfigHw<gfxProduct>::is3DPipelineSelectWARequired() const {
return true;

View File

@ -21,10 +21,5 @@ void HwInfoConfigHw<gfxProduct>::setCapabilityCoherencyFlag(const HardwareInfo &
coherencyFlag = false;
}
template <>
bool HwInfoConfigHw<gfxProduct>::obtainBlitterPreference(const HardwareInfo &hwInfo) const {
return true;
}
template class HwInfoConfigHw<gfxProduct>;
} // namespace NEO

View File

@ -1,13 +0,0 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(LINUX)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1_linux.cpp
)
add_subdirectories()
endif()

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
using Dg1HwInfoConfigLinux = ::testing::Test;
DG1TEST_F(Dg1HwInfoConfigLinux, whenConfigureHwInfoThenBlitterSupportIsDisabled) {
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
auto hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_FALSE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
DG1TEST_F(Dg1HwInfoConfigLinux, givenDg1WhenObtainingBlitterPreferenceThenReturnFalse) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
}

View File

@ -100,11 +100,28 @@ DG1TEST_F(Dg1HwInfo, givenBoolWhenCallDg1HardwareInfoSetupThenFeatureTableAndWor
}
}
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
}
DG1TEST_F(Dg1HwInfo, whenPlatformIsDg1ThenExpectSvmIsSet) {
const HardwareInfo &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hardwareInfo.capabilityTable.ftrSvm);
}
DG1TEST_F(Dg1HwInfo, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
auto hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
DG1TEST_F(Dg1HwInfo, givenDg1WhenObtainingFullBlitterSupportThenReturnFalse) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;

View File

@ -1,13 +0,0 @@
#
# Copyright (C) 2022 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(WIN32)
target_sources(neo_shared_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_dg1_windows.cpp
)
add_subdirectories()
endif()

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/os_interface/hw_info_config.h"
#include "shared/test/common/helpers/default_hw_info.h"
#include "shared/test/common/test_macros/test.h"
using namespace NEO;
using Dg1HwInfoConfigWindows = ::testing::Test;
DG1TEST_F(Dg1HwInfoConfigWindows, whenConfigureHwInfoThenBlitterSupportIsEnabled) {
auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
auto hardwareInfo = *defaultHwInfo;
hardwareInfo.capabilityTable.blitterOperationsSupported = false;
hwInfoConfig.configureHardwareCustom(&hardwareInfo, nullptr);
EXPECT_TRUE(hardwareInfo.capabilityTable.blitterOperationsSupported);
}
DG1TEST_F(Dg1HwInfoConfigWindows, givenDg1WhenObtainingBlitterPreferenceThenReturnTrue) {
const auto &hwInfoConfig = *HwInfoConfig::get(defaultHwInfo->platform.eProductFamily);
const auto &hardwareInfo = DG1::hwInfo;
EXPECT_TRUE(hwInfoConfig.obtainBlitterPreference(hardwareInfo));
}