2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2022-11-29 12:31:17 +00:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/os_interface/os_library.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2020-02-23 09:03:33 +01:00
|
|
|
#include "common/gtsysinfo.h"
|
2018-03-01 21:50:09 +01:00
|
|
|
#include "igfxfmid.h"
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
namespace Os {
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// These options determine the Windows specific behavior for
|
|
|
|
|
// the runtime unit tests
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2018-07-29 00:47:55 +02:00
|
|
|
const char *frontEndDllName = "";
|
|
|
|
|
const char *igcDllName = "";
|
2017-12-21 00:45:38 +01:00
|
|
|
const char *gdiDllName = "gdi32_mock.dll";
|
2021-05-25 18:42:36 +02:00
|
|
|
const char *dxcoreDllName = "";
|
2017-12-21 00:45:38 +01:00
|
|
|
const char *testDllName = "test_dynamic_lib.dll";
|
2019-05-20 11:19:27 +02:00
|
|
|
const char *metricsLibraryDllName = "";
|
2018-06-12 21:54:39 +02:00
|
|
|
} // namespace Os
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
NEO::OsLibrary *setAdapterInfo(const PLATFORM *platform, const GT_SYSTEM_INFO *gtSystemInfo, uint64_t gpuAddressSpace) {
|
|
|
|
|
NEO::OsLibrary *mockGdiDll;
|
|
|
|
|
mockGdiDll = NEO::OsLibrary::load("gdi32_mock.dll");
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-15 11:09:06 +01:00
|
|
|
typedef void(__stdcall * pfSetAdapterInfo)(const void *, const void *, uint64_t);
|
2022-11-29 12:31:17 +00:00
|
|
|
pfSetAdapterInfo setAdapterInfo = reinterpret_cast<pfSetAdapterInfo>(mockGdiDll->getProcAddress("MockSetAdapterInfo"));
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2022-11-29 12:31:17 +00:00
|
|
|
setAdapterInfo(platform, gtSystemInfo, gpuAddressSpace);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
return mockGdiDll;
|
|
|
|
|
}
|