|
26 | 26 | #include "runtime/mem_obj/buffer.h" |
27 | 27 | #include "runtime/mem_obj/image.h" |
28 | 28 | #include "runtime/helpers/surface_formats.h" |
29 | | -#include "runtime/memory_manager/memory_manager.h" |
| 29 | +#include "runtime/memory_manager/internal_allocation_storage.h" |
30 | 30 | #include "runtime/helpers/string.h" |
31 | 31 | #include "CL/cl_ext.h" |
32 | 32 | #include "runtime/utilities/api_intercept.h" |
@@ -91,11 +91,10 @@ CommandQueue::~CommandQueue() { |
91 | 91 | } |
92 | 92 |
|
93 | 93 | if (device) { |
94 | | - auto memoryManager = device->getMemoryManager(); |
95 | | - DEBUG_BREAK_IF(nullptr == memoryManager); |
| 94 | + auto storageForAllocation = device->getCommandStreamReceiver().getInternalAllocationStorage(); |
96 | 95 |
|
97 | 96 | if (commandStream && commandStream->getGraphicsAllocation()) { |
98 | | - memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(commandStream->getGraphicsAllocation()), REUSABLE_ALLOCATION); |
| 97 | + storageForAllocation->storeAllocation(std::unique_ptr<GraphicsAllocation>(commandStream->getGraphicsAllocation()), REUSABLE_ALLOCATION); |
99 | 98 | commandStream->replaceGraphicsAllocation(nullptr); |
100 | 99 | } |
101 | 100 | delete commandStream; |
@@ -198,6 +197,7 @@ uint32_t CommandQueue::getTaskLevelFromWaitList(uint32_t taskLevel, |
198 | 197 | LinearStream &CommandQueue::getCS(size_t minRequiredSize) { |
199 | 198 | DEBUG_BREAK_IF(nullptr == device); |
200 | 199 | auto &commandStreamReceiver = device->getCommandStreamReceiver(); |
| 200 | + auto storageForAllocation = commandStreamReceiver.getInternalAllocationStorage(); |
201 | 201 | auto memoryManager = commandStreamReceiver.getMemoryManager(); |
202 | 202 | DEBUG_BREAK_IF(nullptr == memoryManager); |
203 | 203 |
|
@@ -226,7 +226,7 @@ LinearStream &CommandQueue::getCS(size_t minRequiredSize) { |
226 | 226 | auto oldAllocation = commandStream->getGraphicsAllocation(); |
227 | 227 |
|
228 | 228 | if (oldAllocation) { |
229 | | - memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(oldAllocation), REUSABLE_ALLOCATION); |
| 229 | + storageForAllocation->storeAllocation(std::unique_ptr<GraphicsAllocation>(oldAllocation), REUSABLE_ALLOCATION); |
230 | 230 | } |
231 | 231 | commandStream->replaceBuffer(allocation->getUnderlyingBuffer(), minRequiredSize - CSRequirements::minCommandQueueCommandStreamSize); |
232 | 232 | commandStream->replaceGraphicsAllocation(allocation); |
|
0 commit comments