summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorSoren Jorvang <soren.jorvang@gmail.com>2010-05-30 08:08:26 +0000
committerSoren Jorvang <soren.jorvang@gmail.com>2010-05-30 08:08:26 +0000
commit9cd3c70b02f85e617f4abc37afc79b4668a2d0ca (patch)
treeeeb0c0bbe5cebc41999b8ff72ca83f8d4fccf1bf /Source/Core/Common
parent2245b1040f51d1ef7981cbf052eabdf94bdc3318 (diff)
The rendering codepath doesn't currently quite recover from an OpenCL
initialization failure, so help it along a little by also considering the CPU as an OpenCL device. Use CL_DEVICE_TYPE_DEFAULT rather than CL_DEVICE_TYPE_ALL as that will give preference to the spiffy GPU if one is present. Implementations of OpenCL are likely to put a GPU as the first device in the list, but there is no guarantee of this and this code currently only picks the first device in the list. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5547 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/OpenCL.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Source/Core/Common/Src/OpenCL.cpp b/Source/Core/Common/Src/OpenCL.cpp
index f89c5f4131..f2713257fb 100644
--- a/Source/Core/Common/Src/OpenCL.cpp
+++ b/Source/Core/Common/Src/OpenCL.cpp
@@ -86,9 +86,7 @@ bool Initialize()
cl_context_properties* cprops = (NULL == platform) ? NULL : cps;
- int gpu = 1; // I think we should use CL_DEVICE_TYPE_ALL
-
- err = clGetDeviceIDs(platform, gpu ? CL_DEVICE_TYPE_GPU : CL_DEVICE_TYPE_CPU, 1, &device_id, NULL);
+ err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_DEFAULT, 1, &device_id, NULL);
if (err != CL_SUCCESS)
{
HandleCLError(err, "Failed to create a device group!");