Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/device/gpu/kernel.h
| Show All 13 Lines | |||||
| * limitations under the License. | * limitations under the License. | ||||
| */ | */ | ||||
| /* Common GPU kernels. */ | /* Common GPU kernels. */ | ||||
| #include "kernel/device/gpu/parallel_active_index.h" | #include "kernel/device/gpu/parallel_active_index.h" | ||||
| #include "kernel/device/gpu/parallel_prefix_sum.h" | #include "kernel/device/gpu/parallel_prefix_sum.h" | ||||
| #include "kernel/device/gpu/parallel_sorted_index.h" | #include "kernel/device/gpu/parallel_sorted_index.h" | ||||
| #include "kernel/device/gpu/work_stealing.h" | |||||
| #include "kernel/sample/lcg.h" | #include "kernel/sample/lcg.h" | ||||
| /* Include constant tables before entering Metal's context class scope (context_begin.h) */ | /* Include constant tables before entering Metal's context class scope (context_begin.h) */ | ||||
| #include "kernel/tables.h" | #include "kernel/tables.h" | ||||
| #ifdef __KERNEL_METAL__ | #ifdef __KERNEL_METAL__ | ||||
| # include "kernel/device/metal/context_begin.h" | # include "kernel/device/metal/context_begin.h" | ||||
| #endif | #endif | ||||
| #include "kernel/device/gpu/work_stealing.h" | |||||
| #include "kernel/integrator/state.h" | #include "kernel/integrator/state.h" | ||||
| #include "kernel/integrator/state_flow.h" | #include "kernel/integrator/state_flow.h" | ||||
| #include "kernel/integrator/state_util.h" | #include "kernel/integrator/state_util.h" | ||||
| #include "kernel/integrator/init_from_bake.h" | #include "kernel/integrator/init_from_bake.h" | ||||
| #include "kernel/integrator/init_from_camera.h" | #include "kernel/integrator/init_from_camera.h" | ||||
| #include "kernel/integrator/intersect_closest.h" | #include "kernel/integrator/intersect_closest.h" | ||||
| #include "kernel/integrator/intersect_shadow.h" | #include "kernel/integrator/intersect_shadow.h" | ||||
| ▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) | ||||
| if (tile_work_index >= tile->work_size) { | if (tile_work_index >= tile->work_size) { | ||||
| return; | return; | ||||
| } | } | ||||
| const int state = tile->path_index_offset + tile_work_index; | const int state = tile->path_index_offset + tile_work_index; | ||||
| uint x, y, sample; | uint x, y, sample; | ||||
| get_work_pixel(tile, tile_work_index, &x, &y, &sample); | ccl_gpu_kernel_call(get_work_pixel(tile, tile_work_index, &x, &y, &sample)); | ||||
| ccl_gpu_kernel_call( | ccl_gpu_kernel_call( | ||||
| integrator_init_from_camera(nullptr, state, tile, render_buffer, x, y, sample)); | integrator_init_from_camera(nullptr, state, tile, render_buffer, x, y, sample)); | ||||
| } | } | ||||
| ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) | ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) | ||||
| ccl_gpu_kernel_signature(integrator_init_from_bake, | ccl_gpu_kernel_signature(integrator_init_from_bake, | ||||
| ccl_global KernelWorkTile *tiles, | ccl_global KernelWorkTile *tiles, | ||||
| Show All 14 Lines | ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) | ||||
| if (tile_work_index >= tile->work_size) { | if (tile_work_index >= tile->work_size) { | ||||
| return; | return; | ||||
| } | } | ||||
| const int state = tile->path_index_offset + tile_work_index; | const int state = tile->path_index_offset + tile_work_index; | ||||
| uint x, y, sample; | uint x, y, sample; | ||||
| get_work_pixel(tile, tile_work_index, &x, &y, &sample); | ccl_gpu_kernel_call(get_work_pixel(tile, tile_work_index, &x, &y, &sample)); | ||||
| ccl_gpu_kernel_call( | ccl_gpu_kernel_call( | ||||
| integrator_init_from_bake(nullptr, state, tile, render_buffer, x, y, sample)); | integrator_init_from_bake(nullptr, state, tile, render_buffer, x, y, sample)); | ||||
| } | } | ||||
| ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) | ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) | ||||
| ccl_gpu_kernel_signature(integrator_intersect_closest, | ccl_gpu_kernel_signature(integrator_intersect_closest, | ||||
| ccl_global const int *path_index_array, | ccl_global const int *path_index_array, | ||||
| ▲ Show 20 Lines • Show All 791 Lines • Show Last 20 Lines | |||||