diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-28 17:03:01 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-28 17:03:42 +0300 |
commit | 5f310899578cc67cbe0a97763add94dc838fe3dd (patch) | |
tree | c3a175ac8e018b86c2732ffef626588e364644ca /intern/cycles/device/device_opencl.cpp | |
parent | 12c71508c2d7b719cc5cd0bf5ed79123aa38e52d (diff) |
Cycles: Make OpenCL's argument wrapper able to get int/float values directly
Diffstat (limited to 'intern/cycles/device/device_opencl.cpp')
-rw-r--r-- | intern/cycles/device/device_opencl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp index 3c07ddd3bcb..6c7f5b49a77 100644 --- a/intern/cycles/device/device_opencl.cpp +++ b/intern/cycles/device/device_opencl.cpp @@ -1449,7 +1449,15 @@ protected: template <typename T> ArgumentWrapper(T& argument) : size(sizeof(argument)), pointer(&argument) { } + ArgumentWrapper(int argument) : size(sizeof(int)), + int_value(argument), + pointer(&int_value) { } + ArgumentWrapper(float argument) : size(sizeof(float)), + float_value(argument), + pointer(&float_value) { } size_t size; + int int_value; + float float_value; void *pointer; }; |