2020-02-05 17:49:54 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2020 Intel Corporation
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 01:46:50 +08:00
|
|
|
#include "helpers/non_copyable_or_moveable.h"
|
|
|
|
#include "os_interface/windows/windows_wrapper.h"
|
2020-02-05 17:49:54 +08:00
|
|
|
|
|
|
|
#include <d3dkmthk.h>
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
namespace NEO {
|
|
|
|
class Gdi;
|
|
|
|
class HwDeviceId : NonCopyableClass {
|
|
|
|
public:
|
|
|
|
HwDeviceId(D3DKMT_HANDLE adapterIn, LUID adapterLuidIn, std::unique_ptr<Gdi> gdiIn);
|
|
|
|
inline Gdi *getGdi() const {
|
|
|
|
return gdi.get();
|
|
|
|
}
|
|
|
|
constexpr D3DKMT_HANDLE getAdapter() const {
|
|
|
|
return adapter;
|
|
|
|
}
|
|
|
|
constexpr LUID getAdapterLuid() const {
|
|
|
|
return adapterLuid;
|
|
|
|
}
|
|
|
|
~HwDeviceId();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
const D3DKMT_HANDLE adapter;
|
|
|
|
const LUID adapterLuid;
|
|
|
|
const std::unique_ptr<Gdi> gdi;
|
|
|
|
};
|
|
|
|
} // namespace NEO
|