Commit: f73a869c800d2bea2367c16468174e64f60c751a
Author: Sergey Sharybin
Date: Fri May 8 20:25:20 2015 +0500
Branches: cycles_kernel_split
https://developer.blender.org/rBf73a869c800d2bea2367c16468174e64f60c751a
Cycles kernel split: Move split-device related function to split class
===================================================================
M intern/cycles/device/device_opencl.cpp
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp
b/intern/cycles/device/device_opencl.cpp
index 8ef422d..4e06a8e 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -1088,21 +1088,6 @@ public:
task.update_progress(NULL);
}
}
-
-protected:
- /* Overloading function for creating split kernel device buffers.
- *
- * TODO(sergey): Move tihs to split kernel device?
- */
- cl_mem mem_alloc(size_t bufsize, cl_mem_flags mem_flag =
CL_MEM_READ_WRITE) {
- cl_mem ptr;
- ptr = clCreateBuffer(cxContext, mem_flag, bufsize, NULL,
&ciErr);
- if (ciErr != CL_SUCCESS) {
- fprintf(stderr, "(%d) %s in clCreateBuffer\n", ciErr,
clewErrorString(ciErr));
- assert(0);
- }
- return ptr;
- }
};
class OpenCLDeviceMegaKernel : public OpenCLDeviceBase
@@ -3199,6 +3184,18 @@ The current tile of dimensions %dx%d is split into tiles
of dimension %dx%d for
{
task_pool.cancel();
}
+
+protected:
+ cl_mem mem_alloc(size_t bufsize, cl_mem_flags mem_flag =
CL_MEM_READ_WRITE)
+ {
+ cl_mem ptr;
+ ptr = clCreateBuffer(cxContext, mem_flag, bufsize, NULL,
&ciErr);
+ if (ciErr != CL_SUCCESS) {
+ fprintf(stderr, "(%d) %s in clCreateBuffer\n", ciErr,
clewErrorString(ciErr));
+ assert(0);
+ }
+ return ptr;
+ }
};
/* Returns true in case of successful detection of platform and device type,
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs