aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2015-07-24 22:00:16 +0000
committerGil Pitney <gil.pitney@linaro.org>2015-07-24 22:14:16 +0000
commit47632c5fa094d743c5f1af8660b0532bf682f7f6 (patch)
tree76a4582c17c69ac9a95c70e7f614ab38445f9ed7
parent7d61b47c061f96189bfd073a5abc02a73bff6dda (diff)
downloadshamrock-47632c5fa094d743c5f1af8660b0532bf682f7f6.tar.gz
Return correct platform id for CPUDevice in call to clGetDeviceInfo()
Previously, this was returning zero! This allows the Khronos tests: % test_api create_context_from_type % test_api platform_extensions to PASS. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r--src/core/cpu/device.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/cpu/device.cpp b/src/core/cpu/device.cpp
index 3d16100..e88b8eb 100644
--- a/src/core/cpu/device.cpp
+++ b/src/core/cpu/device.cpp
@@ -30,6 +30,7 @@
* \brief CPU Device
*/
+#include "../platform.h"
#include "device.h"
#include "buffer.h"
#include "kernel.h"
@@ -704,7 +705,7 @@ cl_int CPUDevice::info(cl_device_info param_name,
break;
case CL_DEVICE_PLATFORM:
- SIMPLE_ASSIGN(cl_platform_id, 0);
+ SIMPLE_ASSIGN(cl_platform_id, &the_platform);
break;
case CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF: