Blender V4.3
services_gpu.h File Reference
#include "kernel/tables.h"
#include "kernel/util/differential.h"
#include "kernel/osl/osl.h"
#include "kernel/svm/math_util.h"
#include "kernel/util/color.h"
#include "kernel/geom/object.h"
#include "util/transform.h"
#include "kernel/geom/geom.h"
#include "kernel/svm/noise.h"
#include "util/hash.h"
#include "kernel/util/ies.h"

Go to the source code of this file.

Namespaces

namespace  DeviceStrings
 

Macros

#define OSL_NOISE_IMPL(name, op)
 
#define OSL_OP_IMPL_II(name, op)
 
#define OSL_OP_IMPL_IF(name, op)
 
#define OSL_OP_IMPL_FF(name, op)
 
#define OSL_OP_IMPL_DFDF(name, op)
 
#define OSL_OP_IMPL_DFDV(name, op)
 
#define OSL_OP_IMPL_FV(name, op)
 
#define OSL_OP_IMPL_VV(name, op)
 
#define OSL_OP_IMPL_VV_(name, op)
 
#define OSL_OP_IMPL_DVDV(name, op)
 
#define OSL_OP_IMPL_DVDV_(name, op)
 
#define OSL_OP_IMPL_III(name, op)
 
#define OSL_OP_IMPL_FFF(name, op)
 
#define OSL_OP_IMPL_FVV(name, op)
 
#define OSL_OP_IMPL_DFFDF(name, op)
 
#define OSL_OP_IMPL_DFDFF(name, op)
 
#define OSL_OP_IMPL_DFDFDF(name, op)
 
#define OSL_OP_IMPL_DFVDV(name, op)
 
#define OSL_OP_IMPL_DFDVV(name, op)
 
#define OSL_OP_IMPL_DFDVDV(name, op)
 
#define OSL_OP_IMPL_VVF_(name, op)
 
#define OSL_OP_IMPL_VVV(name, op)
 
#define OSL_OP_IMPL_VVV_(name, op)
 
#define OSL_OP_IMPL_DVVDF_(name, op)
 
#define OSL_OP_IMPL_DVDVF_(name, op)
 
#define OSL_OP_IMPL_DVVDV(name, op)
 
#define OSL_OP_IMPL_DVVDV_(name, op)
 
#define OSL_OP_IMPL_DVDVV(name, op)
 
#define OSL_OP_IMPL_DVDVV_(name, op)
 
#define OSL_OP_IMPL_DVDVDF_(name, op)
 
#define OSL_OP_IMPL_DVDVDV(name, op)
 
#define OSL_OP_IMPL_DVDVDV_(name, op)
 
#define OSL_OP_IMPL_FFFF(name, op)
 
#define OSL_OP_IMPL_DFFFDF(name, op)
 
#define OSL_OP_IMPL_DFFDFF(name, op)
 
#define OSL_OP_IMPL_DFFDFDF(name, op)
 
#define OSL_OP_IMPL_DFDFFF(name, op)
 
#define OSL_OP_IMPL_DFDFFDF(name, op)
 
#define OSL_OP_IMPL_DFDFDFF(name, op)
 
#define OSL_OP_IMPL_DFDFDFDF(name, op)
 
#define OSL_OP_IMPL_XX(name, op)
 
#define OSL_OP_IMPL_XXX(name, op)
 

Typedefs

typedef long long TypeDesc
 

Functions

ccl_device_extern ccl_private OSLClosureosl_mul_closure_color (ccl_private ShaderGlobals *sg, ccl_private OSLClosure *a, ccl_private const float3 *weight)
 
ccl_device_extern ccl_private OSLClosureosl_mul_closure_float (ccl_private ShaderGlobals *sg, ccl_private OSLClosure *a, float weight)
 
ccl_device_extern ccl_private OSLClosureosl_add_closure_closure (ccl_private ShaderGlobals *sg, ccl_private OSLClosure *a, ccl_private OSLClosure *b)
 
ccl_device_extern ccl_private OSLClosureosl_allocate_closure_component (ccl_private ShaderGlobals *sg, int id, int size)
 
ccl_device_extern ccl_private OSLClosureosl_allocate_weighted_closure_component (ccl_private ShaderGlobals *sg, int id, int size, ccl_private const float3 *weight)
 
ccl_device_extern void osl_error (ccl_private ShaderGlobals *sg, const char *format, void *args)
 
ccl_device_extern void osl_printf (ccl_private ShaderGlobals *sg, const char *format, void *args)
 
ccl_device_extern void osl_warning (ccl_private ShaderGlobals *sg, const char *format, void *args)
 
ccl_device_extern uint osl_range_check (int indexvalue, int length, DeviceString symname, ccl_private ShaderGlobals *sg, DeviceString sourcefile, int sourceline, DeviceString groupname, int layer, DeviceString layername, DeviceString shadername)
 
ccl_device_extern uint osl_range_check_err (int indexvalue, int length, DeviceString symname, ccl_private ShaderGlobals *sg, DeviceString sourcefile, int sourceline, DeviceString groupname, int layer, DeviceString layername, DeviceString shadername)
 
ccl_device_extern void osl_blackbody_vf (ccl_private ShaderGlobals *sg, ccl_private float3 *result, float temperature)
 
ccl_device_extern void osl_wavelength_color_vf (ccl_private ShaderGlobals *sg, ccl_private float3 *result, float lambda_nm)
 
ccl_device_extern void osl_luminance_fv (ccl_private ShaderGlobals *sg, ccl_private float *result, ccl_private float3 *color)
 
ccl_device_extern void osl_luminance_dfdv (ccl_private ShaderGlobals *sg, ccl_private float *result, ccl_private float3 *color)
 
ccl_device_extern void osl_prepend_color_from (ccl_private ShaderGlobals *sg, ccl_private float3 *res, DeviceString from)
 
ccl_device_extern bool osl_transformc (ccl_private ShaderGlobals *sg, ccl_private float3 *c_in, int c_in_derivs, ccl_private float3 *c_out, int c_out_derivs, DeviceString from, DeviceString to)
 
ccl_device_forceinline void copy_matrix (ccl_private float *res, const Transform &tfm)
 
ccl_device_forceinline void copy_matrix (ccl_private float *res, const ProjectionTransform &tfm)
 
ccl_device_forceinline void copy_identity_matrix (ccl_private float *res, float value=1.0f)
 
ccl_device_forceinline Transform convert_transform (ccl_private const float *m)
 
ccl_device_extern void osl_mul_mmm (ccl_private float *res, ccl_private const float *a, ccl_private const float *b)
 
ccl_device_extern void osl_mul_mmf (ccl_private float *res, ccl_private const float *a, float b)
 
ccl_device_extern void osl_div_mmm (ccl_private float *res, ccl_private const float *a, ccl_private const float *b)
 
ccl_device_extern void osl_div_mmf (ccl_private float *res, ccl_private const float *a, float b)
 
ccl_device_extern void osl_div_mfm (ccl_private float *res, float a, ccl_private const float *b)
 
ccl_device_extern void osl_div_m_ff (ccl_private float *res, float a, float b)
 
ccl_device_extern void osl_transform_vmv (ccl_private float3 *res, ccl_private const float *m, ccl_private const float3 *v)
 
ccl_device_extern void osl_transform_dvmdv (ccl_private float3 *res, ccl_private const float *m, ccl_private const float3 *v)
 
ccl_device_extern void osl_transformv_vmv (ccl_private float3 *res, ccl_private const float *m, ccl_private const float3 *v)
 
ccl_device_extern void osl_transformv_dvmdv (ccl_private float3 *res, ccl_private const float *m, ccl_private const float3 *v)
 
ccl_device_extern void osl_transformn_vmv (ccl_private float3 *res, ccl_private const float *m, ccl_private const float3 *v)
 
