[Bf-blender-cvs] [9d89f4e] cycles_kernel_split: Bug fix : Dont use ASSIGN_RAY_STATE macro for first assignment

varunsundar08 noreply at git.blender.org
Wed Apr 15 17:37:14 CEST 2015


Commit: 9d89f4e62561b6567deb9c7844d6823e7e52de80
Author: varunsundar08
Date:   Mon Apr 13 12:15:14 2015 +0530
Branches: cycles_kernel_split
https://developer.blender.org/rB9d89f4e62561b6567deb9c7844d6823e7e52de80

Bug fix : Dont use ASSIGN_RAY_STATE macro for first assignment

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

M	intern/cycles/kernel/kernel_DataInit.cl
M	intern/cycles/kernel/kernel_types.h

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

diff --git a/intern/cycles/kernel/kernel_DataInit.cl b/intern/cycles/kernel/kernel_DataInit.cl
index 922fabc..d852410 100644
--- a/intern/cycles/kernel/kernel_DataInit.cl
+++ b/intern/cycles/kernel/kernel_DataInit.cl
@@ -403,6 +403,7 @@ __kernel void kernel_ocl_path_trace_data_initialization_SPLIT_KERNEL(
 
 	/* Mark rest of the ray-state indices as RAY_INACTIVE */
 	if(thread_index < (get_global_size(0) * get_global_size(1)) - (sh * (sw * parallel_samples))) {
-		ASSIGN_RAY_STATE(ray_state, (sw * parallel_samples) * sh + thread_index, RAY_INACTIVE);
+		/* First assignment, hence we dont use ASSIGN_RAY_STATE macro */
+		ray_state[((sw * parallel_samples) * sh) + thread_index] = RAY_INACTIVE;
 	}
 }
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index 802e81d..3cc4468 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -1154,7 +1154,7 @@ enum QUEUE_NUMBER {
 						      contributuin for direct lighting are enqueued here */
 };
 
-/* We use RAY_STATE_MASK to get ray_state (enums 1 to 5) */
+/* We use RAY_STATE_MASK to get ray_state (enums 0 to 5) */
 #define RAY_STATE_MASK 0x007
 #define RAY_FLAG_MASK 0x0F8
 enum RAY_STATE {




More information about the Bf-blender-cvs mailing list