17 # include <OSL/llvm_util.h>
18 # include <OSL/oslcomp.h>
19 # include <OSL/oslexec.h>
20 # include <OSL/oslquery.h>
41 struct OSLShaderInfo {
43 : has_surface_emission(false), has_surface_transparent(false), has_surface_bssrdf(false)
48 bool has_surface_emission;
49 bool has_surface_transparent;
50 bool has_surface_bssrdf;
76 static bool osl_compile(
const string &inputfile,
const string &outputfile);
77 static bool osl_query(OSL::OSLQuery &
query,
const string &filepath);
80 const char *shader_test_loaded(
const string &
hash);
81 const char *shader_load_bytecode(
const string &
hash,
const string &bytecode);
82 const char *shader_load_filepath(
string filepath);
83 OSLShaderInfo *shader_loaded_info(
const string &
hash);
88 const std::string &filepath,
89 const std::string &bytecode_hash =
"",
90 const std::string &bytecode =
"");
93 void texture_system_init();
94 void texture_system_free();
96 void shading_system_init();
97 void shading_system_free();
100 OSL::TextureSystem *ts;
102 OSL::ErrorHandler errhandler;
103 map<string, OSLShaderInfo> loaded_shaders;
105 static OSL::TextureSystem *ts_shared;
107 static int ts_shared_users;
113 static int ss_shared_users;
134 void parameter(
const char *name,
float f);
140 void parameter(
const char *name,
const char *s);
172 OSLShaderManager *manager;
180 static int texture_shared_unique_id;
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum query
_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
void add(ShaderNode *node, const char *name, bool isfilepath=false)
void parameter_vector(const char *name, float3 f)
void parameter_array(const char *name, const float f[], int arraylen)
void parameter_texture_ies(const char *name, int svm_slot)
void parameter_texture(const char *name, ustring filename, ustring colorspace)
void parameter(ShaderNode *node, const char *name)
void parameter_normal(const char *name, float3 f)
void parameter_color_array(const char *name, const array< float3 > &f)
void compile(OSLGlobals *og, Shader *shader)
void parameter_point(const char *name, float3 f)
void parameter_color(const char *name, float3 f)
void parameter_attribute(const char *name, ustring s)
static void free_memory()
virtual void device_free(Device *device, DeviceScene *dscene, Scene *scene)=0
virtual void device_update_specific(Device *device, DeviceScene *dscene, Scene *scene, Progress &progress)=0
virtual void reset(Scene *scene)=0
#define CCL_NAMESPACE_END
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
set< ShaderNode *, ShaderNodeIDComparator > ShaderNodeSet
CCL_NAMESPACE_BEGIN typedef std::mutex thread_mutex