2018-10-09 17:50:58 +08:00
|
|
|
/*
|
2020-01-21 18:00:03 +08:00
|
|
|
* Copyright (C) 2018-2020 Intel Corporation
|
2018-10-09 17:50:58 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/memory_manager/graphics_allocation.h"
|
2020-06-10 17:49:34 +08:00
|
|
|
#include "shared/source/memory_manager/memory_manager.h"
|
2018-10-09 17:50:58 +08:00
|
|
|
|
2019-09-17 23:11:10 +08:00
|
|
|
#include <mutex>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2018-11-02 17:01:56 +08:00
|
|
|
class CommandStreamReceiver;
|
2018-10-09 17:50:58 +08:00
|
|
|
|
|
|
|
class AllocationsList : public IDList<GraphicsAllocation, true, true> {
|
|
|
|
public:
|
2020-06-10 17:49:34 +08:00
|
|
|
AllocationsList(AllocationUsage allocationUsage);
|
2020-04-15 19:39:09 +08:00
|
|
|
std::unique_ptr<GraphicsAllocation> detachAllocation(size_t requiredMinimalSize, const void *requiredPtr, CommandStreamReceiver &commandStreamReceiver, GraphicsAllocation::AllocationType allocationType);
|
2018-10-09 17:50:58 +08:00
|
|
|
|
|
|
|
private:
|
|
|
|
GraphicsAllocation *detachAllocationImpl(GraphicsAllocation *, void *);
|
2020-06-10 17:49:34 +08:00
|
|
|
|
|
|
|
const AllocationUsage allocationUsage;
|
2018-10-09 17:50:58 +08:00
|
|
|
};
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|