Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/path_trace_work_gpu.cpp
| Show First 20 Lines • Show All 706 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void PathTraceWorkGPU::copy_to_gpu_display_naive(GPUDisplay *gpu_display, | void PathTraceWorkGPU::copy_to_gpu_display_naive(GPUDisplay *gpu_display, | ||||
| PassMode pass_mode, | PassMode pass_mode, | ||||
| int num_samples) | int num_samples) | ||||
| { | { | ||||
| const int full_x = effective_buffer_params_.full_x; | const int full_x = effective_buffer_params_.full_x; | ||||
| const int full_y = effective_buffer_params_.full_y; | const int full_y = effective_buffer_params_.full_y; | ||||
| const int width = effective_buffer_params_.width; | const int width = effective_buffer_params_.window_width; | ||||
| const int height = effective_buffer_params_.height; | const int height = effective_buffer_params_.window_height; | ||||
| const int final_width = buffers_->params.width; | const int final_width = buffers_->params.window_width; | ||||
| const int final_height = buffers_->params.height; | const int final_height = buffers_->params.window_height; | ||||
| const int texture_x = full_x - effective_full_params_.full_x; | const int texture_x = full_x - effective_full_params_.full_x + effective_buffer_params_.window_x; | ||||
| const int texture_y = full_y - effective_full_params_.full_y; | const int texture_y = full_y - effective_full_params_.full_y + effective_buffer_params_.window_y; | ||||
| /* Re-allocate display memory if needed, and make sure the device pointer is allocated. | /* Re-allocate display memory if needed, and make sure the device pointer is allocated. | ||||
| * | * | ||||
| * NOTE: allocation happens to the final resolution so that no re-allocation happens on every | * NOTE: allocation happens to the final resolution so that no re-allocation happens on every | ||||
| * change of the resolution divider. However, if the display becomes smaller, shrink the | * change of the resolution divider. However, if the display becomes smaller, shrink the | ||||
| * allocated memory as well. */ | * allocated memory as well. */ | ||||
| if (gpu_display_rgba_half_.data_width != final_width || | if (gpu_display_rgba_half_.data_width != final_width || | ||||
| gpu_display_rgba_half_.data_height != final_height) { | gpu_display_rgba_half_.data_height != final_height) { | ||||
| ▲ Show 20 Lines • Show All 204 Lines • Show Last 20 Lines | |||||