Always specify rootDeviceIndex for graphics memory allocations

Related-To: NEO-2941

Change-Id: Ia2362fd6b4e72ede02919152475f40b3edbc3658
Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
Igor Venevtsev
2019-11-07 14:15:04 +01:00
committed by sys_ocldev
parent 5f021afd6d
commit 63fd26f6d6
104 changed files with 526 additions and 431 deletions

View File

@@ -361,7 +361,7 @@ void Program::separateBlockKernels() {
allKernelInfos.clear();
}
void Program::allocateBlockPrivateSurfaces() {
void Program::allocateBlockPrivateSurfaces(uint32_t rootDeviceIndex) {
size_t blockCount = blockKernelManager->getCount();
for (uint32_t i = 0; i < blockCount; i++) {
@@ -372,7 +372,7 @@ void Program::allocateBlockPrivateSurfaces() {
if (privateSize > 0 && blockKernelManager->getPrivateSurface(i) == nullptr) {
privateSize *= getDevice(0).getDeviceInfo().computeUnitsUsedForScratch * info->getMaxSimdSize();
auto *privateSurface = this->executionEnvironment.memoryManager->allocateGraphicsMemoryWithProperties({privateSize, GraphicsAllocation::AllocationType::PRIVATE_SURFACE});
auto *privateSurface = this->executionEnvironment.memoryManager->allocateGraphicsMemoryWithProperties({rootDeviceIndex, privateSize, GraphicsAllocation::AllocationType::PRIVATE_SURFACE});
blockKernelManager->pushPrivateSurface(privateSurface, i);
}
}