Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/svm/svm.h
| Show All 33 Lines | |||||
| * cached. | * cached. | ||||
| * | * | ||||
| * The result of shader execution will be a single closure. This means the | * The result of shader execution will be a single closure. This means the | ||||
| * closure type, associated label, data and weight. Sampling from multiple | * closure type, associated label, data and weight. Sampling from multiple | ||||
| * closures is supported through the mix closure node, the logic for that is | * closures is supported through the mix closure node, the logic for that is | ||||
| * mostly taken care of in the SVM compiler. | * mostly taken care of in the SVM compiler. | ||||
| */ | */ | ||||
| #include "svm_types.h" | #include "kernel/svm/svm_types.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| /* Stack */ | /* Stack */ | ||||
| ccl_device_inline float3 stack_load_float3(float *stack, uint a) | ccl_device_inline float3 stack_load_float3(float *stack, uint a) | ||||
| { | { | ||||
| kernel_assert(a+2 < SVM_STACK_SIZE); | kernel_assert(a+2 < SVM_STACK_SIZE); | ||||
| ▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | ccl_device_inline void decode_node_uchar4(uint i, uint *x, uint *y, uint *z, uint *w) | ||||
| if(z) *z = ((i >> 16) & 0xFF); | if(z) *z = ((i >> 16) & 0xFF); | ||||
| if(w) *w = ((i >> 24) & 0xFF); | if(w) *w = ((i >> 24) & 0xFF); | ||||
| } | } | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||
| /* Nodes */ | /* Nodes */ | ||||
| #include "svm_noise.h" | #include "kernel/svm/svm_noise.h" | ||||
| #include "svm_texture.h" | #include "svm_texture.h" | ||||
| #include "svm_color_util.h" | #include "kernel/svm/svm_color_util.h" | ||||
| #include "svm_math_util.h" | #include "kernel/svm/svm_math_util.h" | ||||
| #include "svm_attribute.h" | #include "kernel/svm/svm_attribute.h" | ||||
| #include "svm_gradient.h" | #include "kernel/svm/svm_gradient.h" | ||||
| #include "svm_blackbody.h" | #include "kernel/svm/svm_blackbody.h" | ||||
| #include "svm_closure.h" | #include "kernel/svm/svm_closure.h" | ||||
| #include "svm_noisetex.h" | #include "kernel/svm/svm_noisetex.h" | ||||
| #include "svm_convert.h" | #include "kernel/svm/svm_convert.h" | ||||
| #include "svm_displace.h" | #include "kernel/svm/svm_displace.h" | ||||
| #include "svm_fresnel.h" | #include "kernel/svm/svm_fresnel.h" | ||||
| #include "svm_wireframe.h" | #include "kernel/svm/svm_wireframe.h" | ||||
| #include "svm_wavelength.h" | #include "kernel/svm/svm_wavelength.h" | ||||
| #include "svm_camera.h" | #include "kernel/svm/svm_camera.h" | ||||
| #include "svm_geometry.h" | #include "kernel/svm/svm_geometry.h" | ||||
| #include "svm_hsv.h" | #include "kernel/svm/svm_hsv.h" | ||||
| #include "svm_image.h" | #include "kernel/svm/svm_image.h" | ||||
| #include "svm_gamma.h" | #include "kernel/svm/svm_gamma.h" | ||||
| #include "svm_brightness.h" | #include "kernel/svm/svm_brightness.h" | ||||
| #include "svm_invert.h" | #include "kernel/svm/svm_invert.h" | ||||
| #include "svm_light_path.h" | #include "kernel/svm/svm_light_path.h" | ||||
| #include "svm_magic.h" | #include "kernel/svm/svm_magic.h" | ||||
| #include "svm_mapping.h" | #include "kernel/svm/svm_mapping.h" | ||||
| #include "svm_normal.h" | #include "kernel/svm/svm_normal.h" | ||||
| #include "svm_wave.h" | #include "kernel/svm/svm_wave.h" | ||||
| #include "svm_math.h" | #include "kernel/svm/svm_math.h" | ||||
| #include "svm_mix.h" | #include "kernel/svm/svm_mix.h" | ||||
| #include "svm_ramp.h" | #include "kernel/svm/svm_ramp.h" | ||||
| #include "svm_sepcomb_hsv.h" | #include "kernel/svm/svm_sepcomb_hsv.h" | ||||
| #include "svm_sepcomb_vector.h" | #include "kernel/svm/svm_sepcomb_vector.h" | ||||
| #include "svm_musgrave.h" | #include "kernel/svm/svm_musgrave.h" | ||||
| #include "svm_sky.h" | #include "kernel/svm/svm_sky.h" | ||||
| #include "svm_tex_coord.h" | #include "kernel/svm/svm_tex_coord.h" | ||||
| #include "svm_value.h" | #include "kernel/svm/svm_value.h" | ||||
| #include "svm_voronoi.h" | #include "kernel/svm/svm_voronoi.h" | ||||
| #include "svm_checker.h" | #include "kernel/svm/svm_checker.h" | ||||
| #include "svm_brick.h" | #include "kernel/svm/svm_brick.h" | ||||
| #include "svm_vector_transform.h" | #include "kernel/svm/svm_vector_transform.h" | ||||
| #include "svm_voxel.h" | #include "kernel/svm/svm_voxel.h" | ||||
| #include "svm_bump.h" | #include "kernel/svm/svm_bump.h" | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| #define NODES_GROUP(group) ((group) <= __NODES_MAX_GROUP__) | #define NODES_GROUP(group) ((group) <= __NODES_MAX_GROUP__) | ||||
| #define NODES_FEATURE(feature) ((__NODES_FEATURES__ & (feature)) != 0) | #define NODES_FEATURE(feature) ((__NODES_FEATURES__ & (feature)) != 0) | ||||
| /* Main Interpreter Loop */ | /* Main Interpreter Loop */ | ||||
| ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ccl_addr_space PathState *state, ShaderType type, int path_flag) | ccl_device_noinline void svm_eval_nodes(KernelGlobals *kg, ShaderData *sd, ccl_addr_space PathState *state, ShaderType type, int path_flag) | ||||
| ▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines | |||||