I have a simple Win32 application performing some GPU computations with OpenCL and further displaying the results with OpenGL.
Given this OpenCL-OpenGL interop, how can I choose the right OpenCL platform and device? Meaning the platform and device corresponding to the currently active graphics card?
Calling EnumDisplayDevices would allow me to find a DeviceString for the active gpu device (by checking the DISPLAY_DEVICE_ACTIVE flag in StateFlags field), but this does not match the CL_DEVICE_NAME accesible through clGetDeviceInfo for a device. (In my case, DeviceString is “NVIDIA GeForce GTX 280” while CL_DEVICE_NAME returns “GeForce GTX 280”). Can I assume DeviceString always contains the vendor name before the device name?
Is there other solution than using platform specific calls?