2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2024-09-18 20:32:23 +08:00
|
|
|
* Copyright (C) 2018-2024 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
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/memory_manager/deferrable_deletion.h"
|
|
|
|
#include "shared/source/os_interface/os_context.h"
|
2021-06-08 03:47:12 +08:00
|
|
|
#include "shared/source/os_interface/windows/d3dkmthk_wrapper.h"
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/os_interface/windows/windows_wrapper.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-02-27 18:17:17 +08:00
|
|
|
class OsContextWin;
|
2017-12-21 07:45:38 +08:00
|
|
|
class Wddm;
|
2024-10-08 20:20:29 +08:00
|
|
|
enum class AllocationType;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
|
|
|
class DeferrableDeletionImpl : public DeferrableDeletion {
|
|
|
|
public:
|
2024-10-08 20:20:29 +08:00
|
|
|
DeferrableDeletionImpl(Wddm *wddm, const D3DKMT_HANDLE *handles, uint32_t allocationCount, D3DKMT_HANDLE resourceHandle, AllocationType type);
|
2018-11-29 18:20:02 +08:00
|
|
|
bool apply() override;
|
2022-05-10 01:40:30 +08:00
|
|
|
~DeferrableDeletionImpl() override;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
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;
|
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|