createTagsMultiAllocation function cleanup

Related-To: NEO-5508
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2021-03-11 14:23:53 +00:00
committed by Compute-Runtime-Automation
parent 69d5dd7dd5
commit 19355ca088
2 changed files with 7 additions and 7 deletions

View File

@ -284,12 +284,12 @@ void CommandStreamReceiver::setTagAllocation(GraphicsAllocation *allocation) {
reinterpret_cast<uint8_t *>(allocation->getUnderlyingBuffer()) + debugPauseStateAddressOffset); reinterpret_cast<uint8_t *>(allocation->getUnderlyingBuffer()) + debugPauseStateAddressOffset);
} }
MultiGraphicsAllocation &CommandStreamReceiver::createTagsMultiAllocation(ExecutionEnvironment &executionEnvironment, MemoryManager &memoryManager, uint32_t currentRootDeviceIndex) { MultiGraphicsAllocation &CommandStreamReceiver::createTagsMultiAllocation() {
std::vector<uint32_t> rootDeviceIndices; std::vector<uint32_t> rootDeviceIndices;
for (auto index = 0u; index < executionEnvironment.rootDeviceEnvironments.size(); index++) { for (auto index = 0u; index < this->executionEnvironment.rootDeviceEnvironments.size(); index++) {
if (executionEnvironment.rootDeviceEnvironments[index].get()->getHardwareInfo()->platform.eProductFamily == if (this->executionEnvironment.rootDeviceEnvironments[index].get()->getHardwareInfo()->platform.eProductFamily ==
executionEnvironment.rootDeviceEnvironments[currentRootDeviceIndex].get()->getHardwareInfo()->platform.eProductFamily) { this->executionEnvironment.rootDeviceEnvironments[this->rootDeviceIndex].get()->getHardwareInfo()->platform.eProductFamily) {
rootDeviceIndices.push_back(index); rootDeviceIndices.push_back(index);
} }
} }
@ -299,7 +299,7 @@ MultiGraphicsAllocation &CommandStreamReceiver::createTagsMultiAllocation(Execut
AllocationProperties unifiedMemoryProperties{rootDeviceIndices.at(0), MemoryConstants::pageSize, GraphicsAllocation::AllocationType::TAG_BUFFER, systemMemoryBitfield}; AllocationProperties unifiedMemoryProperties{rootDeviceIndices.at(0), MemoryConstants::pageSize, GraphicsAllocation::AllocationType::TAG_BUFFER, systemMemoryBitfield};
memoryManager.createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices, unifiedMemoryProperties, *allocations); this->getMemoryManager()->createMultiGraphicsAllocationInSystemMemoryPool(rootDeviceIndices, unifiedMemoryProperties, *allocations);
return *allocations; return *allocations;
} }
@ -496,7 +496,7 @@ void *CommandStreamReceiver::asyncDebugBreakConfirmation(void *arg) {
} }
bool CommandStreamReceiver::initializeTagAllocation() { bool CommandStreamReceiver::initializeTagAllocation() {
this->tagsMultiAllocation = &this->createTagsMultiAllocation(this->executionEnvironment, *this->getMemoryManager(), rootDeviceIndex); this->tagsMultiAllocation = &this->createTagsMultiAllocation();
auto tagAllocation = tagsMultiAllocation->getGraphicsAllocation(rootDeviceIndex); auto tagAllocation = tagsMultiAllocation->getGraphicsAllocation(rootDeviceIndex);
if (!tagAllocation) { if (!tagAllocation) {

View File

@ -116,7 +116,7 @@ class CommandStreamReceiver {
MultiGraphicsAllocation *getTagsMultiAllocation() const { MultiGraphicsAllocation *getTagsMultiAllocation() const {
return tagsMultiAllocation; return tagsMultiAllocation;
} }
MultiGraphicsAllocation &createTagsMultiAllocation(ExecutionEnvironment &executionEnvironment, MemoryManager &memoryManager, uint32_t currentRootDeviceIndex); MultiGraphicsAllocation &createTagsMultiAllocation();
MOCKABLE_VIRTUAL volatile uint32_t *getTagAddress() const { return tagAddress; } MOCKABLE_VIRTUAL volatile uint32_t *getTagAddress() const { return tagAddress; }
uint64_t getDebugPauseStateGPUAddress() const { return tagAllocation->getGpuAddress() + debugPauseStateAddressOffset; } uint64_t getDebugPauseStateGPUAddress() const { return tagAllocation->getGpuAddress() + debugPauseStateAddressOffset; }