ccl_device_extern void osl_transformn_dvmdv (ccl_private float3 *res, ccl_private const float *m, ccl_private const float3 *v)
 
ccl_device_extern bool osl_get_matrix (ccl_private ShaderGlobals *sg, ccl_private float *res, DeviceString from)
 
ccl_device_extern bool osl_get_inverse_matrix (ccl_private ShaderGlobals *sg, ccl_private float *res, DeviceString to)
 
ccl_device_extern bool osl_prepend_matrix_from (ccl_private ShaderGlobals *sg, ccl_private float *res, DeviceString from)
 
ccl_device_extern bool osl_get_from_to_matrix (ccl_private ShaderGlobals *sg, ccl_private float *res, DeviceString from, DeviceString to)
 
ccl_device_extern bool osl_transform_triple (ccl_private ShaderGlobals *sg, ccl_private float3 *p_in, int p_in_derivs, ccl_private float3 *p_out, int p_out_derivs, DeviceString from, DeviceString to, int vectype)
 
ccl_device_extern bool osl_transform_triple_nonlinear (ccl_private ShaderGlobals *sg, ccl_private float3 *p_in, int p_in_derivs, ccl_private float3 *p_out, int p_out_derivs, DeviceString from, DeviceString to, int vectype)
 
ccl_device_extern void osl_transpose_mm (ccl_private float *res, ccl_private const float *m)
 
