mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
GTPinFree to check for buffer in shared memory
Related-To: NEO-5667 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
52308244a6
commit
2f4f5a22ae
@@ -53,7 +53,8 @@ GTPIN_DI_STATUS GTPIN_DRIVER_CALLCONV gtpinFreeBuffer(context_handle_t context,
|
||||
if ((pContext == nullptr) || (resource == nullptr)) {
|
||||
return GTPIN_DI_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
if (pContext->getMemoryManager()->isLocalMemorySupported(pContext->getDevice(0)->getRootDeviceIndex())) {
|
||||
GTPinHwHelper >pinHelper = GTPinHwHelper::get(pContext->getDevice(0)->getHardwareInfo().platform.eRenderCoreFamily);
|
||||
if (gtpinHelper.canUseSharedAllocation(pContext->getDevice(0)->getHardwareInfo())) {
|
||||
auto allocData = reinterpret_cast<SvmAllocationData *>(resource);
|
||||
clMemFreeINTEL(pContext, allocData->cpuAllocation->getUnderlyingBuffer());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user