fix: return error code when set arg for local argument has size zero

Related-To: NEO-16450
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2025-10-17 14:30:28 +00:00
committed by Compute-Runtime-Automation
parent 645fc3d8af
commit a503776008
2 changed files with 17 additions and 0 deletions

View File

@@ -1391,6 +1391,10 @@ void Kernel::getResidency(std::vector<Surface *> &dst) {
cl_int Kernel::setArgLocal(uint32_t argIndexIn,
size_t argSize,
const void *argVal) {
if (argSize == 0u) {
return CL_INVALID_ARG_SIZE;
}
storeKernelArg(argIndexIn, SLM_OBJ, nullptr, argVal, argSize);
uint32_t *crossThreadData = reinterpret_cast<uint32_t *>(this->crossThreadData);
uint32_t argIndex = argIndexIn;