ccl_device_inline bool set_attribute_float (ccl_private float fval[3], TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool set_attribute_float (float f, TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool set_attribute_float2 (ccl_private float2 fval[3], TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool set_attribute_float3 (ccl_private float3 fval[3], TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool set_attribute_float3 (float3 f, TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool set_attribute_float4 (ccl_private float4 fval[3], TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool set_attribute_matrix (ccl_private const Transform &tfm, TypeDesc type, ccl_private void *val)
 
ccl_device_inline bool get_background_attribute (KernelGlobals kg, ccl_private ShaderData *sd, DeviceString name, TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool get_object_attribute (KernelGlobals kg, ccl_private ShaderData *sd, const AttributeDescriptor &desc, TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_inline bool get_object_standard_attribute (KernelGlobals kg, ccl_private ShaderData *sd, DeviceString name, TypeDesc type, bool derivatives, ccl_private void *val)
 
ccl_device_extern bool osl_get_attribute (ccl_private ShaderGlobals *sg, int derivatives, DeviceString object_name, DeviceString name, int array_lookup, int index, TypeDesc type, ccl_private void *res)
 
ccl_device_extern uint osl_hash_ii (int x)
 
ccl_device_extern uint osl_hash_if (float x)
 
ccl_device_extern uint osl_hash_iff (float x, float y)
 
ccl_device_extern uint osl_hash_iv (ccl_private const float3 *v)
 
ccl_device_extern uint osl_hash_ivf (ccl_private const float3 *v, float w)
 
ccl_device_extern OSLNoiseOptionsosl_get_noise_options (ccl_private ShaderGlobals *sg)
 
ccl_device_extern void osl_noiseparams_set_anisotropic (ccl_private OSLNoiseOptions *opt, int anisotropic)
 
ccl_device_extern void osl_noiseparams_set_do_filter (ccl_private OSLNoiseOptions *opt, int do_filter)
 
ccl_device_extern void osl_noiseparams_set_direction (ccl_private OSLNoiseOptions *opt, float3 *direction)
 
ccl_device_extern void osl_noiseparams_set_bandwidth (ccl_private OSLNoiseOptions *opt, float bandwidth)
 
ccl_device_extern void osl_noiseparams_set_impulses (ccl_private OSLNoiseOptions *opt, float impulses)
 
ccl_device_forceinline float hashnoise_1d (float p)
 
ccl_device_forceinline float hashnoise_2d (float2 p)
 
ccl_device_forceinline float hashnoise_3d (float3 p)
 
ccl_device_forceinline float hashnoise_4d (float4 p)
 
ccl_device_extern ccl_private OSLTextureOptionsosl_get_texture_options (ccl_private ShaderGlobals *sg)
 
ccl_device_extern void osl_texture_set_firstchannel (ccl_private OSLTextureOptions *opt, int firstchannel)
 
ccl_device_extern void osl_texture_set_swrap_code (ccl_private OSLTextureOptions *opt, int mode)
 
ccl_device_extern void osl_texture_set_twrap_code (ccl_private OSLTextureOptions *opt, int mode)
 
ccl_device_extern void osl_texture_set_rwrap_code (ccl_private OSLTextureOptions *opt, int mode)
 
ccl_device_extern void osl_texture_set_stwrap_code (ccl_private OSLTextureOptions *opt, int mode)
 
ccl_device_extern void osl_texture_set_sblur (ccl_private OSLTextureOptions *opt, float blur)
 
ccl_device_extern void osl_texture_set_tblur (ccl_private OSLTextureOptions *opt, float blur)
 
ccl_device_extern void osl_texture_set_rblur (ccl_private OSLTextureOptions *opt, float blur)
 
ccl_device_extern void osl_texture_set_stblur (ccl_private OSLTextureOptions *opt, float blur)
 
ccl_device_extern void osl_texture_set_swidth (ccl_private OSLTextureOptions *opt, float width)
 
ccl_device_extern void osl_texture_set_twidth (ccl_private OSLTextureOptions *opt, float width)
 
ccl_device_extern void osl_texture_set_rwidth (ccl_private OSLTextureOptions *opt, float width)
 
ccl_device_extern void osl_texture_set_stwidth (ccl_private OSLTextureOptions *opt, float width)
 
ccl_device_extern void osl_texture_set_fill (ccl_private OSLTextureOptions *opt, float fill)
 
ccl_device_extern void osl_texture_set_time (ccl_private OSLTextureOptions *opt, float time)
 
ccl_device_extern void osl_texture_set_interp_code (ccl_private OSLTextureOptions *opt, int mode)
 
ccl_device_extern void osl_texture_set_subimage (ccl_private OSLTextureOptions *opt, int subimage)
 
ccl_device_extern void osl_texture_set_missingcolor_arena (ccl_private OSLTextureOptions *opt, ccl_private float3 *color)
 
ccl_device_extern void osl_texture_set_missingcolor_alpha (ccl_private OSLTextureOptions *opt, int nchannels, float alpha)
 
ccl_device_extern bool osl_texture (ccl_private ShaderGlobals *sg, DeviceString filename, ccl_private void *texture_handle, ccl_private OSLTextureOptions *opt, float s, float t, float dsdx, float dtdx, float dsdy, float dtdy, int nchannels, ccl_private float *result, ccl_private float *dresultdx, ccl_private float *dresultdy, ccl_private float *alpha, ccl_private float *dalphadx, ccl_private float *dalphady, ccl_private void *errormessage)
 
ccl_device_extern bool osl_texture3d (ccl_private ShaderGlobals *sg, DeviceString filename, ccl_private void *texture_handle, ccl_private OSLTextureOptions *opt, ccl_private const float3 *P, ccl_private const float3 *dPdx, ccl_private const float3 *dPdy, ccl_private const float3 *dPdz, int nchannels, ccl_private float *result, ccl_private float *dresultds, ccl_private float *dresultdt, ccl_private float *alpha, ccl_private float *dalphadx, ccl_private float *dalphady, ccl_private void *errormessage)
 
ccl_device_extern bool osl_environment (ccl_private ShaderGlobals *sg, DeviceString filename, ccl_private void *texture_handle, ccl_private OSLTextureOptions *opt, ccl_private const float3 *R, ccl_private const float3 *dRdx, ccl_private const float3 *dRdy, int nchannels, ccl_private float *result, ccl_private float *dresultds, ccl_private float *dresultdt, ccl_private float *alpha, ccl_private float *dalphax, ccl_private float *dalphay, ccl_private void *errormessage)
 
ccl_device_extern bool osl_get_textureinfo (ccl_private ShaderGlobals *sg, DeviceString filename, ccl_private void *texture_handle, DeviceString dataname, int basetype, int arraylen, int aggegrate, ccl_private void *data, ccl_private void *errormessage)
 
ccl_device_extern bool osl_get_textureinfo_st (ccl_private ShaderGlobals *sg, DeviceString filename, ccl_private void *texture_handle, float s, float t, DeviceString dataname, int basetype, int arraylen, int aggegrate, ccl_private void *data, ccl_private void *errormessage)
 
ccl_device_forceinline int safe_divide (int a, int b)
 
ccl_device_forceinline int safe_modulo (int a, int b)
 
ccl_device_extern void osl_sincos_fff (float a, ccl_private float *b, ccl_private float *c)
 
ccl_device_extern void osl_sincos_dfdff (ccl_private const float *a, ccl_private float *b, ccl_private float *c)
 
ccl_device_extern void osl_sincos_dffdf (ccl_private const float *a, ccl_private float *b, ccl_private float *c)
 
ccl_device_extern void osl_sincos_dfdfdf (ccl_private const float *a, ccl_private float *b, ccl_private float *c)
 
ccl_device_extern void osl_sincos_vvv (ccl_private const float3 *a, ccl_private float3 *b, ccl_private float3 *c)
 
ccl_device_extern void osl_sincos_dvdvv (ccl_private const float3 *a, ccl_private float3 *b, ccl_private float3 *c)
 
ccl_device_extern void osl_sincos_dvvdv (ccl_private const float3 *a, ccl_private float3 *b, ccl_private float3 *c)
 
ccl_device_extern void osl_sincos_dvdvdv (ccl_private const float3 *a, ccl_private float3 *b, ccl_private float3 *c)
 
ccl_device_forceinline float step_impl (float edge, float x)
 
ccl_device_extern void osl_calculatenormal (ccl_private float3 *res, ccl_private ShaderGlobals *sg, ccl_private const float3 *p)
 
ccl_device_extern float osl_area (ccl_private const float3 *p)
 
ccl_device_extern float osl_filterwidth_fdf (ccl_private const float *x)
 
ccl_device_extern void osl_filterwidth_vdv (ccl_private float *res, ccl_private const float *x)
 
ccl_device_extern bool osl_raytype_bit (ccl_private ShaderGlobals *sg, int bit)
 

Variables

ccl_device_constant DeviceString DeviceStrings::_emptystring_ = 0ull
 
ccl_device_constant DeviceString DeviceStrings::u_common = 14645198576927606093ull
 
ccl_device_constant DeviceString DeviceStrings::u_world = 16436542438370751598ull
 
ccl_device_constant DeviceString DeviceStrings::u_shader = 4279676006089868ull
 
ccl_device_constant DeviceString DeviceStrings::u_object = 973692718279674627ull
 
ccl_device_constant DeviceString DeviceStrings::u_ndc = 5148305047403260775ull
 
ccl_device_constant DeviceString DeviceStrings::u_screen = 14159088609039777114ull
 
ccl_device_constant DeviceString DeviceStrings::u_camera = 2159505832145726196ull
 
ccl_device_constant DeviceString DeviceStrings::u_raster = 7759263238610201778ull
 
ccl_device_constant DeviceString DeviceStrings::u_hsv = 2177035556331879497ull
 
ccl_device_constant DeviceString DeviceStrings::u_hsl = 7749766809258288148ull
 
ccl_device_constant DeviceString DeviceStrings::u_xyz = 4957977063494975483ull
 
ccl_device_constant DeviceString DeviceStrings::u_xyy = 5138822319725660255ull
 
ccl_device_constant DeviceString DeviceStrings::u_srgb = 15368599878474175032ull
 
ccl_device_constant DeviceString DeviceStrings::u_object_location = 7846190347358762897ull
 
ccl_device_constant DeviceString DeviceStrings::u_object_color = 12695623857059169556ull
 
ccl_device_constant DeviceString DeviceStrings::u_object_alpha = 11165053919428293151ull
 
ccl_device_constant DeviceString DeviceStrings::u_object_index = 6588325838217472556ull
 
ccl_device_constant DeviceString DeviceStrings::u_object_is_light = 13979755312845091842ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_dupli_generated = 6715607178003388908ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_dupli_uv = 1294253317490155849ull
 
ccl_device_constant DeviceString DeviceStrings::u_material_index = 741770758159634623ull
 
ccl_device_constant DeviceString DeviceStrings::u_object_random = 15789063994977955884ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_index = 9489711748229903784ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_random = 17993722202766855761ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_age = 7380730644710951109ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_lifetime = 16576828923156200061ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_location = 10309536211423573010ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_rotation = 17858543768041168459ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_size = 16461524249715420389ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_velocity = 13199101248768308863ull
 
ccl_device_constant DeviceString DeviceStrings::u_particle_angular_velocity = 16327930120486517910ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_numpolyvertices = 382043551489988826ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_trianglevertices = 17839267571524187074ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_polyvertices = 1345577201967881769ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_name = 13606338128269760050ull
 
ccl_device_constant DeviceString DeviceStrings::u_geom_undisplaced = 12431586303019276305ull
 
ccl_device_constant DeviceString DeviceStrings::u_is_smooth = 857544214094480123ull
 
ccl_device_constant DeviceString DeviceStrings::u_is_curve = 129742495633653138ull
 
ccl_device_constant DeviceString DeviceStrings::u_curve_thickness = 10605802038397633852ull
 
ccl_device_constant DeviceString DeviceStrings::u_curve_length = 11423459517663715453ull
 
ccl_device_constant DeviceString DeviceStrings::u_curve_tangent_normal = 12301397394034985633ull
 
ccl_device_constant DeviceString DeviceStrings::u_curve_random = 15293085049960492358ull
 
ccl_device_constant DeviceString DeviceStrings::u_is_point = 2511357849436175953ull
 
ccl_device_constant DeviceString DeviceStrings::u_point_radius = 9956381140398668479ull
 
ccl_device_constant DeviceString DeviceStrings::u_point_position = 15684484280742966916ull
 
ccl_device_constant DeviceString DeviceStrings::u_point_random = 5632627207092325544ull
 
ccl_device_constant DeviceString DeviceStrings::u_normal_map_normal = 10718948685686827073
 
ccl_device_constant DeviceString DeviceStrings::u_path_ray_length = 16391985802412544524ull
 
ccl_device_constant DeviceString DeviceStrings::u_path_ray_depth = 16643933224879500399ull
 
ccl_device_constant DeviceString DeviceStrings::u_path_diffuse_depth = 13191651286699118408ull
 
ccl_device_constant DeviceString DeviceStrings::u_path_glossy_depth = 15717768399057252940ull
 
ccl_device_constant DeviceString DeviceStrings::u_path_transparent_depth = 7821650266475578543ull
 
ccl_device_constant DeviceString DeviceStrings::u_path_transmission_depth = 15113408892323917624ull
 

Macro Definition Documentation

◆ OSL_NOISE_IMPL

#define OSL_NOISE_IMPL ( name,
op )

Definition at line 1374 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDF

#define OSL_OP_IMPL_DFDF ( name,
op )
Value:
ccl_device_extern void name##_dfdf(ccl_private float *res, ccl_private const float *a) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i]); \
} \
}
#define ccl_private
#define ccl_device_extern

Definition at line 1794 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDFDF

#define OSL_OP_IMPL_DFDFDF ( name,
op )
Value:
ccl_device_extern void name##_dfdfdf( \
ccl_private float *res, ccl_private const float *a, ccl_private const float *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[i]); \
} \
}
local_group_size(16, 16) .push_constant(Type b

Definition at line 1873 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDFDFDF

#define OSL_OP_IMPL_DFDFDFDF ( name,
op )
Value:
ccl_device_extern void name##_dfdfdfdf(ccl_private float *res, \
ccl_private const float *a, \
ccl_private const float *b, \
ccl_private const float *c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[i], c[i]); \
} \
}

