Blender V5.0
PathTraceWorkGPU Class Reference

#include <path_trace_work_gpu.h>

Inherits PathTraceWork.

Public Member Functions

 PathTraceWorkGPU (Device *device, Film *film, DeviceScene *device_scene, const bool *cancel_requested_flag)
void alloc_work_memory () override
void init_execution () override
void render_samples (RenderStatistics &statistics, const int start_sample, const int samples_num, const int sample_offset) override
void copy_to_display (PathTraceDisplay *display, PassMode pass_mode, const int num_samples) override
void destroy_gpu_resources (PathTraceDisplay *display) override
bool copy_render_buffers_from_device () override
bool copy_render_buffers_to_device () override
bool zero_render_buffers () override
int adaptive_sampling_converge_filter_count_active (const float threshold, bool reset) override
void cryptomatte_postproces () override
void denoise_volume_guiding_buffers () override
Public Member Functions inherited from PathTraceWork
virtual ~PathTraceWork ()
RenderBuffersget_render_buffers ()
void set_effective_buffer_params (const BufferParams &effective_full_params, const BufferParams &effective_big_tile_params, const BufferParams &effective_buffer_params)
bool has_multiple_works () const
void copy_to_render_buffers (RenderBuffers *render_buffers)
void copy_from_render_buffers (const RenderBuffers *render_buffers)
void copy_from_denoised_render_buffers (const RenderBuffers *render_buffers)
bool get_render_tile_pixels (const PassAccessor &pass_accessor, const PassAccessor::Destination &destination)
bool set_render_tile_pixels (PassAccessor &pass_accessor, const PassAccessor::Source &source)
bool is_cancel_requested () const
Deviceget_device () const

Protected Member Functions

void alloc_integrator_soa ()
void alloc_integrator_queue ()
void alloc_integrator_sorting ()
void alloc_integrator_path_split ()
DeviceKernel get_most_queued_kernel () const
void enqueue_reset ()
bool enqueue_work_tiles (bool &finished)
void enqueue_work_tiles (DeviceKernel kernel, const KernelWorkTile work_tiles[], const int num_work_tiles, const int num_active_paths, const int num_predicted_splits)
bool enqueue_path_iteration ()
void enqueue_path_iteration (DeviceKernel kernel, const int num_paths_limit=INT_MAX)
void compute_queued_paths (DeviceKernel kernel, DeviceKernel queued_kernel)
void compute_sorted_queued_paths (DeviceKernel queued_kernel, const int num_paths_limit)
void compact_main_paths (const int num_active_paths)
void compact_shadow_paths ()
void compact_paths (const int num_active_paths, const int max_active_path_index, DeviceKernel terminated_paths_kernel, DeviceKernel compact_paths_kernel, DeviceKernel compact_kernel)
int num_active_main_paths_paths ()
bool should_use_graphics_interop (PathTraceDisplay *display)
void copy_to_display_naive (PathTraceDisplay *display, PassMode pass_mode, const int num_samples)
bool copy_to_display_interop (PathTraceDisplay *display, PassMode pass_mode, const int num_samples)
void get_render_tile_film_pixels (const PassAccessor::Destination &destination, PassMode pass_mode, int num_samples)
int adaptive_sampling_convergence_check_count_active (const float threshold, bool reset)
void enqueue_adaptive_sampling_filter_x ()
void enqueue_adaptive_sampling_filter_y ()
bool has_shadow_catcher () const
int shadow_catcher_count_possible_splits ()
bool kernel_uses_sorting (DeviceKernel kernel)
bool kernel_creates_shadow_paths (DeviceKernel kernel)
bool kernel_creates_ao_paths (DeviceKernel kernel)
bool kernel_is_shadow_path (DeviceKernel kernel)
int kernel_max_active_main_path_index (DeviceKernel kernel)
Protected Member Functions inherited from PathTraceWork
 PathTraceWork (Device *device, Film *film, DeviceScene *device_scene, const bool *cancel_requested_flag)
PassAccessor::PassAccessInfo get_display_pass_access_info (PassMode pass_mode) const
PassAccessor::Destination get_display_destination_template (const PathTraceDisplay *display, const PassMode mode) const

Protected Attributes

unique_ptr< DeviceQueuequeue_
WorkTileScheduler work_tile_scheduler_
IntegratorStateGPU integrator_state_gpu_
vector< unique_ptr< device_memory > > integrator_state_soa_
uint integrator_state_soa_kernel_features_
int integrator_state_soa_volume_stack_size_ = 0
device_vector< IntegratorQueueCounterintegrator_queue_counter_
device_vector< int > integrator_shader_sort_counter_
device_vector< int > integrator_shader_raytrace_sort_counter_
device_vector< int > integrator_shader_mnee_sort_counter_
device_vector< int > integrator_shader_sort_prefix_sum_
device_vector< int > integrator_shader_sort_partition_key_offsets_
device_vector< int > integrator_next_main_path_index_
device_vector< int > integrator_next_shadow_path_index_
device_vector< int > queued_paths_
device_vector< int > num_queued_paths_
device_vector< KernelWorkTilework_tiles_
device_vector< half4display_rgba_half_
unique_ptr< DeviceGraphicsInteropdevice_graphics_interop_
bool interop_use_checked_ = false
bool interop_use_ = false
int num_sort_partitions_
int max_num_paths_
int min_num_active_main_paths_
int max_active_main_path_index_
Protected Attributes inherited from PathTraceWork
Devicedevice_
Filmfilm_
DeviceScenedevice_scene_
unique_ptr< RenderBuffersbuffers_
BufferParams effective_full_params_
BufferParams effective_big_tile_params_
BufferParams effective_buffer_params_
const bool * cancel_requested_flag_ = nullptr

