Change alignment for forced created ptr in image

Related-To: NEO-5723
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2021-04-27 10:21:32 +00:00
committed by Compute-Runtime-Automation
parent 5f41e00909
commit df1162ff4d
2 changed files with 11 additions and 2 deletions

View File

@@ -344,8 +344,8 @@ Image *Image::create(Context *context,
const_cast<MemoryProperties &>(memoryPropertiesToSet), hwInfo,
context->getDeviceBitfieldForAllocation(rootDeviceIndex));
allocProperties.flags.crossRootDeviceAccess = true;
hostPtrForced = alignedMalloc(hostPtrMinSize, MemoryConstants::pageSize64k);
auto hostPtrForcedSize = alignUp(hostPtrMinSize, MemoryConstants::pageSize);
hostPtrForced = alignedMalloc(hostPtrForcedSize, MemoryConstants::pageSize);
allocationInfo[rootDeviceIndex].memory = memoryManager->allocateGraphicsMemoryWithProperties(allocProperties, hostPtrForced);
if (allocationInfo[rootDeviceIndex].memory) {
cpuPtr = reinterpret_cast<void *>(allocationInfo[rootDeviceIndex].memory->getUnderlyingBuffer());