fix: set proper allocation in MemObj::getMemObjectInfo

Related-To: NEO-12585
Signed-off-by: Jaroslaw Warchulski <jaroslaw.warchulski@intel.com>
This commit is contained in:
Jaroslaw Warchulski
2025-03-24 11:42:27 +00:00
committed by Compute-Runtime-Automation
parent 0ef02062c0
commit 0650b96999
3 changed files with 44 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -134,7 +134,8 @@ cl_int MemObj::getMemObjectInfo(cl_mem_info paramName,
cl_mem clAssociatedMemObject = static_cast<cl_mem>(this->associatedMemObject);
cl_context ctx = nullptr;
uint64_t internalHandle = 0llu;
auto allocation = getMultiGraphicsAllocation().getDefaultGraphicsAllocation();
auto rootDeviceIndex = context->getDevice(0)->getRootDeviceIndex();
auto allocation = multiGraphicsAllocation.getGraphicsAllocation(rootDeviceIndex);
cl_bool usesCompression;
switch (paramName) {
@@ -204,7 +205,7 @@ cl_int MemObj::getMemObjectInfo(cl_mem_info paramName,
break;
case CL_MEM_ALLOCATION_HANDLE_INTEL: {
auto retVal = multiGraphicsAllocation.getDefaultGraphicsAllocation()->peekInternalHandle(this->memoryManager, internalHandle);
auto retVal = allocation->peekInternalHandle(this->memoryManager, internalHandle);
if (retVal != 0) {
return CL_OUT_OF_RESOURCES;
}