mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
createTagsMultiAllocation function cleanup
Related-To: NEO-5508 Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
69d5dd7dd5
commit
19355ca088
@ -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) {
|
||||||
|
@ -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; }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user