From 1fe9918576694d26b04d176a16c76e898a86f111 Mon Sep 17 00:00:00 2001 From: Victor Zhang Date: Mon, 19 Dec 2022 23:21:37 -0500 Subject: [PATCH] SWDEV-110636 - added if statement so that output of clBuildProgram follows opencl specification Change-Id: I4ee000008c52a0bbdb47e94a8e1b5faf28c3bfe6 --- opencl/amdocl/cl_program.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opencl/amdocl/cl_program.cpp b/opencl/amdocl/cl_program.cpp index eb380320f5..6ad7ab364d 100644 --- a/opencl/amdocl/cl_program.cpp +++ b/opencl/amdocl/cl_program.cpp @@ -500,6 +500,9 @@ RUNTIME_ENTRY(cl_int, clBuildProgram, if ((num_devices > 0 && device_list == NULL) || (num_devices == 0 && device_list != NULL)) { return CL_INVALID_VALUE; } + if (pfn_notify == nullptr && user_data != nullptr) { + return CL_INVALID_VALUE; + } amd::Program* amdProgram = as_amd(program);