[Bf-blender-cvs] [5f31089] master: Cycles: Make OpenCL's argument wrapper able to get int/float values directly
Sergey Sharybin
noreply at git.blender.org
Thu Jan 28 15:04:24 CET 2016
Commit: 5f310899578cc67cbe0a97763add94dc838fe3dd
Author: Sergey Sharybin
Date: Thu Jan 28 15:03:01 2016 +0100
Branches: master
https://developer.blender.org/rB5f310899578cc67cbe0a97763add94dc838fe3dd
Cycles: Make OpenCL's argument wrapper able to get int/float values directly
===================================================================
M intern/cycles/device/device_opencl.cpp
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 3c07ddd..6c7f5b4 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;
};
More information about the Bf-blender-cvs
mailing list