Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/path_trace_work_cpu.cpp
| Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| half4 *rgba_half = gpu_display->map_texture_buffer(); | half4 *rgba_half = gpu_display->map_texture_buffer(); | ||||
| if (!rgba_half) { | if (!rgba_half) { | ||||
| /* TODO(sergey): Look into using copy_to_gpu_display() if mapping failed. Might be needed for | /* TODO(sergey): Look into using copy_to_gpu_display() if mapping failed. Might be needed for | ||||
| * some implementations of GPUDisplay which can not map memory? */ | * some implementations of GPUDisplay which can not map memory? */ | ||||
| return; | return; | ||||
| } | } | ||||
| const int offset_y = effective_buffer_params_.full_y - effective_big_tile_params_.full_y; | |||||
| const int width = effective_buffer_params_.width; | |||||
| const KernelFilm &kfilm = device_scene_->data.film; | const KernelFilm &kfilm = device_scene_->data.film; | ||||
| const PassAccessor::PassAccessInfo pass_access_info = get_display_pass_access_info(pass_mode); | const PassAccessor::PassAccessInfo pass_access_info = get_display_pass_access_info(pass_mode); | ||||
| const PassAccessorCPU pass_accessor(pass_access_info, kfilm.exposure, num_samples); | const PassAccessorCPU pass_accessor(pass_access_info, kfilm.exposure, num_samples); | ||||
| PassAccessor::Destination destination(pass_access_info.type, rgba_half); | PassAccessor::Destination destination = get_gpu_display_destination_template(gpu_display); | ||||
| destination.offset = offset_y * width; | destination.pixels_half_rgba = rgba_half; | ||||
| tbb::task_arena local_arena = local_tbb_arena_create(device_); | tbb::task_arena local_arena = local_tbb_arena_create(device_); | ||||
| local_arena.execute([&]() { | local_arena.execute([&]() { | ||||
| pass_accessor.get_render_tile_pixels(buffers_.get(), effective_buffer_params_, destination); | pass_accessor.get_render_tile_pixels(buffers_.get(), effective_buffer_params_, destination); | ||||
| }); | }); | ||||
| gpu_display->unmap_texture_buffer(); | gpu_display->unmap_texture_buffer(); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 93 Lines • Show Last 20 Lines | |||||