Definition at line 2066 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDFDFF

#define OSL_OP_IMPL_DFDFDFF ( name,
op )
Value:
ccl_device_extern void name##_dfdfdff( \
ccl_private float *res, ccl_private const float *a, ccl_private const float *b, float c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[i], c); \
} \
}

Definition at line 2058 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDFF

#define OSL_OP_IMPL_DFDFF ( name,
op )
Value:
ccl_device_extern void name##_dfdff( \
ccl_private float *res, ccl_private const float *a, float b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b); \
} \
}

Definition at line 1865 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDFFDF

#define OSL_OP_IMPL_DFDFFDF ( name,
op )
Value:
ccl_device_extern void name##_dfdffdf( \
ccl_private float *res, ccl_private const float *a, float b, ccl_private const float *c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b, c[i]); \
} \
}

Definition at line 2050 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDFFF

#define OSL_OP_IMPL_DFDFFF ( name,
op )
Value:
ccl_device_extern void name##_dfdfff( \
ccl_private float *res, ccl_private const float *a, float b, float c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b, c); \
} \
}

Definition at line 2042 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDV

#define OSL_OP_IMPL_DFDV ( name,
op )
Value:
ccl_device_extern void name##_dfdv(ccl_private float *res, ccl_private const float3 *a) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i]); \
} \
}

Definition at line 1801 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDVDV

#define OSL_OP_IMPL_DFDVDV ( name,
op )
Value:
ccl_device_extern void name##_dfdvdv( \
ccl_private float *res, ccl_private const float3 *a, ccl_private const float3 *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[i]); \
} \
}

Definition at line 1897 of file services_gpu.h.

◆ OSL_OP_IMPL_DFDVV

#define OSL_OP_IMPL_DFDVV ( name,
op )
Value:
ccl_device_extern void name##_dfdvv( \
ccl_private float *res, ccl_private const float3 *a, ccl_private const float3 *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[0]); \
} \
}

Definition at line 1889 of file services_gpu.h.

◆ OSL_OP_IMPL_DFFDF

#define OSL_OP_IMPL_DFFDF ( name,
op )
Value:
ccl_device_extern void name##_dffdf( \
ccl_private float *res, float a, ccl_private const float *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a, b[i]); \
} \
}

Definition at line 1857 of file services_gpu.h.

◆ OSL_OP_IMPL_DFFDFDF

#define OSL_OP_IMPL_DFFDFDF ( name,
op )
Value:
ccl_device_extern void name##_dffdfdf( \
ccl_private float *res, float a, ccl_private const float *b, ccl_private const float *c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a, b[i], c[i]); \
} \
}

Definition at line 2033 of file services_gpu.h.

◆ OSL_OP_IMPL_DFFDFF

#define OSL_OP_IMPL_DFFDFF ( name,
op )
Value:
ccl_device_extern void name##_dffdff( \
ccl_private float *res, float a, ccl_private const float *b, float c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a, b[i], c); \
} \
}

Definition at line 2025 of file services_gpu.h.

◆ OSL_OP_IMPL_DFFFDF

#define OSL_OP_IMPL_DFFFDF ( name,
op )
Value:
ccl_device_extern void name##_dfffdf( \
ccl_private float *res, float a, float b, ccl_private const float *c) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a, b, c[i]); \
} \
}

Definition at line 2017 of file services_gpu.h.

◆ OSL_OP_IMPL_DFVDV

#define OSL_OP_IMPL_DFVDV ( name,
op )
Value:
ccl_device_extern void name##_dfvdv( \
ccl_private float *res, ccl_private const float3 *a, ccl_private const float3 *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[0], b[i]); \
} \
}

Definition at line 1881 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDV

#define OSL_OP_IMPL_DVDV ( name,
op )
Value:
ccl_device_extern void name##_dvdv(ccl_private float3 *res, ccl_private const float3 *a) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i]); \
} \
}

Definition at line 1825 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDV_

#define OSL_OP_IMPL_DVDV_ ( name,
op )
Value:
ccl_device_extern void name##_dvdv(ccl_private float3 *res, ccl_private const float3 *a) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[i].x); \
res[i].y = op(a[i].y); \
res[i].z = op(a[i].z); \
} \
}
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
Definition btQuadWord.h:117

Definition at line 1832 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDVDF_

#define OSL_OP_IMPL_DVDVDF_ ( name,
op )
Value:
ccl_device_extern void name##_dvdvdf( \
ccl_private float3 *res, ccl_private const float3 *a, ccl_private const float *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[i].x, b[i]); \
res[i].y = op(a[i].y, b[i]); \
res[i].z = op(a[i].z, b[i]); \
} \
}

Definition at line 1983 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDVDV

#define OSL_OP_IMPL_DVDVDV ( name,
op )
Value:
ccl_device_extern void name##_dvdvdv( \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[i]); \
} \
}

Definition at line 1993 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDVDV_

#define OSL_OP_IMPL_DVDVDV_ ( name,
op )
Value:
ccl_device_extern void name##_dvdvdv( \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[i].x, b[i].x); \
res[i].y = op(a[i].y, b[i].y); \
res[i].z = op(a[i].z, b[i].z); \
} \
}

Definition at line 2001 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDVF_

#define OSL_OP_IMPL_DVDVF_ ( name,
op )
Value:
ccl_device_extern void name##_dvdvf( \
ccl_private float3 *res, ccl_private const float3 *a, float b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[i].x, b); \
res[i].y = op(a[i].y, b); \
res[i].z = op(a[i].z, b); \
} \
}

Definition at line 1937 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDVV

#define OSL_OP_IMPL_DVDVV ( name,
op )
Value:
ccl_device_extern void name##_dvdvv( \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[i], b[0]); \
} \
}

Definition at line 1965 of file services_gpu.h.

◆ OSL_OP_IMPL_DVDVV_

#define OSL_OP_IMPL_DVDVV_ ( name,
op )
Value:
ccl_device_extern void name##_dvdvv( \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[i].x, b[0].x); \
res[i].y = op(a[i].y, b[0].y); \
res[i].z = op(a[i].z, b[0].z); \
} \
}

Definition at line 1973 of file services_gpu.h.

◆ OSL_OP_IMPL_DVVDF_

#define OSL_OP_IMPL_DVVDF_ ( name,
op )
Value:
ccl_device_extern void name##_dvvdf( \
ccl_private float3 *res, ccl_private const float3 *a, ccl_private const float *b) \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[0].x, b[i]); \
res[i].y = op(a[0].y, b[i]); \
res[i].z = op(a[0].z, b[i]); \
} \
}

Definition at line 1927 of file services_gpu.h.

◆ OSL_OP_IMPL_DVVDV

#define OSL_OP_IMPL_DVVDV ( name,
op )
Value:
ccl_device_extern void name##_dvvdv( \
{ \
for (int i = 0; i < 3; ++i) { \
res[i] = op(a[0], b[i]); \
} \
}

Definition at line 1947 of file services_gpu.h.

◆ OSL_OP_IMPL_DVVDV_

#define OSL_OP_IMPL_DVVDV_ ( name,
op )
Value:
ccl_device_extern void name##_dvvdv( \
{ \
for (int i = 0; i < 3; ++i) { \
res[i].x = op(a[0].x, b[i].x); \
res[i].y = op(a[0].y, b[i].y); \
res[i].z = op(a[0].z, b[i].z); \
} \
}

Definition at line 1955 of file services_gpu.h.

◆ OSL_OP_IMPL_FF

