Skip to content

Commit 19355ca

Browse files
kgibalaCompute-Runtime-Automation
authored andcommitted
createTagsMultiAllocation function cleanup
Related-To: NEO-5508 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
1 parent 69d5dd7 commit 19355ca

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

shared/source/command_stream/command_stream_receiver.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ void CommandStreamReceiver::setTagAllocation(GraphicsAllocation *allocation) {
284284
reinterpret_cast<uint8_t *>(allocation->getUnderlyingBuffer()) + debugPauseStateAddressOffset);
285285
}
286286

287-
MultiGraphicsAllocation &CommandStreamReceiver::createTagsMultiAllocation(ExecutionEnvironment &executionEnvironment, MemoryManager &memoryManager, uint32_t currentRootDeviceIndex) {
287+
MultiGraphicsAllocation &CommandStreamReceiver::createTagsMultiAllocation() {
288288
std::vector<uint32_t> rootDeviceIndices;
289289

290-
for (auto index = 0u; index < executionEnvironment.rootDeviceEnvironments.size(); index++) {
291-
if (executionEnvironment.rootDeviceEnvironments[index].get()->getHardwareInfo()->platform.eProductFamily ==
292-
executionEnvironment.rootDeviceEnvironments[currentRootDeviceIndex].get()->getHardwareInfo()->platform.eProductFamily) {
290+
for (auto index = 0u; index < this->executionEnvironment.rootDeviceEnvironments.size(); index++) {
291+
if (this->executionEnvironment.rootDeviceEnvironments[index].get()->getHardwareInfo()->platform.eProductFamily ==
292+
this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex].get()->getHardwareInfo()->platform.eProductFamily) {
293293
rootDeviceIndices.push_back(index);
294294
}
295295
}
@@ -299,7 +299,7 @@ MultiGraphicsAllocation &CommandStreamReceiver::createTagsMultiAllocation(Execut
299299

300300
AllocationProperties unifiedMemoryProperties{rootDeviceIndices.at(0), MemoryConstants::pageSize, GraphicsAllocation::AllocationType::TAG_BUFFER, systemMemoryBitfield};
301301

302-
memoryManager.createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices, unifiedMemoryProperties, *allocations);
302+
this->getMemoryManager()->createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices, unifiedMemoryProperties, *allocations);
303303
return *allocations;
304304
}
305305

@@ -496,7 +496,7 @@ void *CommandStreamReceiver::asyncDebugBreakConfirmation(void *arg) {
496496
}
497497

498498
bool CommandStreamReceiver::initializeTagAllocation() {
499-
this->tagsMultiAllocation = &this->createTagsMultiAllocation(this->executionEnvironment, *this->getMemoryManager(), rootDeviceIndex);
499+
this->tagsMultiAllocation = &this->createTagsMultiAllocation();
500500

501501
auto tagAllocation = tagsMultiAllocation->getGraphicsAllocation(rootDeviceIndex);
502502
if (!tagAllocation) {

shared/source/command_stream/command_stream_receiver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class CommandStreamReceiver {
116116
MultiGraphicsAllocation *getTagsMultiAllocation() const {
117117
return tagsMultiAllocation;
118118
}
119-
MultiGraphicsAllocation &createTagsMultiAllocation(ExecutionEnvironment &executionEnvironment, MemoryManager &memoryManager, uint32_t currentRootDeviceIndex);
119+
MultiGraphicsAllocation &createTagsMultiAllocation();
120120
MOCKABLE_VIRTUAL volatile uint32_t *getTagAddress() const { return tagAddress; }
121121
uint64_t getDebugPauseStateGPUAddress() const { return tagAllocation->getGpuAddress() + debugPauseStateAddressOffset; }
122122

0 commit comments

Comments
 (0)