From 46596acfa7ab8db6379b84e50e7d37cd8c8c7ef9 Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 13 Dec 2016 18:11:13 -0500
Subject: [PATCH] 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: dcb7c0658513eb304adaae0aca0d96ad3ea7d4d6]
---
projects/clr/opencl/api/opencl/amdocl/cl_command.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_command.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_command.cpp
index 0c80c83622..4f1fb20938 100644
--- a/projects/clr/opencl/api/opencl/amdocl/cl_command.cpp
+++ b/projects/clr/opencl/api/opencl/amdocl/cl_command.cpp
@@ -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);
}
}