2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2019-02-27 11:39:32 +01:00
|
|
|
* Copyright (C) 2017-2019 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
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
2018-03-01 21:50:09 +01:00
|
|
|
#include "common/gtsysinfo.h"
|
2019-11-19 11:49:19 +01:00
|
|
|
#include "core/os_interface/os_library.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
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";
|
2018-05-17 11:47:35 +02:00
|
|
|
const char *gmmDllName = "mock_gmm.dll";
|
2019-10-15 15:05:47 +02:00
|
|
|
const char *gmmInitFuncName = "initMockGmm";
|
|
|
|
|
const char *gmmDestroyFuncName = "destroyMockGmm";
|
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);
|
2017-12-21 00:45:38 +01:00
|
|
|
pfSetAdapterInfo setAdpaterInfo = reinterpret_cast<pfSetAdapterInfo>(mockGdiDll->getProcAddress("MockSetAdapterInfo"));
|
|
|
|
|
|
2019-03-15 11:09:06 +01:00
|
|
|
setAdpaterInfo(platform, gtSystemInfo, gpuAddressSpace);
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
return mockGdiDll;
|
|
|
|
|
}
|