Files
compute-runtime/runtime/os_interface/windows/os_context_win.h
Artur Harasimiuk 40146291ad Update copyright headers
Updating files modified in 2018 only. Older files remain with old style
copyright header

Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 18:02:35 +02:00

47 lines
1.2 KiB
C++

/*
* Copyright (C) 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/os_interface/os_context.h"
#include "runtime/os_interface/windows/windows_wrapper.h"
#include "runtime/os_interface/windows/windows_defs.h"
#include <d3dkmthk.h>
namespace OCLRT {
class Wddm;
using OsContextWin = OsContext::OsContextImpl;
class OsContext::OsContextImpl {
public:
OsContextImpl() = delete;
OsContextImpl(Wddm &wddm);
~OsContextImpl();
D3DKMT_HANDLE getContext() const {
return context;
}
D3DKMT_HANDLE getHwQueue() const {
return hwQueueHandle;
}
void setHwQueue(D3DKMT_HANDLE hwQueue) {
hwQueueHandle = hwQueue;
}
bool isInitialized() const {
return initialized;
}
MonitoredFence &getMonitoredFence() { return monitoredFence; }
void resetMonitoredFenceParams(D3DKMT_HANDLE &handle, uint64_t *cpuAddress, D3DGPU_VIRTUAL_ADDRESS &gpuAddress);
Wddm *getWddm() const { return &wddm; }
protected:
bool initialized = false;
D3DKMT_HANDLE context = 0;
D3DKMT_HANDLE hwQueueHandle = 0;
Wddm &wddm;
MonitoredFence monitoredFence = {};
};
} // namespace OCLRT