From 49a49e0742dde4aa6d0c870d795a480425e85f52 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 16 Sep 2013 18:26:04 -0700 Subject: clover: Switch platform objects to the new model. Tested-by: Tom Stellard --- src/gallium/state_trackers/clover/api/device.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gallium/state_trackers/clover/api/device.cpp') diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 495ac41f17e..9800779e81a 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++ b/src/gallium/state_trackers/clover/api/device.cpp @@ -27,9 +27,10 @@ using namespace clover; PUBLIC cl_int -clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type, +clGetDeviceIDs(cl_platform_id d_platform, cl_device_type device_type, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices) { + auto &platform = obj(d_platform); std::vector devs; if ((!num_entries && devices) || @@ -37,9 +38,9 @@ clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type, return CL_INVALID_VALUE; // Collect matching devices - for (device &dev : *platform) { + for (device &dev : platform) { if (((device_type & CL_DEVICE_TYPE_DEFAULT) && - &dev == &platform->front()) || + &dev == &platform.front()) || (device_type & dev.type())) devs.push_back(&dev); } @@ -254,7 +255,7 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param, break; case CL_DEVICE_PLATFORM: - buf.as_scalar() = &dev->platform; + buf.as_scalar() = desc(dev->platform); break; case CL_DEVICE_HOST_UNIFIED_MEMORY: -- cgit v1.2.3