2018-08-23 17:53:58 +02:00
|
|
|
/*
|
2018-09-18 09:11:08 +02:00
|
|
|
* Copyright (C) 2018 Intel Corporation
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
|
*
|
|
|
|
|
*/
|
2018-08-23 17:53:58 +02:00
|
|
|
|
|
|
|
|
#include "runtime/os_interface/os_context.h"
|
2018-11-08 13:05:46 +01:00
|
|
|
#include "runtime/os_interface/linux/drm_neo.h"
|
|
|
|
|
#include "runtime/os_interface/linux/os_context_linux.h"
|
|
|
|
|
#include "runtime/os_interface/linux/os_interface.h"
|
2018-08-23 17:53:58 +02:00
|
|
|
|
|
|
|
|
namespace OCLRT {
|
2018-11-08 13:05:46 +01:00
|
|
|
|
2018-09-12 07:47:55 +02:00
|
|
|
OsContext::OsContext(OSInterface *osInterface, uint32_t contextId) : contextId(contextId) {
|
2018-11-08 13:05:46 +01:00
|
|
|
if (osInterface) {
|
|
|
|
|
osContextImpl = std::make_unique<OsContextLinux>(*osInterface->get()->getDrm());
|
|
|
|
|
}
|
2018-08-23 17:53:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OsContext::~OsContext() = default;
|
2018-11-08 13:05:46 +01:00
|
|
|
|
|
|
|
|
OsContextLinux::OsContextImpl(Drm &drm) : drm(drm) {}
|
2018-08-23 17:53:58 +02:00
|
|
|
} // namespace OCLRT
|