mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Return INVALID_ARGUMENT for system-allocated pointers in kernelSetArg
Change-Id: I5ad50f8d60c5a54aedf24484a65400352ec855df Signed-off: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
851e894ab6
commit
59da9598aa
@@ -487,6 +487,9 @@ ze_result_t KernelImp::setArgBuffer(uint32_t argIndex, size_t argSize, const voi
|
||||
|
||||
auto requestedAddress = *reinterpret_cast<void *const *>(argVal);
|
||||
auto svmAllocsManager = module->getDevice()->getDriverHandle()->getSvmAllocsManager();
|
||||
if (nullptr == svmAllocsManager->getSVMAlloc(requestedAddress)) {
|
||||
return ZE_RESULT_ERROR_INVALID_ARGUMENT;
|
||||
}
|
||||
NEO::GraphicsAllocation *alloc = svmAllocsManager->getSVMAlloc(requestedAddress)->gpuAllocation;
|
||||
auto gpuAddress = reinterpret_cast<uintptr_t>(requestedAddress);
|
||||
return setArgBufferWithAlloc(argIndex, gpuAddress, alloc);
|
||||
|
||||
Reference in New Issue
Block a user