Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/integrator/path_trace_work.h
| Show All 27 Lines | |||||
| class Device; | class Device; | ||||
| class DeviceScene; | class DeviceScene; | ||||
| class Film; | class Film; | ||||
| class GPUDisplay; | class GPUDisplay; | ||||
| class RenderBuffers; | class RenderBuffers; | ||||
| class PathTraceWork { | class PathTraceWork { | ||||
| public: | public: | ||||
| struct RenderStatistics { | |||||
| float occupancy = 1.0f; | |||||
| }; | |||||
| /* Create path trace work which fits best the device. | /* Create path trace work which fits best the device. | ||||
| * | * | ||||
| * The cancel request flag is used for a cheap check whether cancel is to berformed as soon as | * The cancel request flag is used for a cheap check whether cancel is to berformed as soon as | ||||
| * possible. This could be, for rexample, request to cancel rendering on camera navigation in | * possible. This could be, for rexample, request to cancel rendering on camera navigation in | ||||
| * viewport. */ | * viewport. */ | ||||
| static unique_ptr<PathTraceWork> create(Device *device, | static unique_ptr<PathTraceWork> create(Device *device, | ||||
| Film *film, | Film *film, | ||||
| DeviceScene *device_scene, | DeviceScene *device_scene, | ||||
| Show All 22 Lines | public: | ||||
| * Will ensure that all device queues are initialized for execution. | * Will ensure that all device queues are initialized for execution. | ||||
| * | * | ||||
| * This method is to be called after any change in the scene. It is not needed to call it prior | * This method is to be called after any change in the scene. It is not needed to call it prior | ||||
| * to an every call of the `render_samples()`. */ | * to an every call of the `render_samples()`. */ | ||||
| virtual void init_execution() = 0; | virtual void init_execution() = 0; | ||||
| /* Render given number of samples as a synchronous blocking call. | /* Render given number of samples as a synchronous blocking call. | ||||
| * The samples are added to the render buffer associated with this work. */ | * The samples are added to the render buffer associated with this work. */ | ||||
| virtual void render_samples(int start_sample, int samples_num) = 0; | virtual void render_samples(RenderStatistics &statistics, int start_sample, int samples_num) = 0; | ||||
| /* Copy render result from this work to the corresponding place of the GPU display. | /* Copy render result from this work to the corresponding place of the GPU display. | ||||
| * | * | ||||
| * The `pass_mode` indicates whether to access denoised or noisy version of the display pass. The | * The `pass_mode` indicates whether to access denoised or noisy version of the display pass. The | ||||
| * noisy pass mode will be passed here when it is known that the buffer does not have denoised | * noisy pass mode will be passed here when it is known that the buffer does not have denoised | ||||
| * passes yet (because denoiser did not run). If the denoised pass is requested and denoiser is | * passes yet (because denoiser did not run). If the denoised pass is requested and denoiser is | ||||
| * not used then this function will fall-back to the noisy pass instead. */ | * not used then this function will fall-back to the noisy pass instead. */ | ||||
| virtual void copy_to_gpu_display(GPUDisplay *gpu_display, | virtual void copy_to_gpu_display(GPUDisplay *gpu_display, | ||||
| ▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines | |||||