[Bf-blender-cvs] [0a898e2405e] master: Cleanup Cycles Denoising platform-specific defines

Lukas Stockner noreply at git.blender.org
Fri Jun 9 23:04:49 CEST 2017


Commit: 0a898e2405ef60002335859ce2d5bc47526666ed
Author: Lukas Stockner
Date:   Fri Jun 9 22:31:26 2017 +0200
Branches: master
https://developer.blender.org/rB0a898e2405ef60002335859ce2d5bc47526666ed

Cleanup Cycles Denoising platform-specific defines

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

M	intern/cycles/kernel/filter/filter_reconstruction.h

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

diff --git a/intern/cycles/kernel/filter/filter_reconstruction.h b/intern/cycles/kernel/filter/filter_reconstruction.h
index 538d57d3dc9..d6d7639a22d 100644
--- a/intern/cycles/kernel/filter/filter_reconstruction.h
+++ b/intern/cycles/kernel/filter/filter_reconstruction.h
@@ -36,17 +36,17 @@ ccl_device_inline void kernel_filter_construct_gramian(int x, int y,
 	int p_offset =  y    *w +  x;
 	int q_offset = (y+dy)*w + (x+dx);
 
-#ifdef __KERNEL_CPU__
-	const int stride = 1;
-	(void)storage_stride;
-	(void)localIdx;
-	float design_row[DENOISE_FEATURES+1];
-#elif defined(__KERNEL_CUDA__)
+#ifdef __KERNEL_GPU__
 	const int stride = storage_stride;
+#else
+	const int stride = 1;
+	(void) storage_stride;
+#endif
+
+#ifdef __KERNEL_CUDA__
 	ccl_local float shared_design_row[(DENOISE_FEATURES+1)*CCL_MAX_LOCAL_SIZE];
 	ccl_local_param float *design_row = shared_design_row + localIdx*(DENOISE_FEATURES+1);
 #else
-	const int stride = storage_stride;
 	float design_row[DENOISE_FEATURES+1];
 #endif
 
@@ -74,11 +74,11 @@ ccl_device_inline void kernel_filter_finalize(int x, int y, int w, int h,
                                               int4 buffer_params,
                                               int sample)
 {
-#ifdef __KERNEL_CPU__
-	const int stride = 1;
-	(void)storage_stride;
-#else
+#ifdef __KERNEL_GPU__
 	const int stride = storage_stride;
+#else
+	const int stride = 1;
+	(void) storage_stride;
 #endif
 
 	/* The weighted average of pixel colors (essentially, the NLM-filtered image).
@@ -105,6 +105,4 @@ ccl_device_inline void kernel_filter_finalize(int x, int y, int w, int h,
 	combined_buffer[2] = final_color.z;
 }
 
-#undef STORAGE_TYPE
-
 CCL_NAMESPACE_END




More information about the Bf-blender-cvs mailing list