#define OSL_OP_IMPL_FF ( name,
op )
Value:
ccl_device_extern float name##_ff(float a) \
{ \
return op(a); \
}

Definition at line 1789 of file services_gpu.h.

◆ OSL_OP_IMPL_FFF

#define OSL_OP_IMPL_FFF ( name,
op )
Value:
ccl_device_extern float name##_fff(float a, float b) \
{ \
return op(a, b); \
}

Definition at line 1847 of file services_gpu.h.

◆ OSL_OP_IMPL_FFFF

#define OSL_OP_IMPL_FFFF ( name,
op )
Value:
ccl_device_extern float name##_ffff(float a, float b, float c) \
{ \
return op(a, b, c); \
}

Definition at line 2012 of file services_gpu.h.

◆ OSL_OP_IMPL_FV

#define OSL_OP_IMPL_FV ( name,
op )
Value:
ccl_device_extern float name##_fv(ccl_private const float3 *a) \
{ \
return op(*a); \
}

Definition at line 1808 of file services_gpu.h.

◆ OSL_OP_IMPL_FVV

#define OSL_OP_IMPL_FVV ( name,
op )
Value:
ccl_device_extern float name##_fvv(ccl_private const float3 *a, ccl_private const float3 *b) \
{ \
return op(*a, *b); \
}

Definition at line 1852 of file services_gpu.h.

◆ OSL_OP_IMPL_IF

#define OSL_OP_IMPL_IF ( name,
op )
Value:
ccl_device_extern int name##_if(float a) \
{ \
return op(a); \
}

Definition at line 1784 of file services_gpu.h.

◆ OSL_OP_IMPL_II

#define OSL_OP_IMPL_II ( name,
op )
Value:
ccl_device_extern int name##_ii(int a) \
{ \
return op(a); \
}

Definition at line 1779 of file services_gpu.h.

◆ OSL_OP_IMPL_III

#define OSL_OP_IMPL_III ( name,
op )
Value:
ccl_device_extern int name##_iii(int a, int b) \
{ \
return op(a, b); \
}

Definition at line 1842 of file services_gpu.h.

◆ OSL_OP_IMPL_VV

#define OSL_OP_IMPL_VV ( name,
op )
Value:
ccl_device_extern void name##_vv(ccl_private float3 *res, ccl_private const float3 *a) \
{ \
*res = op(*a); \
}

Definition at line 1813 of file services_gpu.h.

◆ OSL_OP_IMPL_VV_

#define OSL_OP_IMPL_VV_ ( name,
op )
Value:
ccl_device_extern void name##_vv(ccl_private float3 *res, ccl_private const float3 *a) \
{ \
res->x = op(a->x); \
res->y = op(a->y); \
res->z = op(a->z); \
}

Definition at line 1818 of file services_gpu.h.

◆ OSL_OP_IMPL_VVF_

#define OSL_OP_IMPL_VVF_ ( name,
op )
Value:
ccl_device_extern void name##_vvf( \
ccl_private float3 *res, ccl_private const float3 *a, float b) \
{ \
res->x = op(a->x, b); \
res->y = op(a->y, b); \
res->z = op(a->z, b); \
}

Definition at line 1905 of file services_gpu.h.

◆ OSL_OP_IMPL_VVV

#define OSL_OP_IMPL_VVV ( name,
op )
Value:
ccl_device_extern void name##_vvv( \
{ \
*res = op(*a, *b); \
}

Definition at line 1913 of file services_gpu.h.

◆ OSL_OP_IMPL_VVV_

#define OSL_OP_IMPL_VVV_ ( name,
op )
Value:
ccl_device_extern void name##_vvv( \
{ \
res->x = op(a->x, b->x); \
res->y = op(a->y, b->y); \
res->z = op(a->z, b->z); \
}

Definition at line 1919 of file services_gpu.h.

◆ OSL_OP_IMPL_XX

#define OSL_OP_IMPL_XX ( name,
op )
Value:
OSL_OP_IMPL_FF(name, op) \
OSL_OP_IMPL_DFDF(name, op) \
OSL_OP_IMPL_VV_(name, op) \
OSL_OP_IMPL_DVDV_(name, op)
#define OSL_OP_IMPL_FF(name, op)

Definition at line 2077 of file services_gpu.h.

◆ OSL_OP_IMPL_XXX

#define OSL_OP_IMPL_XXX ( name,
op )
Value:
OSL_OP_IMPL_FFF(name, op) \
OSL_OP_IMPL_DFFDF(name, op) \
OSL_OP_IMPL_DFDFF(name, op) \
OSL_OP_IMPL_DFDFDF(name, op) \
OSL_OP_IMPL_VVV_(name, op) \
OSL_OP_IMPL_DVVDV_(name, op) \
OSL_OP_IMPL_DVDVV_(name, op) \
OSL_OP_IMPL_DVDVDV_(name, op)
#define OSL_OP_IMPL_FFF(name, op)

Definition at line 2083 of file services_gpu.h.

Typedef Documentation

◆ TypeDesc

typedef long long TypeDesc

Definition at line 811 of file services_gpu.h.

Function Documentation

◆ convert_transform()

◆ copy_identity_matrix()

ccl_device_forceinline void copy_identity_matrix ( ccl_private float * res,
float value = 1.0f )

Definition at line 473 of file services_gpu.h.

Referenced by osl_div_m_ff(), osl_get_inverse_matrix(), and osl_get_matrix().

◆ copy_matrix() [1/2]

◆ copy_matrix() [2/2]

◆ get_background_attribute()

ccl_device_inline bool get_background_attribute ( KernelGlobals kg,
ccl_private ShaderData * sd,
DeviceString name,
TypeDesc type,
bool derivatives,
ccl_private void * val )

◆ get_object_attribute()

◆ get_object_standard_attribute()

ccl_device_inline bool get_object_standard_attribute ( KernelGlobals kg,
ccl_private ShaderData * sd,
DeviceString name,
TypeDesc type,
bool derivatives,
ccl_private void * val )

Definition at line 1101 of file services_gpu.h.

References get_background_attribute(), hash_uint2_to_float(), object_alpha(), object_color(), object_dupli_generated(), object_dupli_uv(), object_location(), object_particle_id(), object_pass_id(), object_random_number(), particle_age(), particle_angular_velocity(), particle_index(), particle_lifetime(), particle_location(), particle_rotation(), particle_size(), particle_velocity(), PRIMITIVE_CURVE, PRIMITIVE_LAMP, PRIMITIVE_POINT, PRIMITIVE_TRIANGLE, set_attribute_float(), set_attribute_float3(), set_attribute_float4(), shader_pass_id(), SHADER_SMOOTH_NORMAL, triangle_smooth_normal_unnormalized(), DeviceStrings::u_curve_random, DeviceStrings::u_curve_tangent_normal, DeviceStrings::u_curve_thickness, DeviceStrings::u_geom_dupli_generated, DeviceStrings::u_geom_dupli_uv, DeviceStrings::u_geom_name, DeviceStrings::u_geom_numpolyvertices, DeviceStrings::u_geom_polyvertices, DeviceStrings::u_geom_trianglevertices, DeviceStrings::u_is_curve, DeviceStrings::u_is_point, DeviceStrings::u_is_smooth, DeviceStrings::u_material_index, DeviceStrings::u_normal_map_normal, DeviceStrings::u_object_alpha, DeviceStrings::u_object_color, DeviceStrings::u_object_index, DeviceStrings::u_object_is_light, DeviceStrings::u_object_location, DeviceStrings::u_object_random, DeviceStrings::u_particle_age, DeviceStrings::u_particle_angular_velocity, DeviceStrings::u_particle_index, DeviceStrings::u_particle_lifetime, DeviceStrings::u_particle_location, DeviceStrings::u_particle_random, DeviceStrings::u_particle_rotation, DeviceStrings::u_particle_size, DeviceStrings::u_particle_velocity, DeviceStrings::u_point_position, DeviceStrings::u_point_radius, and DeviceStrings::u_point_random.

