[Bf-blender-cvs] [21c6eee] cycles_kernel_split: Cycles kernel split : Use macros to set args for LampEmission kernel

varunsundar08 noreply at git.blender.org
Wed May 6 13:07:07 CEST 2015


Commit: 21c6eeed70240ba374eb73453ed37bd3106fe7b5
Author: varunsundar08
Date:   Wed May 6 14:26:27 2015 +0530
Branches: cycles_kernel_split
https://developer.blender.org/rB21c6eeed70240ba374eb73453ed37bd3106fe7b5

Cycles kernel split : Use macros to set args for LampEmission kernel

===================================================================

M	intern/cycles/device/device_opencl.cpp

===================================================================

diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 00ecac2a..b35598d 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -2660,23 +2660,22 @@ public:
 
 		/* Set arguments for ckPathTracekernel_LampEmission_SPLIT_KERNEL kernel */
 		narg = 0;
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(kgbuffer), (void*)&kgbuffer));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(d_data), (void*)&d_data));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(sd), (void *)&sd));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(throughput_coop), (void*)&throughput_coop));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(PathRadiance_coop), (void*)&PathRadiance_coop));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(Ray_coop), (void*)&Ray_coop));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(PathState_coop), (void*)&PathState_coop));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(Intersection_coop), (void*)&Intersection_coop));
-
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(ray_state), (void*)&ray_state));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(d_w), (void*)&d_w));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(d_h), (void*)&d_h));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(Queue_data), (void*)&Queue_data));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(Queue_index), (void*)&Queue_index));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(dQueue_size), (void*)&dQueue_size));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(use_queues_flag), (void*)&use_queues_flag));
-		opencl_assert(clSetKernelArg(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, narg++, sizeof(num_parallel_samples), (void*)&num_parallel_samples));
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, kgbuffer);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, d_data);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, sd);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, throughput_coop);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, PathRadiance_coop);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, Ray_coop);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, PathState_coop);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, Intersection_coop);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, ray_state);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, d_w);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, d_h);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, Queue_data);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, Queue_index);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, dQueue_size);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, use_queues_flag);
+		KERNEL_APPEND_ARG(ckPathTraceKernel_LampEmission_SPLIT_KERNEL, num_parallel_samples);
 
 		/* Set arguments for ckPathTraceKernel_QueueEnqueue_SPLIT_KERNEL kernel */
 		narg = 0;




More information about the Bf-blender-cvs mailing list