Remove device index from command stream receiver

Change-Id: Ia84b0cb8e03260ec940ee0b175b12693e528b8aa
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-09-30 11:33:52 +02:00
committed by sys_ocldev
parent 99e4928743
commit 8410bd6e18
12 changed files with 22 additions and 24 deletions

View File

@@ -126,7 +126,7 @@ void CommandStreamReceiver::ensureCommandBufferAllocation(LinearStream &commandS
auto allocation = this->getInternalAllocationStorage()->obtainReusableAllocation(allocationSize, allocationType).release();
if (allocation == nullptr) {
const AllocationProperties commandStreamAllocationProperties{true, allocationSize, allocationType,
isMultiOsContextCapable(), getDeviceIndexForAllocation()};
isMultiOsContextCapable(), getDeviceIndex()};
allocation = this->getMemoryManager()->allocateGraphicsMemoryWithProperties(commandStreamAllocationProperties);
}
DEBUG_BREAK_IF(allocation == nullptr);
@@ -297,7 +297,7 @@ IndirectHeap &CommandStreamReceiver::getIndirectHeap(IndirectHeap::Type heapType
return *heap;
}
uint32_t CommandStreamReceiver::getDeviceIndexForAllocation() const {
uint32_t CommandStreamReceiver::getDeviceIndex() const {
return osContext->getDeviceBitfield().any() ? static_cast<uint32_t>(Math::log2(static_cast<uint32_t>(osContext->getDeviceBitfield().to_ulong()))) : 0u;
}
@@ -325,7 +325,7 @@ void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
if (!heapMemory) {
heapMemory = getMemoryManager()->allocateGraphicsMemoryWithProperties({true, finalHeapSize, allocationType,
isMultiOsContextCapable(), getDeviceIndexForAllocation()});
isMultiOsContextCapable(), getDeviceIndex()});
} else {
finalHeapSize = std::max(heapMemory->getUnderlyingBufferSize(), finalHeapSize);
}