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