Blender V5.0
types.h File Reference
#include <OSL/oslversion.h>
#include "kernel/types.h"
#include "util/defines.h"
#include "util/types_float3.h"
#include "closures_template.h"

Go to the source code of this file.

Classes

struct  OSLClosure
struct  ShaderGlobals
struct  OSLNoiseOptions
struct  OSLTextureOptions

Macros

#define OSL_CLOSURE_STRUCT_BEGIN(Upper, lower)
#define OSL_CLOSURE_STRUCT_END(Upper, lower)
#define OSL_CLOSURE_STRUCT_MEMBER(Upper, TYPE, type, name, key)
#define OSL_CLOSURE_STRUCT_ARRAY_MEMBER(Upper, TYPE, type, name, key, size)
#define OSL_TEXTURE_HANDLE_TYPE_IES   ((uintptr_t)0x2 << 30)
#define OSL_TEXTURE_HANDLE_TYPE_SVM   ((uintptr_t)0x1 << 30)
#define OSL_TEXTURE_HANDLE_TYPE_AO_OR_BEVEL   ((uintptr_t)0x3 << 30)
#define OSL_TEXTURE_HANDLE_TYPE(handle)
#define OSL_TEXTURE_HANDLE_SLOT(handle)

Typedefs

using DeviceString = const char *

Enumerations

enum  OSLClosureType {
  OSL_CLOSURE_MUL_ID = -1 , OSL_CLOSURE_ADD_ID = -2 , OSL_CLOSURE_NONE_ID = 0 , OSL_CLOSURE_STRUCT_MEMBER ,
  OSL_CLOSURE_STRUCT_MEMBER
}

Functions

ccl_device_inline DeviceString make_string (const char *str, const size_t hash)

Macro Definition Documentation

◆ OSL_CLOSURE_STRUCT_ARRAY_MEMBER

#define OSL_CLOSURE_STRUCT_ARRAY_MEMBER ( Upper,
TYPE,
type,
name,
key,
size )

Definition at line 76 of file kernel/osl/types.h.

◆ OSL_CLOSURE_STRUCT_BEGIN

#define OSL_CLOSURE_STRUCT_BEGIN ( Upper,
lower )
Value:
OSL_CLOSURE_##Upper##_ID,

Definition at line 60 of file kernel/osl/types.h.

◆ OSL_CLOSURE_STRUCT_END

#define OSL_CLOSURE_STRUCT_END ( Upper,
lower )

Definition at line 70 of file kernel/osl/types.h.

◆ OSL_CLOSURE_STRUCT_MEMBER

#define OSL_CLOSURE_STRUCT_MEMBER ( Upper,
TYPE,
type,
name,
key )

Definition at line 73 of file kernel/osl/types.h.

◆ OSL_TEXTURE_HANDLE_SLOT

#define OSL_TEXTURE_HANDLE_SLOT ( handle)
Value:
((unsigned int)((uintptr_t)(handle) & ((uintptr_t)0x3FFFFFFF)))

Definition at line 154 of file kernel/osl/types.h.

Referenced by rs_texture(), and rs_texture3d().

◆ OSL_TEXTURE_HANDLE_TYPE

#define OSL_TEXTURE_HANDLE_TYPE ( handle)
Value:
((unsigned int)((uintptr_t)(handle) & ((uintptr_t)0x3 << 30)))

Definition at line 152 of file kernel/osl/types.h.

Referenced by rs_texture(), and rs_texture3d().

◆ OSL_TEXTURE_HANDLE_TYPE_AO_OR_BEVEL

#define OSL_TEXTURE_HANDLE_TYPE_AO_OR_BEVEL   ((uintptr_t)0x3 << 30)

Definition at line 150 of file kernel/osl/types.h.

Referenced by OSLRenderServices::get_texture_handle().

◆ OSL_TEXTURE_HANDLE_TYPE_IES

#define OSL_TEXTURE_HANDLE_TYPE_IES   ((uintptr_t)0x2 << 30)

Definition at line 148 of file kernel/osl/types.h.

Referenced by OSLRenderServices::get_texture_handle(), and rs_texture().

◆ OSL_TEXTURE_HANDLE_TYPE_SVM

#define OSL_TEXTURE_HANDLE_TYPE_SVM   ((uintptr_t)0x1 << 30)

Typedef Documentation

◆ DeviceString

using DeviceString = const char *

Definition at line 28 of file kernel/osl/types.h.

Enumeration Type Documentation

◆ OSLClosureType

Enumerator
OSL_CLOSURE_MUL_ID 
OSL_CLOSURE_ADD_ID 
OSL_CLOSURE_NONE_ID 
OSL_CLOSURE_STRUCT_MEMBER 
OSL_CLOSURE_STRUCT_MEMBER 

Definition at line 54 of file kernel/osl/types.h.

Function Documentation

◆ make_string()