Files
compute-runtime/shared/source/dll/wddm/create_gdi.cpp
Mateusz Jablonski 579af57161 refactor: don't call OsLibrary::load directly, use function pointer
this allows mocking this call in ULT

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2024-08-20 08:59:26 +02:00

27 lines
613 B
C++

/*
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/os_interface/windows/gdi_interface.h"
#include "shared/source/os_interface/windows/os_inc.h"
namespace NEO {
inline const std::string getGdiName() {
if (debugManager.flags.OverrideGdiPath.get() != "unk") {
return debugManager.flags.OverrideGdiPath.get();
} else {
return Os::gdiDllName;
}
}
NEO::OsLibrary *Gdi::createGdiDLL() {
return NEO::OsLibrary::loadFunc(getGdiName());
}
} // namespace NEO