Blender  V3.3
Macros | Functions
path_trace_work_gpu.cpp File Reference
#include "integrator/path_trace_work_gpu.h"
#include "integrator/path_trace_display.h"
#include "device/device.h"
#include "integrator/pass_accessor_gpu.h"
#include "scene/scene.h"
#include "session/buffers.h"
#include "util/log.h"
#include "util/string.h"
#include "util/tbb.h"
#include "util/time.h"
#include "kernel/types.h"
#include "kernel/integrator/state_template.h"
#include "kernel/integrator/shadow_state_template.h"

Go to the source code of this file.

Macros

#define KERNEL_STRUCT_BEGIN(name)   for (int array_index = 0;; array_index++) {
 
#define KERNEL_STRUCT_MEMBER(parent_struct, type, name, feature)   state_size += sizeof(type);
 
#define KERNEL_STRUCT_ARRAY_MEMBER(parent_struct, type, name, feature)   state_size += sizeof(type);
 
#define KERNEL_STRUCT_END(name)
 
#define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size)
 
#define KERNEL_STRUCT_VOLUME_STACK_SIZE   4
 
#define KERNEL_STRUCT_BEGIN(name)   for (int array_index = 0;; array_index++) {
 
#define KERNEL_STRUCT_MEMBER(parent_struct, type, name, feature)
 
#define KERNEL_STRUCT_ARRAY_MEMBER(parent_struct, type, name, feature)
 
#define KERNEL_STRUCT_END(name)
 
#define KERNEL_STRUCT_END_ARRAY(name, cpu_array_size, gpu_array_size)
 
#define KERNEL_STRUCT_VOLUME_STACK_SIZE   (integrator_state_soa_volume_stack_size_)
 

Functions

static CCL_NAMESPACE_BEGIN size_t estimate_single_state_size ()
 

Macro Definition Documentation

◆ KERNEL_STRUCT_ARRAY_MEMBER [1/2]

#define KERNEL_STRUCT_ARRAY_MEMBER (   parent_struct,
  type,
  name,
  feature 
)    state_size += sizeof(type);

◆ KERNEL_STRUCT_ARRAY_MEMBER [2/2]

#define KERNEL_STRUCT_ARRAY_MEMBER (   parent_struct,
  type,
  name,
  feature 
)
Value:
if ((kernel_features & (feature)) && \
(integrator_state_gpu_.parent_struct[array_index].name == nullptr)) { \
device_only_memory<type> *array = new device_only_memory<type>(device_, \
"integrator_state_" #name); \
array->alloc_to_device(max_num_paths_); \
integrator_state_soa_.emplace_back(array); \
integrator_state_gpu_.parent_struct[array_index].name = (type *)array->device_pointer; \
}
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type

◆ KERNEL_STRUCT_BEGIN [1/2]

#define KERNEL_STRUCT_BEGIN (   name)    for (int array_index = 0;; array_index++) {

◆ KERNEL_STRUCT_BEGIN [2/2]

#define KERNEL_STRUCT_BEGIN (   name)    for (int array_index = 0;; array_index++) {

◆ KERNEL_STRUCT_END [1/2]

#define KERNEL_STRUCT_END (   name)
Value:
break; \
}

◆ KERNEL_STRUCT_END [2/2]

#define KERNEL_STRUCT_END (   name)
Value:
break; \
}

◆ KERNEL_STRUCT_END_ARRAY [1/2]

#define KERNEL_STRUCT_END_ARRAY (   name,
  cpu_array_size,
  gpu_array_size 
)
Value:
if (array_index >= gpu_array_size - 1) { \
break; \
} \
}

◆ KERNEL_STRUCT_END_ARRAY [2/2]

#define KERNEL_STRUCT_END_ARRAY (   name,
  cpu_array_size,
  gpu_array_size 
)
Value:
if (array_index >= gpu_array_size - 1) { \
break; \
} \
}

◆ KERNEL_STRUCT_MEMBER [1/2]

#define KERNEL_STRUCT_MEMBER (   parent_struct,
  type,
  name,
  feature 
)    state_size += sizeof(type);

◆ KERNEL_STRUCT_MEMBER [2/2]

#define KERNEL_STRUCT_MEMBER (   parent_struct,
  type,
  name,
  feature 
)
Value:
if ((kernel_features & (feature)) && (integrator_state_gpu_.parent_struct.name == nullptr)) { \
device_only_memory<type> *array = new device_only_memory<type>(device_, \
"integrator_state_" #name); \
array->alloc_to_device(max_num_paths_); \
integrator_state_soa_.emplace_back(array); \
integrator_state_gpu_.parent_struct.name = (type *)array->device_pointer; \
}

◆ KERNEL_STRUCT_VOLUME_STACK_SIZE [1/2]

#define KERNEL_STRUCT_VOLUME_STACK_SIZE   4

◆ KERNEL_STRUCT_VOLUME_STACK_SIZE [2/2]

#define KERNEL_STRUCT_VOLUME_STACK_SIZE   (integrator_state_soa_volume_stack_size_)

Function Documentation

◆ estimate_single_state_size()

static CCL_NAMESPACE_BEGIN size_t estimate_single_state_size ( )
static

Definition at line 21 of file path_trace_work_gpu.cpp.