mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 18:37:46 +08:00
Related-To: NEO-4207 Change-Id: I70781b44e7d14360a581808049baf8b61fd1b4e4 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
33 lines
1022 B
C++
33 lines
1022 B
C++
/*
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "core/debug_settings/debug_settings_manager.h"
|
|
#include "core/helpers/basic_math.h"
|
|
#include "core/helpers/hw_info.h"
|
|
#include "core/unit_tests/helpers/debug_manager_state_restore.h"
|
|
#include "runtime/memory_manager/os_agnostic_memory_manager.h"
|
|
#include "test.h"
|
|
#include "unit_tests/fixtures/device_fixture.h"
|
|
|
|
#include "gmock/gmock.h"
|
|
|
|
#include <memory>
|
|
|
|
using namespace NEO;
|
|
|
|
TEST(Device_GetCaps, givenForceClGlSharingWhenCapsAreCreatedThenDeviceReporstClGlSharingExtension) {
|
|
DebugManagerStateRestore dbgRestorer;
|
|
{
|
|
DebugManager.flags.AddClGlSharing.set(true);
|
|
auto device = std::unique_ptr<Device>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
|
|
const auto &caps = device->getDeviceInfo();
|
|
|
|
EXPECT_THAT(caps.deviceExtensions, testing::HasSubstr(std::string("cl_khr_gl_sharing ")));
|
|
DebugManager.flags.AddClGlSharing.set(false);
|
|
}
|
|
}
|