fix(ocl): Remove unneeded cast from ClCreateContextFromType API call

Remove not needed c-style cl_context handle casting on
clCreateContextFromType API call. This bug is currently also visible
when using OCL tracing API.
Related-To: NEO-8011
Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak
2023-06-19 09:47:34 +00:00
committed by Compute-Runtime-Automation
parent 313fb84fda
commit 1fc435e529
2 changed files with 63 additions and 4 deletions

View File

@@ -457,7 +457,7 @@ cl_context CL_API_CALL clCreateContextFromType(const cl_context_properties *prop
cl_int retVal = CL_SUCCESS;
API_ENTER(&retVal);
DBG_LOG_INPUTS("properties", properties, "deviceType", deviceType, "funcNotify", funcNotify, "userData", userData);
Context *pContext = nullptr;
cl_context context = nullptr;
do {
if (funcNotify == nullptr && userData != nullptr) {
@@ -482,14 +482,14 @@ cl_context CL_API_CALL clCreateContextFromType(const cl_context_properties *prop
DEBUG_BREAK_IF(retVal != CL_SUCCESS);
ClDeviceVector deviceVector(&device, 1);
pContext = Context::create<Context>(properties, deviceVector, funcNotify, userData, retVal);
context = Context::create<Context>(properties, deviceVector, funcNotify, userData, retVal);
} while (false);
if (errcodeRet) {
*errcodeRet = retVal;
}
TRACING_EXIT(ClCreateContextFromType, (cl_context *)&pContext);
return pContext;
TRACING_EXIT(ClCreateContextFromType, &context);
return context;
}
cl_int CL_API_CALL clRetainContext(cl_context context) {