Referenced by osl_get_attribute().

◆ hashnoise_1d()

ccl_device_forceinline float hashnoise_1d ( float p)

Definition at line 1530 of file services_gpu.h.

References __float_as_uint, and hash_uint().

◆ hashnoise_2d()

ccl_device_forceinline float hashnoise_2d ( float2 p)

Definition at line 1535 of file services_gpu.h.

◆ hashnoise_3d()

ccl_device_forceinline float hashnoise_3d ( float3 p)

Definition at line 1541 of file services_gpu.h.

◆ hashnoise_4d()

ccl_device_forceinline float hashnoise_4d ( float4 p)

Definition at line 1548 of file services_gpu.h.

◆ osl_add_closure_closure()

Definition at line 186 of file services_gpu.h.

References b, ccl_private, OSL_CLOSURE_ADD_ID, and ShaderData.

◆ osl_allocate_closure_component()

ccl_device_extern ccl_private OSLClosure * osl_allocate_closure_component ( ccl_private ShaderGlobals * sg,
int id,
int size )

Definition at line 215 of file services_gpu.h.

References ccl_private, OSLClosure::id, one_float3(), and ShaderData.

◆ osl_allocate_weighted_closure_component()

ccl_device_extern ccl_private OSLClosure * osl_allocate_weighted_closure_component ( ccl_private ShaderGlobals * sg,
int id,
int size,
ccl_private const float3 * weight )

Definition at line 235 of file services_gpu.h.

References ccl_private, OSLClosure::id, and ShaderData.

◆ osl_area()

ccl_device_extern float osl_area ( ccl_private const float3 * p)

Definition at line 2277 of file services_gpu.h.

References cross(), and len.

◆ osl_blackbody_vf()

ccl_device_extern void osl_blackbody_vf ( ccl_private ShaderGlobals * sg,
ccl_private float3 * result,
float temperature )

Definition at line 313 of file services_gpu.h.

References max, rec709_to_rgb(), svm_math_blackbody_color_rec709(), and zero_float3().

◆ osl_calculatenormal()

ccl_device_extern void osl_calculatenormal ( ccl_private float3 * res,
ccl_private ShaderGlobals * sg,
ccl_private const float3 * p )

Definition at line 2265 of file services_gpu.h.

References cross().

◆ osl_div_m_ff()

ccl_device_extern void osl_div_m_ff ( ccl_private float * res,
float a,
float b )

Definition at line 539 of file services_gpu.h.

References b, and copy_identity_matrix().

◆ osl_div_mfm()

ccl_device_extern void osl_div_mfm ( ccl_private float * res,
float a,
ccl_private const float * b )

Definition at line 530 of file services_gpu.h.

References b, convert_transform(), copy_matrix(), and transform_inverse().

◆ osl_div_mmf()

ccl_device_extern void osl_div_mmf ( ccl_private float * res,
ccl_private const float * a,
float b )

Definition at line 523 of file services_gpu.h.

References b.

◆ osl_div_mmm()

ccl_device_extern void osl_div_mmm ( ccl_private float * res,
ccl_private const float * a,
ccl_private const float * b )

Definition at line 514 of file services_gpu.h.

References b, convert_transform(), copy_matrix(), and transform_inverse().

◆ osl_environment()

ccl_device_extern bool osl_environment ( ccl_private ShaderGlobals * sg,
DeviceString filename,
ccl_private void * texture_handle,
ccl_private OSLTextureOptions * opt,
ccl_private const float3 * R,
ccl_private const float3 * dRdx,
ccl_private const float3 * dRdy,
int nchannels,
ccl_private float * result,
ccl_private float * dresultds,
ccl_private float * dresultdt,
ccl_private float * alpha,
ccl_private float * dalphax,
ccl_private float * dalphay,
ccl_private void * errormessage )

Definition at line 1716 of file services_gpu.h.

◆ osl_error()

ccl_device_extern void osl_error ( ccl_private ShaderGlobals * sg,
const char * format,
void * args )

Definition at line 260 of file services_gpu.h.

◆ osl_filterwidth_fdf()

ccl_device_extern float osl_filterwidth_fdf ( ccl_private const float * x)

Definition at line 2282 of file services_gpu.h.

References sqrtf.

Referenced by osl_filterwidth_vdv().

◆ osl_filterwidth_vdv()

ccl_device_extern void osl_filterwidth_vdv ( ccl_private float * res,
ccl_private const float * x )

Definition at line 2287 of file services_gpu.h.

References osl_filterwidth_fdf().

◆ osl_get_attribute()

◆ osl_get_from_to_matrix()

ccl_device_extern bool osl_get_from_to_matrix ( ccl_private ShaderGlobals * sg,
ccl_private float * res,
DeviceString from,
DeviceString to )

Definition at line 700 of file services_gpu.h.

References osl_get_inverse_matrix(), osl_get_matrix(), and osl_mul_mmm().

Referenced by osl_transform_triple().

◆ osl_get_inverse_matrix()

◆ osl_get_matrix()

◆ osl_get_noise_options()

Definition at line 1344 of file services_gpu.h.

◆ osl_get_texture_options()

Definition at line 1566 of file services_gpu.h.

◆ osl_get_textureinfo()

ccl_device_extern bool osl_get_textureinfo ( ccl_private ShaderGlobals * sg,
DeviceString filename,
ccl_private void * texture_handle,
DeviceString dataname,
int basetype,
int arraylen,
int aggegrate,
ccl_private void * data,
ccl_private void * errormessage )

Definition at line 1748 of file services_gpu.h.

Referenced by osl_get_textureinfo_st().

◆ osl_get_textureinfo_st()

ccl_device_extern bool osl_get_textureinfo_st ( ccl_private ShaderGlobals * sg,
DeviceString filename,
ccl_private void * texture_handle,
float s,
float t,
DeviceString dataname,
int basetype,
int arraylen,
int aggegrate,
ccl_private void * data,
ccl_private void * errormessage )

Definition at line 1761 of file services_gpu.h.

References osl_get_textureinfo().

◆ osl_hash_if()

ccl_device_extern uint osl_hash_if ( float x)

Definition at line 1323 of file services_gpu.h.

References __float_as_uint, and hash_uint().

◆ osl_hash_iff()

ccl_device_extern uint osl_hash_iff ( float x,
float y )

Definition at line 1328 of file services_gpu.h.

References __float_as_uint, and hash_uint2().

◆ osl_hash_ii()

ccl_device_extern uint osl_hash_ii ( int x)

Definition at line 1318 of file services_gpu.h.

References hash_uint().

◆ osl_hash_iv()

ccl_device_extern uint osl_hash_iv ( ccl_private const float3 * v)

Definition at line 1333 of file services_gpu.h.

References __float_as_uint, hash_uint3(), and v.

◆ osl_hash_ivf()

ccl_device_extern uint osl_hash_ivf ( ccl_private const float3 * v,
float w )

Definition at line 1338 of file services_gpu.h.

References __float_as_uint, hash_uint4(), v, and w().

◆ osl_luminance_dfdv()

ccl_device_extern void osl_luminance_dfdv ( ccl_private ShaderGlobals * sg,
ccl_private float * result,
ccl_private float3 * color )

Definition at line 340 of file services_gpu.h.

References osl_luminance_fv().

◆ osl_luminance_fv()

ccl_device_extern void osl_luminance_fv ( ccl_private ShaderGlobals * sg,
ccl_private float * result,
ccl_private float3 * color )

Definition at line 333 of file services_gpu.h.

References linear_rgb_to_gray().

Referenced by osl_luminance_dfdv().

◆ osl_mul_closure_color()

◆ osl_mul_closure_float()

◆ osl_mul_mmf()

