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