P4 to Git Change 1352814 by gandryey@gera-w8 on 2016/12/13 18:06:15

SWDEV-109407 - 2nd OCL 2.0 Default Device Queue Creation Does Not Set errcode_ret
	- Return CL_SUCCESS for the second call on the Default Device Queue creation

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_command.cpp#12 edit


[ROCm/clr commit: dcb7c06585]
This commit is contained in:
foreman
2016-12-13 18:11:13 -05:00
parent b0be4f1dae
commit 46596acfa7
@@ -103,8 +103,8 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
case CL_QUEUE_REAL_TIME_COMPUTE_UNITS_AMD:
queueRTCUs = p->value.size;
break;
#define CL_QUEUE_MEDIUM_PRIORITY 0x4050
case CL_QUEUE_MEDIUM_PRIORITY:
#define CL_QUEUE_MEDIUM_PRIORITY_AMD 0x4050
case CL_QUEUE_MEDIUM_PRIORITY_AMD:
priority = amd::CommandQueue::Priority::Medium;
break;
default:
@@ -138,9 +138,10 @@ RUNTIME_ENTRY_RET(cl_command_queue, clCreateCommandQueueWithProperties, (
// Is it a device default queue
if (properties & CL_QUEUE_ON_DEVICE_DEFAULT) {
queue = amdContext.defDeviceQueue(amdDevice);
// If current context has one already then retunr it
// If current context has one already then return it
if (NULL != queue) {
queue->retain();
*not_null(errcode_ret) = CL_SUCCESS;
return as_cl(queue);
}
}