ccl_device_extern void osl_mul_mmf ( ccl_private float * res,
ccl_private const float * a,
float b )

Definition at line 507 of file services_gpu.h.

References b.

◆ osl_mul_mmm()

ccl_device_extern void osl_mul_mmm ( ccl_private float * res,
ccl_private const float * a,
ccl_private const float * b )

Definition at line 498 of file services_gpu.h.

References b, convert_transform(), and copy_matrix().

Referenced by osl_get_from_to_matrix(), and osl_prepend_matrix_from().

◆ osl_noiseparams_set_anisotropic()

ccl_device_extern void osl_noiseparams_set_anisotropic ( ccl_private OSLNoiseOptions * opt,
int anisotropic )

Definition at line 1349 of file services_gpu.h.

◆ osl_noiseparams_set_bandwidth()

ccl_device_extern void osl_noiseparams_set_bandwidth ( ccl_private OSLNoiseOptions * opt,
float bandwidth )

Definition at line 1364 of file services_gpu.h.

◆ osl_noiseparams_set_direction()

ccl_device_extern void osl_noiseparams_set_direction ( ccl_private OSLNoiseOptions * opt,
float3 * direction )

Definition at line 1359 of file services_gpu.h.

◆ osl_noiseparams_set_do_filter()

ccl_device_extern void osl_noiseparams_set_do_filter ( ccl_private OSLNoiseOptions * opt,
int do_filter )

Definition at line 1354 of file services_gpu.h.

◆ osl_noiseparams_set_impulses()

ccl_device_extern void osl_noiseparams_set_impulses ( ccl_private OSLNoiseOptions * opt,
float impulses )

Definition at line 1369 of file services_gpu.h.

◆ osl_prepend_color_from()

◆ osl_prepend_matrix_from()

ccl_device_extern bool osl_prepend_matrix_from ( ccl_private ShaderGlobals * sg,
ccl_private float * res,
DeviceString from )

Definition at line 687 of file services_gpu.h.

References osl_get_matrix(), and osl_mul_mmm().

◆ osl_printf()

ccl_device_extern void osl_printf ( ccl_private ShaderGlobals * sg,
const char * format,
void * args )

Definition at line 262 of file services_gpu.h.

◆ osl_range_check()

ccl_device_extern uint osl_range_check ( int indexvalue,
int length,
DeviceString symname,
ccl_private ShaderGlobals * sg,
DeviceString sourcefile,
int sourceline,
DeviceString groupname,
int layer,
DeviceString layername,
DeviceString shadername )

Definition at line 268 of file services_gpu.h.

References printf, and result.

Referenced by osl_range_check_err().

◆ osl_range_check_err()

ccl_device_extern uint osl_range_check_err ( int indexvalue,
int length,
DeviceString symname,
ccl_private ShaderGlobals * sg,
DeviceString sourcefile,
int sourceline,
DeviceString groupname,
int layer,
DeviceString layername,
DeviceString shadername )

Definition at line 288 of file services_gpu.h.

References osl_range_check().

◆ osl_raytype_bit()

ccl_device_extern bool osl_raytype_bit ( ccl_private ShaderGlobals * sg,
int bit )

Definition at line 2294 of file services_gpu.h.

◆ osl_sincos_dfdfdf()

ccl_device_extern void osl_sincos_dfdfdf ( ccl_private const float * a,
ccl_private float * b,
ccl_private float * c )

Definition at line 2137 of file services_gpu.h.

◆ osl_sincos_dfdff()

ccl_device_extern void osl_sincos_dfdff ( ccl_private const float * a,
ccl_private float * b,
ccl_private float * c )

Definition at line 2121 of file services_gpu.h.

◆ osl_sincos_dffdf()

ccl_device_extern void osl_sincos_dffdf ( ccl_private const float * a,
ccl_private float * b,
ccl_private float * c )

Definition at line 2129 of file services_gpu.h.

◆ osl_sincos_dvdvdv()

ccl_device_extern void osl_sincos_dvdvdv ( ccl_private const float3 * a,
ccl_private float3 * b,
ccl_private float3 * c )

Definition at line 2173 of file services_gpu.h.

◆ osl_sincos_dvdvv()

ccl_device_extern void osl_sincos_dvdvv ( ccl_private const float3 * a,
ccl_private float3 * b,
ccl_private float3 * c )

Definition at line 2153 of file services_gpu.h.

◆ osl_sincos_dvvdv()

ccl_device_extern void osl_sincos_dvvdv ( ccl_private const float3 * a,
ccl_private float3 * b,
ccl_private float3 * c )

Definition at line 2163 of file services_gpu.h.

◆ osl_sincos_fff()

ccl_device_extern void osl_sincos_fff ( float a,
ccl_private float * b,
ccl_private float * c )

Definition at line 2117 of file services_gpu.h.

References b.

◆ osl_sincos_vvv()

ccl_device_extern void osl_sincos_vvv ( ccl_private const float3 * a,
ccl_private float3 * b,
ccl_private float3 * c )

Definition at line 2145 of file services_gpu.h.

◆ osl_texture()

ccl_device_extern bool osl_texture ( ccl_private ShaderGlobals * sg,
DeviceString filename,
ccl_private void * texture_handle,
ccl_private OSLTextureOptions * opt,
float s,
float t,
float dsdx,
float dtdx,
float dsdy,
float dtdy,
int nchannels,
ccl_private float * result,
ccl_private float * dresultdx,
ccl_private float * dresultdy,
ccl_private float * alpha,
ccl_private float * dalphadx,
ccl_private float * dalphady,
ccl_private void * errormessage )

◆ osl_texture3d()

ccl_device_extern bool osl_texture3d ( ccl_private ShaderGlobals * sg,
DeviceString filename,
ccl_private void * texture_handle,
ccl_private OSLTextureOptions * opt,
ccl_private const float3 * P,
ccl_private const float3 * dPdx,
ccl_private const float3 * dPdy,
ccl_private const float3 * dPdz,
int nchannels,
ccl_private float * result,
ccl_private float * dresultds,
ccl_private float * dresultdt,
ccl_private float * alpha,
ccl_private float * dalphadx,
ccl_private float * dalphady,
ccl_private void * errormessage )

◆ osl_texture_set_fill()

ccl_device_extern void osl_texture_set_fill ( ccl_private OSLTextureOptions * opt,
float fill )

Definition at line 1601 of file services_gpu.h.

◆ osl_texture_set_firstchannel()

ccl_device_extern void osl_texture_set_firstchannel ( ccl_private OSLTextureOptions * opt,
int firstchannel )

Definition at line 1572 of file services_gpu.h.

◆ osl_texture_set_interp_code()

ccl_device_extern void osl_texture_set_interp_code ( ccl_private OSLTextureOptions * opt,
int mode )

Definition at line 1605 of file services_gpu.h.

◆ osl_texture_set_missingcolor_alpha()

ccl_device_extern void osl_texture_set_missingcolor_alpha ( ccl_private OSLTextureOptions * opt,
int nchannels,
float alpha )

Definition at line 1616 of file services_gpu.h.

◆ osl_texture_set_missingcolor_arena()

ccl_device_extern void osl_texture_set_missingcolor_arena ( ccl_private OSLTextureOptions * opt,
ccl_private float3 * color )

Definition at line 1611 of file services_gpu.h.

◆ osl_texture_set_rblur()

ccl_device_extern void osl_texture_set_rblur ( ccl_private OSLTextureOptions * opt,
float blur )

Definition at line 1589 of file services_gpu.h.

◆ osl_texture_set_rwidth()

ccl_device_extern void osl_texture_set_rwidth ( ccl_private OSLTextureOptions * opt,
float width )

Definition at line 1597 of file services_gpu.h.

◆ osl_texture_set_rwrap_code()