Additional Inherited Members

Static Public Member Functions inherited from PathTraceWork
static unique_ptr< PathTraceWorkcreate (Device *device, Film *film, DeviceScene *device_scene, const bool *cancel_requested_flag)

Detailed Description

Definition at line 25 of file path_trace_work_gpu.h.

Constructor & Destructor Documentation

◆ PathTraceWorkGPU()

Member Function Documentation

◆ adaptive_sampling_converge_filter_count_active()

int PathTraceWorkGPU::adaptive_sampling_converge_filter_count_active ( const float threshold,
bool reset )
overridevirtual

◆ adaptive_sampling_convergence_check_count_active()

◆ alloc_integrator_path_split()

void PathTraceWorkGPU::alloc_integrator_path_split ( )
protected

◆ alloc_integrator_queue()

void PathTraceWorkGPU::alloc_integrator_queue ( )
protected

◆ alloc_integrator_soa()

◆ alloc_integrator_sorting()

◆ alloc_work_memory()

void PathTraceWorkGPU::alloc_work_memory ( )
overridevirtual

◆ compact_main_paths()

void PathTraceWorkGPU::compact_main_paths ( const int num_active_paths)
protected

◆ compact_paths()

void PathTraceWorkGPU::compact_paths ( const int num_active_paths,
const int max_active_path_index,
DeviceKernel terminated_paths_kernel,
DeviceKernel compact_paths_kernel,
DeviceKernel compact_kernel )
protected

Definition at line 726 of file path_trace_work_gpu.cpp.

References num_queued_paths_, queue_, queued_paths_, and work_size.

Referenced by compact_main_paths(), and compact_shadow_paths().

◆ compact_shadow_paths()

◆ compute_queued_paths()

void PathTraceWorkGPU::compute_queued_paths ( DeviceKernel kernel,
DeviceKernel queued_kernel )
protected

◆ compute_sorted_queued_paths()

◆ copy_render_buffers_from_device()

bool PathTraceWorkGPU::copy_render_buffers_from_device ( )
overridevirtual

Implements PathTraceWork.

Definition at line 1202 of file path_trace_work_gpu.cpp.

References PathTraceWork::buffers_, and queue_.

◆ copy_render_buffers_to_device()

bool PathTraceWorkGPU::copy_render_buffers_to_device ( )
overridevirtual

Implements PathTraceWork.

Definition at line 1215 of file path_trace_work_gpu.cpp.

References PathTraceWork::buffers_, and queue_.

◆ copy_to_display()

void PathTraceWorkGPU::copy_to_display ( PathTraceDisplay * display,
PassMode pass_mode,
const int num_samples )
overridevirtual

◆ copy_to_display_interop()

bool PathTraceWorkGPU::copy_to_display_interop ( PathTraceDisplay * display,
PassMode pass_mode,
const int num_samples )
protected

◆ copy_to_display_naive()

◆ cryptomatte_postproces()

void PathTraceWorkGPU::cryptomatte_postproces ( )
overridevirtual

◆ denoise_volume_guiding_buffers()

void PathTraceWorkGPU::denoise_volume_guiding_buffers ( )
overridevirtual

◆ destroy_gpu_resources()

void PathTraceWorkGPU::destroy_gpu_resources ( PathTraceDisplay * display)
overridevirtual

◆ enqueue_adaptive_sampling_filter_x()

void PathTraceWorkGPU::enqueue_adaptive_sampling_filter_x ( )
protected

◆ enqueue_adaptive_sampling_filter_y()

void PathTraceWorkGPU::enqueue_adaptive_sampling_filter_y ( )
protected

◆ enqueue_path_iteration() [1/2]

◆ enqueue_path_iteration() [2/2]

◆ enqueue_reset()

◆ enqueue_work_tiles() [1/2]

◆ enqueue_work_tiles() [2/2]

void PathTraceWorkGPU::enqueue_work_tiles ( DeviceKernel kernel,
const KernelWorkTile work_tiles[],
const int num_work_tiles,
const int num_active_paths,
const int num_predicted_splits )
protected

◆ get_most_queued_kernel()

DeviceKernel PathTraceWorkGPU::get_most_queued_kernel ( ) const
protected

◆ get_render_tile_film_pixels()

◆ has_shadow_catcher()

bool PathTraceWorkGPU::has_shadow_catcher ( ) const
protected

◆ init_execution()

void PathTraceWorkGPU::init_execution ( )
overridevirtual

