Blender  V3.3
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PathTraceWorkGPU Class Reference

#include <path_trace_work_gpu.h>

Inheritance diagram for PathTraceWorkGPU:
PathTraceWork

Public Member Functions

 PathTraceWorkGPU (Device *device, Film *film, DeviceScene *device_scene, bool *cancel_requested_flag)
 
virtual void alloc_work_memory () override
 
virtual void init_execution () override
 
virtual void render_samples (RenderStatistics &statistics, int start_sample, int samples_num, int sample_offset) override
 
virtual void copy_to_display (PathTraceDisplay *display, PassMode pass_mode, int num_samples) override
 
virtual void destroy_gpu_resources (PathTraceDisplay *display) override
 
virtual bool copy_render_buffers_from_device () override
 
virtual bool copy_render_buffers_to_device () override
 
virtual bool zero_render_buffers () override
 
virtual int adaptive_sampling_converge_filter_count_active (float threshold, bool reset) override
 
virtual void cryptomatte_postproces () 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 kernel, 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 ()
 
void copy_to_display_naive (PathTraceDisplay *display, PassMode pass_mode, int num_samples)
 
bool copy_to_display_interop (PathTraceDisplay *display, PassMode pass_mode, 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 (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, 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
 

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_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_
 
boolcancel_requested_flag_ = nullptr
 

Additional Inherited Members

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

Detailed Description

Definition at line 24 of file path_trace_work_gpu.h.

Constructor & Destructor Documentation

◆ PathTraceWorkGPU()

PathTraceWorkGPU::PathTraceWorkGPU ( Device device,
Film film,
DeviceScene device_scene,
bool cancel_requested_flag 
)

Member Function Documentation

◆ adaptive_sampling_converge_filter_count_active()

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

◆ adaptive_sampling_convergence_check_count_active()

int PathTraceWorkGPU::adaptive_sampling_convergence_check_count_active ( float  threshold,
bool  reset 
)
protected

◆ alloc_integrator_path_split()

void PathTraceWorkGPU::alloc_integrator_path_split ( )
protected

◆ alloc_integrator_queue()

void PathTraceWorkGPU::alloc_integrator_queue ( )
protected

◆ alloc_integrator_soa()

void PathTraceWorkGPU::alloc_integrator_soa ( )
protected

◆ alloc_integrator_sorting()

void PathTraceWorkGPU::alloc_integrator_sorting ( )
protected

◆ 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

◆ compact_shadow_paths()

void PathTraceWorkGPU::compact_shadow_paths ( )
protected

◆ compute_queued_paths()

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

◆ compute_sorted_queued_paths()

void PathTraceWorkGPU::compute_sorted_queued_paths ( DeviceKernel  kernel,
DeviceKernel  queued_kernel,
const int  num_paths_limit 
)
protected

◆ copy_render_buffers_from_device()

bool PathTraceWorkGPU::copy_render_buffers_from_device ( )
overridevirtual

Implements PathTraceWork.

Definition at line 1060 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 1068 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,
int  num_samples 
)
overridevirtual

◆ copy_to_display_interop()

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

◆ copy_to_display_naive()

void PathTraceWorkGPU::copy_to_display_naive ( PathTraceDisplay display,
PassMode  pass_mode,
int  num_samples 
)
protected

◆ cryptomatte_postproces()

void PathTraceWorkGPU::cryptomatte_postproces ( )
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]

bool PathTraceWorkGPU::enqueue_path_iteration ( )
protected

◆ enqueue_path_iteration() [2/2]

void PathTraceWorkGPU::enqueue_path_iteration ( DeviceKernel  kernel,
const int  num_paths_limit = INT_MAX 
)
protected

◆ enqueue_reset()

void PathTraceWorkGPU::enqueue_reset ( )
protected

◆ enqueue_work_tiles() [1/2]

bool PathTraceWorkGPU::enqueue_work_tiles ( bool finished)
protected

◆ 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()

void PathTraceWorkGPU::get_render_tile_film_pixels ( const PassAccessor::Destination destination,
PassMode  pass_mode,
int  num_samples 
)
protected

◆ has_shadow_catcher()

