compute-runtime/runtime/os_interface/windows/os_context_win.h

46 lines
1.1 KiB
C
Raw Normal View History

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/os_interface/os_context.h"
#include "runtime/os_interface/windows/wddm_residency_controller.h"
namespace OCLRT {
class Wddm;
class OsContextWin : public OsContext {
public:
OsContextWin() = delete;
~OsContextWin() override;
OsContextWin(Wddm &wddm, uint32_t contextId, uint32_t numDevicesSupported,
EngineInstanceT engineType, PreemptionMode preemptionMode);
D3DKMT_HANDLE getContext() const {
return context;
}
D3DKMT_HANDLE getHwQueue() const {
return hwQueueHandle;
}
void setHwQueue(D3DKMT_HANDLE hwQueue) {
hwQueueHandle = hwQueue;
}
bool isInitialized() const {
return initialized;
}
Wddm *getWddm() const { return &wddm; }
WddmResidencyController &getResidencyController() { return residencyController; }
protected:
bool initialized = false;
D3DKMT_HANDLE context = 0;
D3DKMT_HANDLE hwQueueHandle = 0;
Wddm &wddm;
WddmResidencyController residencyController;
};
} // namespace OCLRT