Implements PathTraceWork.

Definition at line 322 of file path_trace_work_gpu.cpp.

References PathTraceWork::device_, integrator_state_gpu_, and queue_.

◆ kernel_creates_ao_paths()

◆ kernel_creates_shadow_paths()

◆ kernel_is_shadow_path()

bool PathTraceWorkGPU::kernel_is_shadow_path ( DeviceKernel kernel)
protected

◆ kernel_max_active_main_path_index()

int PathTraceWorkGPU::kernel_max_active_main_path_index ( DeviceKernel kernel)
protected

◆ kernel_uses_sorting()

bool PathTraceWorkGPU::kernel_uses_sorting ( DeviceKernel kernel)
protected

◆ num_active_main_paths_paths()

int PathTraceWorkGPU::num_active_main_paths_paths ( )
protected

◆ render_samples()

◆ shadow_catcher_count_possible_splits()

int PathTraceWorkGPU::shadow_catcher_count_possible_splits ( )
protected

◆ should_use_graphics_interop()

bool PathTraceWorkGPU::should_use_graphics_interop ( PathTraceDisplay * display)
protected

◆ zero_render_buffers()

bool PathTraceWorkGPU::zero_render_buffers ( )
overridevirtual

Implements PathTraceWork.

Definition at line 1226 of file path_trace_work_gpu.cpp.

References PathTraceWork::buffers_, and queue_.

Member Data Documentation

◆ device_graphics_interop_

unique_ptr<DeviceGraphicsInterop> PathTraceWorkGPU::device_graphics_interop_
protected

Definition at line 156 of file path_trace_work_gpu.h.

Referenced by copy_to_display_interop(), and destroy_gpu_resources().

◆ display_rgba_half_

device_vector<half4> PathTraceWorkGPU::display_rgba_half_
protected

Definition at line 154 of file path_trace_work_gpu.h.

Referenced by copy_to_display_naive(), and PathTraceWorkGPU().

◆ integrator_next_main_path_index_

device_vector<int> PathTraceWorkGPU::integrator_next_main_path_index_
protected

◆ integrator_next_shadow_path_index_

device_vector<int> PathTraceWorkGPU::integrator_next_shadow_path_index_
protected

◆ integrator_queue_counter_

◆ integrator_shader_mnee_sort_counter_

device_vector<int> PathTraceWorkGPU::integrator_shader_mnee_sort_counter_
protected

◆ integrator_shader_raytrace_sort_counter_

device_vector<int> PathTraceWorkGPU::integrator_shader_raytrace_sort_counter_
protected

◆ integrator_shader_sort_counter_

device_vector<int> PathTraceWorkGPU::integrator_shader_sort_counter_
protected

◆ integrator_shader_sort_partition_key_offsets_

device_vector<int> PathTraceWorkGPU::integrator_shader_sort_partition_key_offsets_
protected

Definition at line 140 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and PathTraceWorkGPU().

◆ integrator_shader_sort_prefix_sum_

device_vector<int> PathTraceWorkGPU::integrator_shader_sort_prefix_sum_
protected

◆ integrator_state_gpu_

◆ integrator_state_soa_

vector<unique_ptr<device_memory> > PathTraceWorkGPU::integrator_state_soa_
protected

Definition at line 130 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_soa().

◆ integrator_state_soa_kernel_features_

uint PathTraceWorkGPU::integrator_state_soa_kernel_features_
protected

Definition at line 131 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_soa(), and PathTraceWorkGPU().

◆ integrator_state_soa_volume_stack_size_

int PathTraceWorkGPU::integrator_state_soa_volume_stack_size_ = 0
protected

Definition at line 132 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_soa().

◆ interop_use_

bool PathTraceWorkGPU::interop_use_ = false
protected

Definition at line 160 of file path_trace_work_gpu.h.

Referenced by copy_to_display(), and should_use_graphics_interop().

◆ interop_use_checked_

bool PathTraceWorkGPU::interop_use_checked_ = false
protected

Definition at line 159 of file path_trace_work_gpu.h.

Referenced by should_use_graphics_interop().

◆ max_active_main_path_index_

int PathTraceWorkGPU::max_active_main_path_index_
protected

◆ max_num_paths_

◆ min_num_active_main_paths_

int PathTraceWorkGPU::min_num_active_main_paths_
protected

◆ num_queued_paths_

◆ num_sort_partitions_

int PathTraceWorkGPU::num_sort_partitions_
protected

Definition at line 163 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and compute_sorted_queued_paths().

◆ queue_

◆ queued_paths_

◆ work_tile_scheduler_

WorkTileScheduler PathTraceWorkGPU::work_tile_scheduler_
protected

Definition at line 125 of file path_trace_work_gpu.h.

Referenced by enqueue_work_tiles(), and render_samples().

◆ work_tiles_

device_vector<KernelWorkTile> PathTraceWorkGPU::work_tiles_
protected

Definition at line 150 of file path_trace_work_gpu.h.

Referenced by enqueue_work_tiles(), and PathTraceWorkGPU().


The documentation for this class was generated from the following files: