2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2018-09-18 09:11:08 +02:00
|
|
|
* Copyright (C) 2017-2018 Intel Corporation
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 00:45:38 +01:00
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
#include "runtime/memory_manager/deferrable_deletion.h"
|
2018-08-27 15:48:29 +02:00
|
|
|
#include "runtime/os_interface/os_context.h"
|
2018-05-08 13:19:26 +02:00
|
|
|
#include "runtime/os_interface/windows/windows_wrapper.h"
|
|
|
|
|
#include <d3dkmthk.h>
|
2017-12-21 00:45:38 +01:00
|
|
|
|
|
|
|
|
namespace OCLRT {
|
|
|
|
|
|
|
|
|
|
class Wddm;
|
|
|
|
|
|
2018-08-27 15:48:29 +02:00
|
|
|
using OsContextWin = OsContext::OsContextImpl;
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
class DeferrableDeletionImpl : public DeferrableDeletion {
|
|
|
|
|
public:
|
2018-09-06 17:58:32 +02:00
|
|
|
DeferrableDeletionImpl(Wddm *wddm, D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle);
|
2018-11-29 11:20:02 +01:00
|
|
|
bool apply() override;
|
2017-12-21 00:45:38 +01:00
|
|
|
~DeferrableDeletionImpl();
|
|
|
|
|
|
2018-06-04 16:11:04 +02:00
|
|
|
DeferrableDeletionImpl(const DeferrableDeletionImpl &) = delete;
|
|
|
|
|
DeferrableDeletionImpl &operator=(const DeferrableDeletionImpl &) = delete;
|
|
|
|
|
|
2017-12-21 00:45:38 +01:00
|
|
|
protected:
|
|
|
|
|
Wddm *wddm;
|
|
|
|
|
D3DKMT_HANDLE *handles = nullptr;
|
|
|
|
|
uint32_t allocationCount;
|
|
|
|
|
D3DKMT_HANDLE resourceHandle;
|
|
|
|
|
};
|
|
|
|
|
} // namespace OCLRT
|