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
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-10-24 12:14:01 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-10-24 12:14:01 +0300
commiteccd18a91f55753425daee47ea000262689accd9 (patch)
treeec198212d818f19bcd868832e7ab4c1336cf1cf2 /intern
parentd0f48d33f47a09e318afbccc31f32cdad4ed659c (diff)
Cycles: Fix compilation error without C++11
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/device/opencl/opencl_split.cpp37
1 files changed, 20 insertions, 17 deletions
diff --git a/intern/cycles/device/opencl/opencl_split.cpp b/intern/cycles/device/opencl/opencl_split.cpp
index 96139afa450..ae623d22f07 100644
--- a/intern/cycles/device/opencl/opencl_split.cpp
+++ b/intern/cycles/device/opencl/opencl_split.cpp
@@ -35,6 +35,25 @@ CCL_NAMESPACE_BEGIN
class OpenCLSplitKernel;
+namespace {
+
+/* Copy dummy KernelGlobals related to OpenCL from kernel_globals.h to
+ * fetch its size.
+ */
+typedef struct KernelGlobalsDummy {
+ ccl_constant KernelData *data;
+ ccl_global char *buffers[8];
+
+#define KERNEL_TEX(type, name) \
+ TextureInfo name;
+# include "kernel/kernel_textures.h"
+#undef KERNEL_TEX
+ SplitData split_data;
+ SplitParams split_param_data;
+} KernelGlobalsDummy;
+
+} // namespace
+
static string get_build_options(OpenCLDeviceBase *device, const DeviceRequestedFeatures& requested_features)
{
string build_options = "-D__SPLIT_KERNEL__ ";
@@ -110,24 +129,8 @@ public:
else if(task->type == DeviceTask::RENDER) {
RenderTile tile;
- /* Copy dummy KernelGlobals related to OpenCL from kernel_globals.h to
- * fetch its size.
- */
- typedef struct KernelGlobals {
- ccl_constant KernelData *data;
- ccl_global char *buffers[8];
-
-#define KERNEL_TEX(type, name) \
- TextureInfo name;
-#include "kernel/kernel_textures.h"
-#undef KERNEL_TEX
-
- SplitData split_data;
- SplitParams split_param_data;
- } KernelGlobals;
-
/* Allocate buffer for kernel globals */
- device_only_memory<KernelGlobals> kgbuffer(this, "kernel_globals");
+ device_only_memory<KernelGlobalsDummy> kgbuffer(this, "kernel_globals");
kgbuffer.alloc_to_device(1);
/* Keep rendering tiles until done. */