diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-10 12:37:02 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-10 12:37:02 +0400 |
commit | f5c9f2c2530d21474f8e2ee5ea7dfdb483b7ba7d (patch) | |
tree | d6b59677bb6d71fef7697bec930e80c94dad98dc /intern/cycles/blender/CCL_api.h | |
parent | c9cd4d61ba4ed9ac8285ec991d14964c3e98dd3c (diff) |
Cycles: correction to how device of lists is exposed to blender
compute_device_list is using static vector of device information which
had pointers (identifier and name) to values from device information
structures. That structures are also stored in static vector and being
refreshed every 5 seconds.
The issue is, as soon as device information is being updated, pointers
in vector from compute_device_list became incorrect.
Seems it was the reason of issues with sudden switching from CUDA to
OpenCL on my desktop and from CUDA to CPU on my laptop, It was also
seems to be making persistent images behaves instable.
Made it so device identifier and name are copied from device info
to structures used by RNA (CCLDeviceInfo).
Alternative could be avoid cacheing CCLDeviceInfo and always use actual
list of device information by RNA. It shouldn't be so much slow.
Diffstat (limited to 'intern/cycles/blender/CCL_api.h')
-rw-r--r-- | intern/cycles/blender/CCL_api.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/blender/CCL_api.h b/intern/cycles/blender/CCL_api.h index 469d63d1530..b8a30b71717 100644 --- a/intern/cycles/blender/CCL_api.h +++ b/intern/cycles/blender/CCL_api.h @@ -23,12 +23,12 @@ extern "C" { #endif -/* returns a list of devices for selection, array is name NULL pointer +/* returns a list of devices for selection, array is empty identifier * terminated and must not be freed */ typedef struct CCLDeviceInfo { - const char *identifier; - const char *name; + char identifier[128]; + char name[512]; int value; } CCLDeviceInfo; |