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
diff options
context:
space:
mode:
authorLukas Stockner <lukas.stockner@freenet.de>2017-06-09 23:31:26 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2017-06-09 23:38:16 +0300
commit0a898e2405ef60002335859ce2d5bc47526666ed (patch)
treee6fa4f6bdaa0619386dab438f2e6daff5833da5b /intern/cycles
parent7dc51f87ed239470f8b7a62c48757142bc078ae4 (diff)
Cleanup Cycles Denoising platform-specific defines
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/kernel/filter/filter_reconstruction.h24
1 files changed, 11 insertions, 13 deletions
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