Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r--intern/cycles/device/device.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index 3bf978600d5..6f3208e955f 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 {
@@ -321,6 +329,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;