Skip to content

Commit 4f028d1

Browse files
Command stream receiver: use memory manager from execution environment
Change-Id: I236218a73bd7dac6e5744e3596f146b77b5ca1c8 Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 97c56b9 commit 4f028d1

File tree

47 files changed

+158
-256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+158
-256
lines changed

runtime/built_ins/builtins_dispatch_builder.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,12 @@ class BuiltinDispatchInfoBuilder {
8080
protected:
8181
template <typename KernelNameT, typename... KernelsDescArgsT>
8282
void grabKernels(KernelNameT &&kernelName, Kernel *&kernelDst, KernelsDescArgsT &&... kernelsDesc) {
83-
const KernelInfo *ki = prog->getKernelInfo(kernelName);
83+
const KernelInfo *kernelInfo = prog->getKernelInfo(kernelName);
84+
if (!kernelInfo) {
85+
return;
86+
}
8487
cl_int err = 0;
85-
kernelDst = Kernel::create(prog.get(), *ki, &err);
88+
kernelDst = Kernel::create(prog.get(), *kernelInfo, &err);
8689
kernelDst->isBuiltIn = true;
8790
usedKernels.push_back(std::unique_ptr<Kernel>(kernelDst));
8891
grabKernels(std::forward<KernelsDescArgsT>(kernelsDesc)...);

runtime/command_stream/aub_command_stream_receiver_hw.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
6969
void freeEngineInfoTable();
7070

7171
MemoryManager *createMemoryManager(bool enable64kbPages, bool enableLocalMemory) override {
72-
this->memoryManager = new OsAgnosticMemoryManager(enable64kbPages, enableLocalMemory, true, this->executionEnvironment);
73-
this->flatBatchBufferHelper->setMemoryManager(this->memoryManager);
74-
return this->memoryManager;
72+
return new OsAgnosticMemoryManager(enable64kbPages, enableLocalMemory, true, this->executionEnvironment);
7573
}
7674

7775
static const AubMemDump::LrcaHelper &getCsTraits(EngineType engineType);

runtime/command_stream/command_stream_receiver.cpp

+20-29
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ CommandStreamReceiver::~CommandStreamReceiver() {
4343
if (indirectHeap[i] != nullptr) {
4444
auto allocation = indirectHeap[i]->getGraphicsAllocation();
4545
if (allocation != nullptr) {
46-
memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
46+
getMemoryManager()->storeAllocation(std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
4747
}
4848
delete indirectHeap[i];
4949
}
@@ -119,7 +119,7 @@ void CommandStreamReceiver::makeResidentHostPtrAllocation(GraphicsAllocation *gf
119119

120120
void CommandStreamReceiver::waitForTaskCountAndCleanAllocationList(uint32_t requiredTaskCount, uint32_t allocationType) {
121121
auto address = getTagAddress();
122-
if (address && requiredTaskCount != (unsigned int)-1) {
122+
if (address && requiredTaskCount != ObjectNotUsed) {
123123
while (*address < requiredTaskCount)
124124
;
125125
}
@@ -131,21 +131,12 @@ void CommandStreamReceiver::waitForTaskCountAndCleanAllocationList(uint32_t requ
131131
getMemoryManager()->freeAllocationsList(requiredTaskCount, allocationList);
132132
}
133133

134-
MemoryManager *CommandStreamReceiver::getMemoryManager() {
135-
return memoryManager;
136-
}
137-
138-
void CommandStreamReceiver::setMemoryManager(MemoryManager *mm) {
139-
memoryManager = mm;
140-
if (flatBatchBufferHelper) {
141-
flatBatchBufferHelper->setMemoryManager(mm);
142-
}
134+
MemoryManager *CommandStreamReceiver::getMemoryManager() const {
135+
DEBUG_BREAK_IF(!executionEnvironment.memoryManager);
136+
return executionEnvironment.memoryManager.get();
143137
}
144138

145139
LinearStream &CommandStreamReceiver::getCS(size_t minRequiredSize) {
146-
auto memoryManager = this->getMemoryManager();
147-
DEBUG_BREAK_IF(nullptr == memoryManager);
148-
149140
if (commandStream.getAvailableSpace() < minRequiredSize) {
150141
// Make sure we have enough room for a MI_BATCH_BUFFER_END and any padding.
151142
// Currently reserving 64bytes (cacheline) which should be more than enough.
@@ -156,16 +147,16 @@ LinearStream &CommandStreamReceiver::getCS(size_t minRequiredSize) {
156147

157148
auto requiredSize = minRequiredSize + CSRequirements::csOverfetchSize;
158149

159-
auto allocation = memoryManager->obtainReusableAllocation(requiredSize, false).release();
150+
auto allocation = getMemoryManager()->obtainReusableAllocation(requiredSize, false).release();
160151
if (!allocation) {
161-
allocation = memoryManager->allocateGraphicsMemory(requiredSize);
152+
allocation = getMemoryManager()->allocateGraphicsMemory(requiredSize);
162153
}
163154

164155
allocation->setAllocationType(GraphicsAllocation::AllocationType::LINEAR_STREAM);
165156

166157
//pass current allocation to reusable list
167158
if (commandStream.getCpuBase()) {
168-
memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(commandStream.getGraphicsAllocation()), REUSABLE_ALLOCATION);
159+
getMemoryManager()->storeAllocation(std::unique_ptr<GraphicsAllocation>(commandStream.getGraphicsAllocation()), REUSABLE_ALLOCATION);
169160
}
170161

171162
commandStream.replaceBuffer(allocation->getUnderlyingBuffer(), minRequiredSize - sizeForSubmission);
@@ -176,30 +167,30 @@ LinearStream &CommandStreamReceiver::getCS(size_t minRequiredSize) {
176167
}
177168

178169
void CommandStreamReceiver::cleanupResources() {
179-
if (!memoryManager)
170+
if (!getMemoryManager())
180171
return;
181172

182173
waitForTaskCountAndCleanAllocationList(this->latestFlushedTaskCount, TEMPORARY_ALLOCATION);
183174
waitForTaskCountAndCleanAllocationList(this->latestFlushedTaskCount, REUSABLE_ALLOCATION);
184175

185176
if (scratchAllocation) {
186-
memoryManager->freeGraphicsMemory(scratchAllocation);
177+
getMemoryManager()->freeGraphicsMemory(scratchAllocation);
187178
scratchAllocation = nullptr;
188179
}
189180

190181
if (debugSurface) {
191-
memoryManager->freeGraphicsMemory(debugSurface);
182+
getMemoryManager()->freeGraphicsMemory(debugSurface);
192183
debugSurface = nullptr;
193184
}
194185

195186
if (commandStream.getCpuBase()) {
196-
memoryManager->freeGraphicsMemory(commandStream.getGraphicsAllocation());
187+
getMemoryManager()->freeGraphicsMemory(commandStream.getGraphicsAllocation());
197188
commandStream.replaceGraphicsAllocation(nullptr);
198189
commandStream.replaceBuffer(nullptr, 0);
199190
}
200191

201192
if (tagAllocation) {
202-
memoryManager->freeGraphicsMemory(tagAllocation);
193+
getMemoryManager()->freeGraphicsMemory(tagAllocation);
203194
tagAllocation = nullptr;
204195
tagAddress = nullptr;
205196
}
@@ -267,7 +258,7 @@ void CommandStreamReceiver::activateAubSubCapture(const MultiDispatchInfo &dispa
267258

268259
GraphicsAllocation *CommandStreamReceiver::allocateDebugSurface(size_t size) {
269260
UNRECOVERABLE_IF(debugSurface != nullptr);
270-
debugSurface = memoryManager->allocateGraphicsMemory(size);
261+
debugSurface = getMemoryManager()->allocateGraphicsMemory(size);
271262
return debugSurface;
272263
}
273264

@@ -281,7 +272,7 @@ IndirectHeap &CommandStreamReceiver::getIndirectHeap(IndirectHeap::Type heapType
281272
heapMemory = heap->getGraphicsAllocation();
282273

283274
if (heap && heap->getAvailableSpace() < minRequiredSize && heapMemory) {
284-
memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(heapMemory), REUSABLE_ALLOCATION);
275+
getMemoryManager()->storeAllocation(std::unique_ptr<GraphicsAllocation>(heapMemory), REUSABLE_ALLOCATION);
285276
heapMemory = nullptr;
286277
}
287278

@@ -309,13 +300,13 @@ void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
309300

310301
finalHeapSize = alignUp(std::max(finalHeapSize, minRequiredSize), MemoryConstants::pageSize);
311302

312-
auto heapMemory = memoryManager->obtainReusableAllocation(finalHeapSize, requireInternalHeap).release();
303+
auto heapMemory = getMemoryManager()->obtainReusableAllocation(finalHeapSize, requireInternalHeap).release();
313304

314305
if (!heapMemory) {
315306
if (requireInternalHeap) {
316-
heapMemory = memoryManager->allocate32BitGraphicsMemory(finalHeapSize, nullptr, AllocationOrigin::INTERNAL_ALLOCATION);
307+
heapMemory = getMemoryManager()->allocate32BitGraphicsMemory(finalHeapSize, nullptr, AllocationOrigin::INTERNAL_ALLOCATION);
317308
} else {
318-
heapMemory = memoryManager->allocateGraphicsMemory(finalHeapSize);
309+
heapMemory = getMemoryManager()->allocateGraphicsMemory(finalHeapSize);
319310
}
320311
} else {
321312
finalHeapSize = std::max(heapMemory->getUnderlyingBufferSize(), finalHeapSize);
@@ -344,7 +335,7 @@ void CommandStreamReceiver::releaseIndirectHeap(IndirectHeap::Type heapType) {
344335
if (heap) {
345336
auto heapMemory = heap->getGraphicsAllocation();
346337
if (heapMemory != nullptr)
347-
memoryManager->storeAllocation(std::unique_ptr<GraphicsAllocation>(heapMemory), REUSABLE_ALLOCATION);
338+
getMemoryManager()->storeAllocation(std::unique_ptr<GraphicsAllocation>(heapMemory), REUSABLE_ALLOCATION);
348339
heap->replaceBuffer(nullptr, 0);
349340
heap->replaceGraphicsAllocation(nullptr);
350341
}
@@ -355,7 +346,7 @@ void CommandStreamReceiver::setExperimentalCmdBuffer(std::unique_ptr<Experimenta
355346
}
356347

357348
bool CommandStreamReceiver::initializeTagAllocation() {
358-
auto tagAllocation = memoryManager->allocateGraphicsMemory(sizeof(uint32_t));
349+
auto tagAllocation = getMemoryManager()->allocateGraphicsMemory(sizeof(uint32_t));
359350
if (!tagAllocation) {
360351
return false;
361352
}

runtime/command_stream/command_stream_receiver.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ class CommandStreamReceiver {
7272

7373
virtual void addPipeControl(LinearStream &commandStream, bool dcFlush) = 0;
7474

75-
MemoryManager *getMemoryManager();
75+
MemoryManager *getMemoryManager() const;
7676
virtual MemoryManager *createMemoryManager(bool enable64kbPages, bool enableLocalMemory) { return nullptr; }
77-
void setMemoryManager(MemoryManager *mm);
7877

7978
ResidencyContainer &getResidencyAllocations();
8079
ResidencyContainer &getEvictionAllocations();
@@ -193,8 +192,6 @@ class CommandStreamReceiver {
193192
GraphicsAllocation *scratchAllocation = nullptr;
194193
GraphicsAllocation *preemptionCsrAllocation = nullptr;
195194
GraphicsAllocation *debugSurface = nullptr;
196-
197-
MemoryManager *memoryManager = nullptr;
198195
OSInterface *osInterface = nullptr;
199196
std::unique_ptr<SubmissionAggregator> submissionAggregator;
200197

runtime/command_stream/command_stream_receiver_hw.inl

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(const HardwareInfo &
3838
localMemoryEnabled(HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily).isLocalMemoryEnabled(hwInfo)) {
3939
requiredThreadArbitrationPolicy = PreambleHelper<GfxFamily>::getDefaultThreadArbitrationPolicy();
4040
resetKmdNotifyHelper(new KmdNotifyHelper(&(hwInfoIn.capabilityTable.kmdNotifyProperties)));
41-
flatBatchBufferHelper.reset(new FlatBatchBufferHelperHw<GfxFamily>(this->memoryManager));
41+
flatBatchBufferHelper.reset(new FlatBatchBufferHelperHw<GfxFamily>(executionEnvironment));
4242
defaultSshSize = getSshHeapSize();
4343
}
4444

@@ -303,7 +303,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
303303
if (is64bit && scratchAllocation && !force32BitAllocations) {
304304
newGSHbase = (uint64_t)scratchAllocation->getUnderlyingBuffer() - PreambleHelper<GfxFamily>::getScratchSpaceOffsetFor64bit();
305305
} else if (is64bit && force32BitAllocations && dispatchFlags.GSBA32BitRequired) {
306-
newGSHbase = memoryManager->allocator32Bit->getBase();
306+
newGSHbase = getMemoryManager()->allocator32Bit->getBase();
307307
GSBAFor32BitProgrammed = true;
308308
}
309309

@@ -316,7 +316,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
316316
ssh,
317317
newGSHbase,
318318
requiredL3Index,
319-
memoryManager->getInternalHeapBaseAddress(),
319+
getMemoryManager()->getInternalHeapBaseAddress(),
320320
device.getGmmHelper());
321321

322322
if (sshDirty) {

runtime/command_stream/command_stream_receiver_with_aub_dump.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace OCLRT {
1313
template <typename BaseCSR>
1414
class CommandStreamReceiverWithAUBDump : public BaseCSR {
1515
public:
16+
using BaseCSR::createMemoryManager;
1617
CommandStreamReceiverWithAUBDump(const HardwareInfo &hwInfoIn, ExecutionEnvironment &executionEnvironment);
1718
~CommandStreamReceiverWithAUBDump() override;
1819

@@ -24,8 +25,6 @@ class CommandStreamReceiverWithAUBDump : public BaseCSR {
2425

2526
void activateAubSubCapture(const MultiDispatchInfo &dispatchInfo) override;
2627

27-
MemoryManager *createMemoryManager(bool enable64kbPages, bool enableLocalMemory) override;
28-
2928
CommandStreamReceiver *aubCSR = nullptr;
3029
};
3130

runtime/command_stream/command_stream_receiver_with_aub_dump.inl

-9
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,4 @@ void CommandStreamReceiverWithAUBDump<BaseCSR>::activateAubSubCapture(const Mult
5050
}
5151
}
5252

53-
template <typename BaseCSR>
54-
MemoryManager *CommandStreamReceiverWithAUBDump<BaseCSR>::createMemoryManager(bool enable64kbPages, bool enableLocalMemory) {
55-
auto memoryManager = BaseCSR::createMemoryManager(enable64kbPages, enableLocalMemory);
56-
if (aubCSR) {
57-
aubCSR->setMemoryManager(memoryManager);
58-
}
59-
return memoryManager;
60-
}
61-
6253
} // namespace OCLRT

runtime/command_stream/experimental_command_buffer.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,12 @@ ExperimentalCommandBuffer::~ExperimentalCommandBuffer() {
3737
timestamp += 2;
3838
}
3939
MemoryManager *memoryManager = commandStreamReceiver->getMemoryManager();
40-
if (memoryManager) {
41-
memoryManager->freeGraphicsMemory(timestamps);
42-
memoryManager->freeGraphicsMemory(experimentalAllocation);
40+
memoryManager->freeGraphicsMemory(timestamps);
41+
memoryManager->freeGraphicsMemory(experimentalAllocation);
4342

44-
if (currentStream.get()) {
45-
memoryManager->freeGraphicsMemory(currentStream->getGraphicsAllocation());
46-
currentStream->replaceGraphicsAllocation(nullptr);
47-
}
43+
if (currentStream.get()) {
44+
memoryManager->freeGraphicsMemory(currentStream->getGraphicsAllocation());
45+
currentStream->replaceGraphicsAllocation(nullptr);
4846
}
4947
}
5048

runtime/command_stream/tbx_command_stream_receiver_hw.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
2828
typedef CommandStreamReceiverSimulatedHw<GfxFamily> BaseClass;
2929
typedef typename OCLRT::AUBFamilyMapper<GfxFamily>::AUB AUB;
3030
typedef typename AUB::MiContextDescriptorReg MiContextDescriptorReg;
31-
using CommandStreamReceiverHw<GfxFamily>::memoryManager;
3231

3332
public:
3433
FlushStamp flush(BatchBuffer &batchBuffer, EngineType engineType, ResidencyContainer &allocationsForResidency, OsContext &osContext) override;
@@ -65,8 +64,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
6564
} engineInfoTable[EngineType::NUM_ENGINES];
6665

6766
MemoryManager *createMemoryManager(bool enable64kbPages, bool enableLocalMemory) override {
68-
memoryManager = new TbxMemoryManager(enable64kbPages, enableLocalMemory, this->executionEnvironment);
69-
return memoryManager;
67+
return new TbxMemoryManager(enable64kbPages, enableLocalMemory, this->executionEnvironment);
7068
}
7169
TbxMemoryManager *getMemoryManager() {
7270
return (TbxMemoryManager *)CommandStreamReceiver::getMemoryManager();

runtime/execution_environment/execution_environment.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,10 @@ bool ExecutionEnvironment::initializeCommandStreamReceiver(const HardwareInfo *p
5454
}
5555
void ExecutionEnvironment::initializeMemoryManager(bool enable64KBpages, bool enableLocalMemory, uint32_t deviceIndex) {
5656
if (this->memoryManager) {
57-
commandStreamReceivers[deviceIndex]->setMemoryManager(this->memoryManager.get());
5857
return;
5958
}
6059

6160
memoryManager.reset(commandStreamReceivers[deviceIndex]->createMemoryManager(enable64KBpages, enableLocalMemory));
62-
commandStreamReceivers[deviceIndex]->setMemoryManager(memoryManager.get());
6361
DEBUG_BREAK_IF(!this->memoryManager);
6462
}
6563
void ExecutionEnvironment::initSourceLevelDebugger(const HardwareInfo &hwInfo) {

runtime/helpers/flat_batch_buffer_helper.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
*/
77

8+
#include "runtime/execution_environment/execution_environment.h"
89
#include "runtime/helpers/flat_batch_buffer_helper.h"
910
#include "runtime/memory_manager/graphics_allocation.h"
1011

@@ -61,4 +62,8 @@ void FlatBatchBufferHelper::fixCrossThreadDataInfo(std::vector<PatchInfoData> &d
6162
}
6263
}
6364
}
65+
66+
MemoryManager *FlatBatchBufferHelper::getMemoryManager() const {
67+
return executionEnvironemnt.memoryManager.get();
68+
}
6469
}; // namespace OCLRT

runtime/helpers/flat_batch_buffer_helper.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ namespace OCLRT {
1616

1717
enum class DispatchMode;
1818
class MemoryManager;
19+
class ExecutionEnvironment;
1920

2021
class FlatBatchBufferHelper {
2122
public:
22-
FlatBatchBufferHelper(MemoryManager *memoryManager) : memoryManager(memoryManager) {}
23+
FlatBatchBufferHelper(ExecutionEnvironment &executionEnvironemnt) : executionEnvironemnt(executionEnvironemnt) {}
2324
virtual ~FlatBatchBufferHelper(){};
2425
MOCKABLE_VIRTUAL bool setPatchInfoData(const PatchInfoData &data);
2526
MOCKABLE_VIRTUAL bool removePatchInfoData(uint64_t targetLocation);
@@ -30,15 +31,15 @@ class FlatBatchBufferHelper {
3031
virtual GraphicsAllocation *flattenBatchBuffer(BatchBuffer &batchBuffer, size_t &sizeBatchBuffer, DispatchMode dispatchMode) = 0;
3132
virtual char *getIndirectPatchCommands(size_t &indirectPatchCommandsSize, std::vector<PatchInfoData> &indirectPatchInfo) = 0;
3233
virtual void removePipeControlData(size_t pipeControlLocationSize, void *pipeControlForNooping) = 0;
33-
void setMemoryManager(MemoryManager *memoryManager) { this->memoryManager = memoryManager; }
3434
static void fixCrossThreadDataInfo(std::vector<PatchInfoData> &data, size_t offsetCrossThreadData, uint64_t gpuAddress);
3535

3636
std::vector<CommandChunk> &getCommandChunkList() { return commandChunkList; }
3737
std::vector<PatchInfoData> &getPatchInfoCollection() { return patchInfoCollection; }
3838
std::map<uint64_t, uint64_t> &getBatchBufferStartAddressSequence() { return batchBufferStartAddressSequence; }
3939

4040
protected:
41-
MemoryManager *memoryManager = nullptr;
41+
MemoryManager *getMemoryManager() const;
42+
ExecutionEnvironment &executionEnvironemnt;
4243

4344
std::vector<PatchInfoData> patchInfoCollection;
4445
std::vector<CommandChunk> commandChunkList;

runtime/helpers/flat_batch_buffer_helper_hw.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace OCLRT {
1414
template <typename GfxFamily>
1515
class FlatBatchBufferHelperHw : public FlatBatchBufferHelper {
1616
public:
17-
FlatBatchBufferHelperHw(MemoryManager *memoryManager) : FlatBatchBufferHelper(memoryManager) {}
17+
using FlatBatchBufferHelper::FlatBatchBufferHelper;
1818
GraphicsAllocation *flattenBatchBuffer(BatchBuffer &batchBuffer, size_t &sizeBatchBuffer, DispatchMode dispatchMode) override;
1919
char *getIndirectPatchCommands(size_t &indirectPatchCommandsSize, std::vector<PatchInfoData> &indirectPatchInfo) override;
2020
void removePipeControlData(size_t pipeControlLocationSize, void *pipeControlForNooping) override;

runtime/helpers/flat_batch_buffer_helper_hw.inl

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ GraphicsAllocation *FlatBatchBufferHelperHw<GfxFamily>::flattenBatchBuffer(Batch
3333

3434
auto flatBatchBufferSize = alignUp(sizeMainBatchBuffer + indirectPatchCommandsSize + batchBuffer.chainedBatchBuffer->getUnderlyingBufferSize(), MemoryConstants::pageSize);
3535
flatBatchBuffer =
36-
this->memoryManager->allocateGraphicsMemory(flatBatchBufferSize, MemoryConstants::pageSize, false, false);
36+
getMemoryManager()->allocateGraphicsMemory(flatBatchBufferSize, MemoryConstants::pageSize, false, false);
3737
UNRECOVERABLE_IF(flatBatchBuffer == nullptr);
3838
// Copy main batchbuffer
3939
memcpy_s(flatBatchBuffer->getUnderlyingBuffer(), sizeMainBatchBuffer,
@@ -108,8 +108,8 @@ GraphicsAllocation *FlatBatchBufferHelperHw<GfxFamily>::flattenBatchBuffer(Batch
108108

109109
flatBatchBufferSize = alignUp(flatBatchBufferSize, MemoryConstants::pageSize);
110110
flatBatchBufferSize += CSRequirements::csOverfetchSize;
111-
flatBatchBuffer = this->memoryManager->allocateGraphicsMemory(static_cast<size_t>(flatBatchBufferSize),
112-
MemoryConstants::pageSize, false, false);
111+
flatBatchBuffer = getMemoryManager()->allocateGraphicsMemory(static_cast<size_t>(flatBatchBufferSize),
112+
MemoryConstants::pageSize, false, false);
113113
UNRECOVERABLE_IF(flatBatchBuffer == nullptr);
114114

115115
char *ptr = reinterpret_cast<char *>(flatBatchBuffer->getUnderlyingBuffer());

runtime/os_interface/linux/drm_command_stream.h

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ class DrmCommandStreamReceiver : public DeviceCommandStreamReceiver<GfxFamily> {
2222
protected:
2323
typedef DeviceCommandStreamReceiver<GfxFamily> BaseClass;
2424
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::getTagAddress;
25-
using CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiver::memoryManager;
2625
using BaseClass::getScratchPatchAddress;
2726
using BaseClass::hwInfo;
2827
using BaseClass::makeNonResident;

0 commit comments

Comments
 (0)