fix: initialize ipVersion in wddm paths

Related-To: NEO-7786
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk 2023-05-19 14:42:28 +00:00 committed by Compute-Runtime-Automation
parent 3afa43a890
commit 3e6c83d28a
4 changed files with 32 additions and 1 deletions

View File

@ -1,10 +1,13 @@
/*
* Copyright (C) 2022 Intel Corporation
* Copyright (C) 2022-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/source/os_interface/windows/wddm/wddm.h"
namespace NEO {
@ -12,5 +15,7 @@ namespace NEO {
void Wddm::populateAdditionalAdapterInfoOptions(const ADAPTER_INFO_KMD &adapterInfo) {
}
void Wddm::populateIpVersion(HardwareInfo &hwInfo) {
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
hwInfo.ipVersion.value = productHelper.getProductConfigFromHwInfo(hwInfo);
}
} // namespace NEO

View File

@ -39,6 +39,7 @@ class WddmMock : public Wddm {
using Wddm::featureTable;
using Wddm::forceEvictOnlyIfNecessary;
using Wddm::getSystemInfo;
using Wddm::gfxPlatform;
using Wddm::gmmMemory;
using Wddm::hwDeviceId;
using Wddm::mapGpuVirtualAddress;

View File

@ -25,6 +25,7 @@ if(WIN32)
${CMAKE_CURRENT_SOURCE_DIR}/registry_reader_tests.h
${CMAKE_CURRENT_SOURCE_DIR}/self_lib_win.cpp
${CMAKE_CURRENT_SOURCE_DIR}/um_km_data_translator_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/${BRANCH_DIR_SUFFIX}wddm_additional_apater_info_options_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_address_space_windows_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_command_stream_l0_tests.cpp
${CMAKE_CURRENT_SOURCE_DIR}/wddm_kmdaf_listener_tests.cpp

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/os_interface/product_helper.h"
#include "shared/test/common/os_interface/windows/wddm_fixture.h"
#include "shared/test/common/test_macros/hw_test.h"
using namespace NEO;
TEST_F(WddmTest, WhenPopulateIpVersionWddmIsCalledThenIpVersionIsSet) {
auto &productHelper = wddm->rootDeviceEnvironment.getHelper<ProductHelper>();
HardwareInfo hwInfo = *defaultHwInfo;
auto config = productHelper.getProductConfigFromHwInfo(hwInfo);
wddm->populateIpVersion(hwInfo);
EXPECT_EQ(config, hwInfo.ipVersion.value);
}