From e3cecdef8cc6ab0ee616f4e4f5380ce9277c0f4e Mon Sep 17 00:00:00 2001 From: Gil Pitney Date: Tue, 29 Sep 2015 21:55:53 +0000 Subject: ICD: Update Platform and DeviceInterface objects to be ICD compatible. Use the ICD templates to: a) Embed the dispatch table pointer into the object; and b) Convert between OpenCL API objects and their internal Coal namespace representations. This involved explicitly up/down casting whereever there was an explicit or implicit cast between a cl_ type and a Coal:: type. This was validated by running the sanity tests, and the Khronos conformance tests without an ICD loader; then installing the Khronos ICD loader, and running that subset of conformance tests that would just invoke Platform and Device APIs. Signed-off-by: Gil Pitney --- src/core/commandqueue.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/commandqueue.cpp') diff --git a/src/core/commandqueue.cpp b/src/core/commandqueue.cpp index ae5c526..ab1d677 100644 --- a/src/core/commandqueue.cpp +++ b/src/core/commandqueue.cpp @@ -112,9 +112,11 @@ cl_int CommandQueue::info(cl_command_queue_info param_name, break; case CL_QUEUE_DEVICE: - SIMPLE_ASSIGN(cl_device_id, p_device); + { + auto d_device = desc(p_device); + SIMPLE_ASSIGN(cl_device_id, d_device); + } break; - case CL_QUEUE_REFERENCE_COUNT: SIMPLE_ASSIGN(cl_uint, references()); break; -- cgit v1.2.3