bool PathTraceWorkGPU::has_shadow_catcher ( ) const
protected

◆ init_execution()

void PathTraceWorkGPU::init_execution ( )
overridevirtual

◆ kernel_creates_ao_paths()

bool PathTraceWorkGPU::kernel_creates_ao_paths ( DeviceKernel  kernel)
protected

◆ kernel_creates_shadow_paths()

bool PathTraceWorkGPU::kernel_creates_shadow_paths ( DeviceKernel  kernel)
protected

◆ 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()

void PathTraceWorkGPU::render_samples ( RenderStatistics statistics,
int  start_sample,
int  samples_num,
int  sample_offset 
)
overridevirtual

◆ shadow_catcher_count_possible_splits()

int PathTraceWorkGPU::shadow_catcher_count_possible_splits ( )
protected

◆ should_use_graphics_interop()

bool PathTraceWorkGPU::should_use_graphics_interop ( )
protected

◆ zero_render_buffers()

bool PathTraceWorkGPU::zero_render_buffers ( )
overridevirtual

Implements PathTraceWork.

Definition at line 1079 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 153 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 151 of file path_trace_work_gpu.h.

Referenced by copy_to_display_naive().

◆ integrator_next_main_path_index_

device_vector<int> PathTraceWorkGPU::integrator_next_main_path_index_
protected

Definition at line 139 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_path_split(), and enqueue_work_tiles().

◆ integrator_next_shadow_path_index_

device_vector<int> PathTraceWorkGPU::integrator_next_shadow_path_index_
protected

◆ integrator_queue_counter_

device_vector<IntegratorQueueCounter> PathTraceWorkGPU::integrator_queue_counter_
protected

◆ integrator_shader_mnee_sort_counter_

device_vector<int> PathTraceWorkGPU::integrator_shader_mnee_sort_counter_
protected

Definition at line 136 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and enqueue_reset().

◆ integrator_shader_raytrace_sort_counter_

device_vector<int> PathTraceWorkGPU::integrator_shader_raytrace_sort_counter_
protected

Definition at line 135 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and enqueue_reset().

◆ integrator_shader_sort_counter_

device_vector<int> PathTraceWorkGPU::integrator_shader_sort_counter_
protected

Definition at line 134 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and enqueue_reset().

◆ integrator_shader_sort_prefix_sum_

device_vector<int> PathTraceWorkGPU::integrator_shader_sort_prefix_sum_
protected

Definition at line 137 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and compute_sorted_queued_paths().

◆ integrator_state_gpu_

IntegratorStateGPU PathTraceWorkGPU::integrator_state_gpu_
protected

◆ integrator_state_soa_

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

Definition at line 128 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 129 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_soa().

◆ integrator_state_soa_volume_stack_size_

int PathTraceWorkGPU::integrator_state_soa_volume_stack_size_ = 0
protected

Definition at line 130 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_soa().

◆ interop_use_

bool PathTraceWorkGPU::interop_use_ = false
protected

Definition at line 157 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 156 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_

int PathTraceWorkGPU::max_num_paths_
protected

◆ min_num_active_main_paths_

int PathTraceWorkGPU::min_num_active_main_paths_
protected

Definition at line 167 of file path_trace_work_gpu.h.

Referenced by enqueue_work_tiles(), and PathTraceWorkGPU().

◆ num_queued_paths_

device_vector<int> PathTraceWorkGPU::num_queued_paths_
protected

◆ num_sort_partitions_

int PathTraceWorkGPU::num_sort_partitions_
protected

Definition at line 160 of file path_trace_work_gpu.h.

Referenced by alloc_integrator_sorting(), and compute_sorted_queued_paths().

◆ queue_

unique_ptr<DeviceQueue> PathTraceWorkGPU::queue_
protected

◆ queued_paths_

device_vector<int> PathTraceWorkGPU::queued_paths_
protected

◆ work_tile_scheduler_

WorkTileScheduler PathTraceWorkGPU::work_tile_scheduler_
protected

Definition at line 123 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 147 of file path_trace_work_gpu.h.

Referenced by enqueue_work_tiles().


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