2018-05-11 15:44:37 +08:00
|
|
|
/*
|
2023-01-24 20:14:14 +08:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2018-05-11 15:44:37 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-05-11 15:44:37 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/execution_environment/root_device_environment.h"
|
|
|
|
#include "shared/source/helpers/hw_info.h"
|
|
|
|
#include "shared/source/os_interface/os_interface.h"
|
|
|
|
#include "shared/source/os_interface/windows/wddm/wddm.h"
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
2021-07-06 21:44:16 +08:00
|
|
|
#include "shared/test/common/mocks/mock_execution_environment.h"
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/test/common/test_macros/hw_test.h"
|
2020-02-23 05:50:57 +08:00
|
|
|
|
2018-05-18 16:18:16 +08:00
|
|
|
#include <typeinfo>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2018-05-11 15:44:37 +08:00
|
|
|
|
2018-05-18 16:18:16 +08:00
|
|
|
TEST(wddmCreateTests, givenInputVersionWhenCreatingThenCreateRequestedObject) {
|
2019-11-07 01:14:30 +08:00
|
|
|
MockExecutionEnvironment executionEnvironment;
|
|
|
|
RootDeviceEnvironment rootDeviceEnvironment(executionEnvironment);
|
2020-03-17 14:26:46 +08:00
|
|
|
auto hwDeviceIds = OSInterface::discoverDevices(executionEnvironment);
|
2021-05-25 01:34:55 +08:00
|
|
|
std::unique_ptr<Wddm> wddm(Wddm::createWddm(std::unique_ptr<HwDeviceIdWddm>(hwDeviceIds[0].release()->as<HwDeviceIdWddm>()), rootDeviceEnvironment));
|
2021-01-11 04:36:01 +08:00
|
|
|
EXPECT_NE(nullptr, wddm);
|
2018-05-11 15:44:37 +08:00
|
|
|
}
|