2017-12-21 00:45:38 +01:00
|
|
|
/*
|
2020-01-07 12:11:38 +01:00
|
|
|
* Copyright (C) 2017-2020 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
|
2020-02-23 22:44:01 +01:00
|
|
|
#include "shared/source/memory_manager/deferrable_deletion.h"
|
|
|
|
#include "shared/source/os_interface/os_context.h"
|
|
|
|
#include "shared/source/os_interface/windows/windows_wrapper.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
|
2018-05-08 13:19:26 +02:00
|
|
|
#include <d3dkmthk.h>
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
namespace NEO {
|
2017-12-21 00:45:38 +01:00
|
|
|
|
2019-02-27 11:17:17 +01:00
|
|
|
class OsContextWin;
|
2017-12-21 00:45:38 +01:00
|
|
|
class Wddm;
|
|
|
|
|
|
|
|
class DeferrableDeletionImpl : public DeferrableDeletion {
|
|
|
|
public:
|
2019-03-05 14:21:57 +01:00
|
|
|
DeferrableDeletionImpl(Wddm *wddm, const 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;
|
|
|
|
};
|
2019-03-26 11:59:46 +01:00
|
|
|
} // namespace NEO
|