diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-09 17:05:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-05-09 17:05:49 +0300 |
commit | 0e4ddaadd487ebdd80399e2fd24cb8b12bd7f721 (patch) | |
tree | e0ddd2d136854de2c70cc5ee92dfe4030d4cf331 /intern/cycles/device/device.h | |
parent | d69c80f717e9dc9efc1325653b0c87fbb2254af9 (diff) |
Cycles: Change the way how we pass requested capabilities to the device
Previously we only had experimental flag passed to device's load_kernel() which
was all fine. But since we're gonna to have some extra parameters passed there
it makes sense to wrap them into a single struct, which will make it easier to
pass stuff around.
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r-- | intern/cycles/device/device.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index 7eb3f6c822b..98155900748 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -69,6 +69,22 @@ public: } }; +class DeviceRequestedFeatures { +public: + /* Use experimental feature set. */ + bool experimental; + + DeviceRequestedFeatures() + { + experimental = false; + } + + bool modified(const DeviceRequestedFeatures& requested_features) + { + return !(experimental == requested_features.experimental); + } +}; + /* Device */ struct DeviceDrawParams { @@ -125,7 +141,9 @@ public: virtual void *osl_memory() { return NULL; } /* load/compile kernels, must be called before adding tasks */ - virtual bool load_kernels(bool /*experimental*/) { return true; } + virtual bool load_kernels( + const DeviceRequestedFeatures& /*requested_features*/) + { return true; } /* tasks */ virtual int get_split_task_count(DeviceTask& task) = 0; |