mirror of https://github.com/BOINC/boinc.git
client: Restore scaling factor for AMD OpenCL devices on Macs with OpenCL version < 1.2
svn path=/trunk/boinc/; revision=24999
This commit is contained in:
parent
57d1c580e8
commit
06af098512
|
@ -202,3 +202,10 @@ David 5 Jan 2012
|
|||
|
||||
lib/
|
||||
gui_rpc_client_ops.cpp
|
||||
|
||||
Rom 3 Jan 2012
|
||||
- client: Restore scaling factor for AMD OpenCL devices on Macs with
|
||||
OpenCL version < 1.2.
|
||||
|
||||
client/
|
||||
coproc_detect.cpp
|
||||
|
|
|
@ -293,6 +293,21 @@ void COPROCS::get_opencl(
|
|||
(strstr(prop.vendor, "Advanced Micro Devices, Inc."))
|
||||
) {
|
||||
prop.device_num = (int)(ati_opencls.size());
|
||||
#ifdef __APPLE__
|
||||
// Work around a bug in OpenCL which returns only
|
||||
// 1/2 of total global RAM size.
|
||||
// This bug applies only to ATI GPUs, not to NVIDIA
|
||||
// This has already been fixed on latest Catalyst
|
||||
// drivers, but Mac does not use Catalyst drivers.
|
||||
// Assume this will be fixed in openCL 1.2.
|
||||
// See also further workaround code for systems with
|
||||
// CAL support.
|
||||
if ((!strstr("1.0", prop.opencl_platform_version))
|
||||
|| (!strstr("1.1", prop.opencl_platform_version))
|
||||
){
|
||||
prop.global_mem_size *= 2;
|
||||
}
|
||||
#endif
|
||||
if (!ati.have_cal) {
|
||||
COPROC_ATI c;
|
||||
c.opencl_prop = prop;
|
||||
|
@ -329,6 +344,7 @@ void COPROCS::get_opencl(
|
|||
// Work around a bug in OpenCL which returns only
|
||||
// 1/2 of total global RAM size: use the value from CAL.
|
||||
// This bug applies only to ATI GPUs, not to NVIDIA
|
||||
// See also further workaround code for Macs.
|
||||
//
|
||||
ati.opencl_prop.global_mem_size = ati.attribs.localRAM * MEGA;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue