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:
authorMai Lavelle <mai.lavelle@gmail.com>2017-03-01 09:47:08 +0300
committerMai Lavelle <mai.lavelle@gmail.com>2017-03-08 09:31:07 +0300
commitcd7d5669d17070799e2d2a2b28f58a06c3417d7b (patch)
treec5420e4cd9432c44575c1e489b9890ddd8439ba9 /intern/cycles/kernel/split/kernel_path_init.h
parent4cf501b83557ed5d64dbd2ddb13e1e8c5add88f5 (diff)
Cycles: Remove sum_all_radiance kernel
This was only needed for the previous implementation of parallel samples. As we don't have that any more it can be removed. Real reason for removal tho is this: `per_sample_output_buffers` was being calculated too small and artifacts resulted. The tile buffer is already the correct size and calculating the size for `per_sample_output_buffers` is a bit difficult with the current layout of the code. As `per_sample_output_buffers` was only needed for `sum_all_radiance`, removing that kernel and writing output to the tile buffer directly fixes the artifacts.
Diffstat (limited to 'intern/cycles/kernel/split/kernel_path_init.h')
-rw-r--r--intern/cycles/kernel/split/kernel_path_init.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/intern/cycles/kernel/split/kernel_path_init.h b/intern/cycles/kernel/split/kernel_path_init.h
index e613db214ed..d2e2ffaca91 100644
--- a/intern/cycles/kernel/split/kernel_path_init.h
+++ b/intern/cycles/kernel/split/kernel_path_init.h
@@ -35,7 +35,6 @@ ccl_device void kernel_path_init(KernelGlobals *kg) {
unsigned int pixel_y;
unsigned int tile_x;
unsigned int tile_y;
- unsigned int my_sample_tile;
unsigned int work_index = 0;
/* Get work. */
@@ -49,8 +48,6 @@ ccl_device void kernel_path_init(KernelGlobals *kg) {
/* Get the sample associated with the work. */
my_sample = get_work_sample(kg, work_index, ray_index) + kernel_split_params.start_sample;
- my_sample_tile = 0;
-
/* Get pixel and tile position associated with the work. */
get_work_pixel_tile_position(kg, &pixel_x, &pixel_y,
&tile_x, &tile_y,
@@ -61,9 +58,8 @@ ccl_device void kernel_path_init(KernelGlobals *kg) {
ccl_global uint *rng_state = kernel_split_params.rng_state;
rng_state += kernel_split_params.offset + pixel_x + pixel_y*kernel_split_params.stride;
- ccl_global float *per_sample_output_buffers = kernel_split_state.per_sample_output_buffers;
- per_sample_output_buffers += (tile_x + tile_y * kernel_split_params.stride + my_sample_tile)
- * kernel_data.film.pass_stride;
+ ccl_global float *buffer = kernel_split_params.buffer;
+ buffer += (kernel_split_params.offset + pixel_x + pixel_y * kernel_split_params.stride) * kernel_data.film.pass_stride;
/* Initialize random numbers and ray. */
kernel_path_trace_setup(kg,
@@ -94,7 +90,7 @@ ccl_device void kernel_path_init(KernelGlobals *kg) {
/* These rays do not participate in path-iteration. */
float4 L_rad = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
/* Accumulate result in output buffer. */
- kernel_write_pass_float4(per_sample_output_buffers, my_sample, L_rad);
+ kernel_write_pass_float4(buffer, my_sample, L_rad);
path_rng_end(kg, rng_state, kernel_split_state.rng[ray_index]);
ASSIGN_RAY_STATE(kernel_split_state.ray_state, ray_index, RAY_TO_REGENERATE);
}