ccl_device_extern void osl_texture_set_rwrap_code ( ccl_private OSLTextureOptions * opt,
int mode )

Definition at line 1581 of file services_gpu.h.

◆ osl_texture_set_sblur()

ccl_device_extern void osl_texture_set_sblur ( ccl_private OSLTextureOptions * opt,
float blur )

Definition at line 1585 of file services_gpu.h.

◆ osl_texture_set_stblur()

ccl_device_extern void osl_texture_set_stblur ( ccl_private OSLTextureOptions * opt,
float blur )

Definition at line 1591 of file services_gpu.h.

◆ osl_texture_set_stwidth()

ccl_device_extern void osl_texture_set_stwidth ( ccl_private OSLTextureOptions * opt,
float width )

Definition at line 1599 of file services_gpu.h.

◆ osl_texture_set_stwrap_code()

ccl_device_extern void osl_texture_set_stwrap_code ( ccl_private OSLTextureOptions * opt,
int mode )

Definition at line 1583 of file services_gpu.h.

◆ osl_texture_set_subimage()

ccl_device_extern void osl_texture_set_subimage ( ccl_private OSLTextureOptions * opt,
int subimage )

Definition at line 1607 of file services_gpu.h.

◆ osl_texture_set_swidth()

ccl_device_extern void osl_texture_set_swidth ( ccl_private OSLTextureOptions * opt,
float width )

Definition at line 1593 of file services_gpu.h.

◆ osl_texture_set_swrap_code()

ccl_device_extern void osl_texture_set_swrap_code ( ccl_private OSLTextureOptions * opt,
int mode )

Definition at line 1577 of file services_gpu.h.

◆ osl_texture_set_tblur()

ccl_device_extern void osl_texture_set_tblur ( ccl_private OSLTextureOptions * opt,
float blur )

Definition at line 1587 of file services_gpu.h.

◆ osl_texture_set_time()

ccl_device_extern void osl_texture_set_time ( ccl_private OSLTextureOptions * opt,
float time )

Definition at line 1603 of file services_gpu.h.

◆ osl_texture_set_twidth()

ccl_device_extern void osl_texture_set_twidth ( ccl_private OSLTextureOptions * opt,
float width )

Definition at line 1595 of file services_gpu.h.

◆ osl_texture_set_twrap_code()

ccl_device_extern void osl_texture_set_twrap_code ( ccl_private OSLTextureOptions * opt,
int mode )

Definition at line 1579 of file services_gpu.h.

◆ osl_transform_dvmdv()

ccl_device_extern void osl_transform_dvmdv ( ccl_private float3 * res,
ccl_private const float * m,
ccl_private const float3 * v )

Definition at line 553 of file services_gpu.h.

References convert_transform(), transform_point(), and v.

Referenced by osl_transform_triple().

◆ osl_transform_triple()

◆ osl_transform_triple_nonlinear()

ccl_device_extern bool osl_transform_triple_nonlinear ( ccl_private ShaderGlobals * sg,
ccl_private float3 * p_in,
int p_in_derivs,
ccl_private float3 * p_out,
int p_out_derivs,
DeviceString from,
DeviceString to,
int vectype )

Definition at line 784 of file services_gpu.h.

References osl_transform_triple().

◆ osl_transform_vmv()

ccl_device_extern void osl_transform_vmv ( ccl_private float3 * res,
ccl_private const float * m,
ccl_private const float3 * v )

Definition at line 545 of file services_gpu.h.

References convert_transform(), transform_point(), and v.

Referenced by osl_transform_triple().

◆ osl_transformc()

◆ osl_transformn_dvmdv()

ccl_device_extern void osl_transformn_dvmdv ( ccl_private float3 * res,
ccl_private const float * m,
ccl_private const float3 * v )

Definition at line 589 of file services_gpu.h.

References convert_transform(), transform_direction(), and v.

Referenced by osl_transform_triple().

◆ osl_transformn_vmv()

ccl_device_extern void osl_transformn_vmv ( ccl_private float3 * res,
ccl_private const float * m,
ccl_private const float3 * v )

Definition at line 581 of file services_gpu.h.

References convert_transform(), transform_direction(), and v.

Referenced by osl_transform_triple().

◆ osl_transformv_dvmdv()

ccl_device_extern void osl_transformv_dvmdv ( ccl_private float3 * res,
ccl_private const float * m,
ccl_private const float3 * v )

Definition at line 571 of file services_gpu.h.

References convert_transform(), transform_direction(), and v.

Referenced by osl_transform_triple().

◆ osl_transformv_vmv()

ccl_device_extern void osl_transformv_vmv ( ccl_private float3 * res,
ccl_private const float * m,
ccl_private const float3 * v )

Definition at line 563 of file services_gpu.h.

References convert_transform(), transform_direction(), and v.

Referenced by osl_transform_triple().

◆ osl_transpose_mm()

ccl_device_extern void osl_transpose_mm ( ccl_private float * res,
ccl_private const float * m )

Definition at line 796 of file services_gpu.h.

References ccl_private, and copy_matrix().

◆ osl_warning()

ccl_device_extern void osl_warning ( ccl_private ShaderGlobals * sg,
const char * format,
void * args )

Definition at line 264 of file services_gpu.h.

◆ osl_wavelength_color_vf()

ccl_device_extern void osl_wavelength_color_vf ( ccl_private ShaderGlobals * sg,
ccl_private float3 * result,
float lambda_nm )

Definition at line 322 of file services_gpu.h.

References make_float3(), max, svm_math_wavelength_color_xyz(), and xyz_to_rgb().

◆ safe_divide()

ccl_device_forceinline int safe_divide ( int a,
int b )

Definition at line 2104 of file services_gpu.h.

References b.

◆ safe_modulo()

ccl_device_forceinline int safe_modulo ( int a,
int b )

Definition at line 2108 of file services_gpu.h.

Referenced by svm_math(), and svm_vector_math().

◆ set_attribute_float() [1/2]

ccl_device_inline bool set_attribute_float ( ccl_private float fval[3],
TypeDesc type,
bool derivatives,
ccl_private void * val )

◆ set_attribute_float() [2/2]

ccl_device_inline bool set_attribute_float ( float f,
TypeDesc type,
bool derivatives,
ccl_private void * val )

Definition at line 860 of file services_gpu.h.

References set_attribute_float().

◆ set_attribute_float2()

ccl_device_inline bool set_attribute_float2 ( ccl_private float2 fval[3],
TypeDesc type,
bool derivatives,
ccl_private void * val )

Definition at line 873 of file services_gpu.h.

References ccl_private.

Referenced by get_object_attribute().

◆ set_attribute_float3() [1/2]

ccl_device_inline bool set_attribute_float3 ( ccl_private float3 fval[3],
TypeDesc type,
bool derivatives,
ccl_private void * val )

◆ set_attribute_float3() [2/2]

ccl_device_inline bool set_attribute_float3 ( float3 f,
TypeDesc type,
bool derivatives,
ccl_private void * val )

Definition at line 959 of file services_gpu.h.

References make_float3(), and set_attribute_float3().

◆ set_attribute_float4()

ccl_device_inline bool set_attribute_float4 ( ccl_private float4 fval[3],
TypeDesc type,
bool derivatives,
ccl_private void * val )

Definition at line 972 of file services_gpu.h.

References average(), ccl_private, float4_to_float3(), w(), and z().

Referenced by get_object_attribute(), and get_object_standard_attribute().

◆ set_attribute_matrix()

ccl_device_inline bool set_attribute_matrix ( ccl_private const Transform & tfm,
TypeDesc type,
ccl_private void * val )

Definition at line 1011 of file services_gpu.h.

References ccl_private, and copy_matrix().

Referenced by get_object_attribute().

◆ step_impl()

ccl_device_forceinline float step_impl ( float edge,
float x )

Definition at line 2215 of file services_gpu.h.