diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-03-15 18:28:33 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-03-15 18:28:33 +0300 |
commit | 5051e580e4028e0a741e6519e469321a7e1f2a71 (patch) | |
tree | 83d1195eb21106155c0c949ae1453a9ce8665333 /intern/cycles/device/device.h | |
parent | 86ea76254d3f625bf3d9e15dade5d5b3544c06a3 (diff) | |
parent | 2f6257fd7fe305e3b226a8b505eb614bbeaf762a (diff) |
Merge branch 'blender2.7'
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r-- | intern/cycles/device/device.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index 08b0e7435fe..4db8d10a4aa 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -56,6 +56,14 @@ enum DeviceTypeMask { DEVICE_MASK_ALL = ~0 }; +enum DeviceKernelStatus { + DEVICE_KERNEL_WAITING_FOR_FEATURE_KERNEL = 0, + DEVICE_KERNEL_FEATURE_KERNEL_AVAILABLE, + DEVICE_KERNEL_USING_FEATURE_KERNEL, + DEVICE_KERNEL_FEATURE_KERNEL_INVALID, + DEVICE_KERNEL_UNKNOWN, +}; + #define DEVICE_MASK(type) (DeviceTypeMask)(1 << type) class DeviceInfo { @@ -334,6 +342,20 @@ public: const DeviceRequestedFeatures& /*requested_features*/) { return true; } + /* Wait for device to become available to upload data and receive tasks + * This method is used by the OpenCL device to load the + * optimized kernels or when not (yet) available load the + * generic kernels (only during foreground rendering) */ + virtual bool wait_for_availability( + const DeviceRequestedFeatures& /*requested_features*/) + { return true; } + /* Check if there are 'better' kernels available to be used + * We can switch over to these kernels + * This method is used to determine if we can switch the preview kernels + * to regular kernels */ + virtual DeviceKernelStatus get_active_kernel_switch_state() + { return DEVICE_KERNEL_USING_FEATURE_KERNEL; } + /* tasks */ virtual int get_split_task_count(DeviceTask& task) = 0; virtual void task_add(DeviceTask& task) = 0; |