Blender V2.61 - r43446
|
#include "GL/glew.h"
#include "MEM_guardedalloc.h"
#include "DNA_customdata_types.h"
#include "DNA_image_types.h"
#include "DNA_material_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"
#include "BLI_ghash.h"
#include "BLI_heap.h"
#include "GPU_material.h"
#include "GPU_extensions.h"
#include "BLO_sys_types.h"
#include "gpu_codegen.h"
#include "node_util.h"
#include <string.h>
#include <stdarg.h>
Go to the source code of this file.
Definition in file gpu_codegen.c.
static char* code_generate_fragment | ( | ListBase * | nodes, |
GPUOutput * | output, | ||
const char * | UNUSEDname | ||
) | [static] |
Definition at line 580 of file gpu_codegen.c.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), codegen_call_functions(), codegen_declare_tmps(), codegen_print_uniforms_functions(), and codegen_set_unique_ids().
Referenced by GPU_generate_pass().
static char* code_generate_vertex | ( | ListBase * | nodes | ) | [static] |
Definition at line 610 of file gpu_codegen.c.
References GPUInput::attribfirst, GPUInput::attribid, GPUInput::attribtype, BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), CD_TANGENT, datatoc_gpu_shader_vertex_glsl, ListBase::first, GPU_DATATYPE_STR, GPU_SOURCE_ATTRIB, GPUNode::inputs, GPUInput::next, GPUNode::next, GPUInput::source, and GPUInput::type.
Referenced by GPU_generate_pass().
static void codegen_call_functions | ( | DynStr * | ds, |
ListBase * | nodes, | ||
GPUOutput * | finaloutput | ||
) | [static] |
Definition at line 533 of file gpu_codegen.c.
References GPUInput::attribid, BLI_dynstr_append(), BLI_dynstr_appendf(), GPUInput::builtin, codegen_convert_datatype(), GPUInput::dynamicvec, ListBase::first, GPU_builtin_name(), GPU_SOURCE_ATTRIB, GPU_SOURCE_BUILTIN, GPU_SOURCE_TEX, GPU_SOURCE_TEX_PIXEL, GPU_SOURCE_VEC_UNIFORM, GPU_VEC4, GPUInput::id, GPUOutput::id, GPUNode::inputs, GPUInput::link, GPUNode::name, GPUInput::next, GPUOutput::next, GPUNode::next, GPUNodeLink::output, GPUNode::outputs, GPUInput::source, GPUInput::texid, GPUInput::type, and GPUOutput::type.
Referenced by code_generate_fragment().
static void codegen_convert_datatype | ( | DynStr * | ds, |
int | from, | ||
int | to, | ||
const char * | tmp, | ||
int | id | ||
) | [static] |
Definition at line 278 of file gpu_codegen.c.
References BLI_dynstr_append(), BLI_dynstr_appendf(), BLI_snprintf(), GPU_FLOAT, GPU_VEC2, GPU_VEC3, and GPU_VEC4.
Referenced by codegen_call_functions().
Definition at line 506 of file gpu_codegen.c.
References BLI_dynstr_append(), BLI_dynstr_appendf(), codegen_input_has_texture(), GPUInput::definetex, ListBase::first, GPU_DATATYPE_STR, GPU_SOURCE_TEX_PIXEL, GPUOutput::id, GPUNode::inputs, GPUInput::next, GPUOutput::next, GPUNode::next, GPUNode::outputs, GPUInput::source, GPUInput::texid, and GPUOutput::type.
Referenced by code_generate_fragment().
static int codegen_input_has_texture | ( | GPUInput * | input | ) | [static] |
Definition at line 336 of file gpu_codegen.c.
References GPUInput::ima, GPUInput::link, NULL, and GPUInput::tex.
Referenced by codegen_declare_tmps(), codegen_print_uniforms_functions(), and codegen_set_unique_ids().
static void codegen_print_datatype | ( | DynStr * | ds, |
int | type, | ||
float * | data | ||
) | [static] |
Definition at line 321 of file gpu_codegen.c.
References BLI_dynstr_append(), BLI_dynstr_appendf(), GPU_DATATYPE_STR, and i.
Referenced by codegen_print_uniforms_functions().
Definition at line 449 of file gpu_codegen.c.
References GPUInput::attribfirst, GPUInput::attribid, GPUInput::bindtex, BLI_dynstr_append(), BLI_dynstr_appendf(), GPUInput::builtin, codegen_input_has_texture(), codegen_print_datatype(), GPUInput::dynamicvec, ListBase::first, GPU_builtin_name(), GPU_DATATYPE_STR, GPU_SOURCE_ATTRIB, GPU_SOURCE_BUILTIN, GPU_SOURCE_TEX, GPU_SOURCE_TEX_PIXEL, GPU_SOURCE_VEC_UNIFORM, gpu_str_prefix(), GPU_TEX2D, GPUInput::id, GPUNode::inputs, GPUInput::next, GPUNode::next, GPUInput::source, GPUInput::texid, GPUInput::textype, GPUInput::type, and GPUInput::vec.
Referenced by code_generate_fragment().
static void codegen_set_unique_ids | ( | ListBase * | nodes | ) | [static] |
Definition at line 368 of file gpu_codegen.c.
References GPUInput::bindtex, BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), codegen_input_has_texture(), GPUInput::definetex, ListBase::first, GET_INT_FROM_POINTER, GPU_SOURCE_TEX, GPU_SOURCE_TEX_PIXEL, GPUInput::id, GPUOutput::id, GPUInput::ima, GPUNode::inputs, GPUInput::link, GPUInput::next, GPUOutput::next, GPUNode::next, NULL, GPUNode::outputs, SET_INT_IN_POINTER, GPUInput::source, GPUInput::tex, and GPUInput::texid.
Referenced by code_generate_fragment().
GPUNodeLink* GPU_attribute | ( | int | type, |
const char * | name | ||
) |
Definition at line 1074 of file gpu_codegen.c.
References GPUNodeLink::attribname, GPUNodeLink::attribtype, GPU_node_link_create(), and link().
Referenced by do_material_tex(), GPU_shadeinput_set(), gpu_shader_geom(), node_shader_gpu_tex_checker(), node_shader_gpu_tex_coord(), node_shader_gpu_tex_gradient(), node_shader_gpu_tex_image(), node_shader_gpu_tex_magic(), node_shader_gpu_tex_musgrave(), node_shader_gpu_tex_noise(), node_shader_gpu_tex_sky(), node_shader_gpu_tex_voronoi(), and node_shader_gpu_tex_wave().
int GPU_bicubic_bump_support | ( | void | ) |
Definition at line 654 of file gpu_codegen.c.
Referenced by do_material_tex(), and GPU_code_generate_glsl_lib().
GPUNodeLink* GPU_builtin | ( | GPUBuiltin | builtin | ) |
Definition at line 1150 of file gpu_codegen.c.
References GPUNodeLink::builtin, GPU_node_link_create(), and link().
Referenced by do_material_tex(), GPU_shadeinput_set(), gpu_shader_camera(), gpu_shader_geom(), GPU_shaderesult_set(), lamp_get_visibility(), node_shader_gpu_bsdf_anisotropic(), node_shader_gpu_bsdf_diffuse(), node_shader_gpu_bsdf_glass(), node_shader_gpu_bsdf_glossy(), node_shader_gpu_bsdf_translucent(), node_shader_gpu_bsdf_velvet(), node_shader_gpu_emission(), node_shader_gpu_fresnel(), node_shader_gpu_geometry(), node_shader_gpu_tex_coord(), node_shader_gpu_tex_environment(), and shade_one_light().
const char* GPU_builtin_name | ( | GPUBuiltin | builtin | ) |
Definition at line 346 of file gpu_codegen.c.
References GPU_AUTO_BUMPSCALE, GPU_INVERSE_OBJECT_MATRIX, GPU_INVERSE_VIEW_MATRIX, GPU_OBCOLOR, GPU_OBJECT_MATRIX, GPU_VIEW_MATRIX, GPU_VIEW_NORMAL, and GPU_VIEW_POSITION.
Referenced by codegen_call_functions(), codegen_print_uniforms_functions(), GPU_material_construct_end(), and GPU_shader_export().
void GPU_code_generate_glsl_lib | ( | void | ) |
Definition at line 659 of file gpu_codegen.c.
References BLI_dynstr_append(), BLI_dynstr_free(), BLI_dynstr_get_cstring(), BLI_dynstr_new(), datatoc_gpu_shader_material_glsl, glsl_material_library, and GPU_bicubic_bump_support().
Referenced by GPU_codegen_init().
void GPU_codegen_exit | ( | void | ) |
Definition at line 249 of file gpu_codegen.c.
References BLI_ghash_free(), defmaterial, ListBase::first, glsl_material_library, GPU_material_free(), Material::gpumaterial, MEM_freeN(), and NULL.
Referenced by GPU_extensions_exit().
void GPU_codegen_init | ( | void | ) |
Definition at line 244 of file gpu_codegen.c.
References GPU_code_generate_glsl_lib().
Referenced by GPU_extensions_init().
GPUNodeLink* GPU_dynamic_texture | ( | GPUTexture * | tex, |
int | dynamictype, | ||
void * | data | ||
) |
Definition at line 1129 of file gpu_codegen.c.
References data, GPUNodeLink::dynamic, GPUNodeLink::dynamictex, GPUNodeLink::dynamictype, GPU_node_link_create(), link(), and GPUNodeLink::ptr2.
Referenced by shade_one_light().
GPUNodeLink* GPU_dynamic_uniform | ( | float * | num, |
int | dynamictype, | ||
void * | data | ||
) |
Definition at line 1094 of file gpu_codegen.c.
References data, GPUNodeLink::dynamic, GPUNodeLink::dynamictype, GPU_node_link_create(), link(), GPUNodeLink::ptr1, and GPUNodeLink::ptr2.
Referenced by lamp_get_visibility(), and shade_one_light().
GPUPass* GPU_generate_pass | ( | ListBase * | nodes, |
GPUNodeLink * | outlink, | ||
GPUVertexAttribs * | attribs, | ||
int * | builtins, | ||
const char * | name | ||
) |
Definition at line 1343 of file gpu_codegen.c.
References code_generate_fragment(), code_generate_vertex(), GPUPass::fragmentcode, glsl_material_library, GPU_nodes_extract_dynamic_inputs(), GPU_nodes_free(), gpu_nodes_get_builtin_flag(), gpu_nodes_get_vertex_attributes(), gpu_nodes_prune(), GPU_shader_create(), GPUPass::libcode, MEM_callocN(), NULL, GPUNodeLink::output, GPUPass::output, GPUPass::shader, and GPUPass::vertexcode.
Referenced by GPU_material_construct_end().
GPUNodeLink* GPU_image | ( | Image * | ima, |
ImageUser * | iuser | ||
) |
Definition at line 1107 of file gpu_codegen.c.
References GPU_node_link_create(), GPUNodeLink::image, link(), GPUNodeLink::ptr1, and GPUNodeLink::ptr2.
Referenced by do_material_tex(), gpu_shader_texture(), node_shader_gpu_tex_environment(), and node_shader_gpu_tex_image().
static void GPU_inputs_free | ( | ListBase * | inputs | ) | [static] |
Definition at line 980 of file gpu_codegen.c.
References BLI_freelistN(), GPUInput::dynamictex, ListBase::first, GPU_node_link_free(), GPU_texture_free(), GPUInput::link, GPUInput::next, and GPUInput::tex.
Referenced by GPU_node_free(), and GPU_pass_free().
int GPU_link | ( | GPUMaterial * | mat, |
const char * | name, | ||
... | |||
) |
Definition at line 1159 of file gpu_codegen.c.
References FUNCTION_QUAL_IN, GPU_lookup_function(), gpu_material_add_node(), GPU_node_begin(), GPU_node_end(), gpu_node_input_link(), GPU_node_output(), i, link(), GPUFunction::paramqual, GPUFunction::paramtype, and GPUFunction::totparam.
Referenced by add_to_diffuse(), do_colorband_blend(), do_material_tex(), do_specular_ramp(), GPU_material_from_blender(), GPU_shadeinput_set(), gpu_shader_material(), GPU_shaderesult_set(), lamp_get_visibility(), node_shader_gpu_tex_mapping(), ramp_blend(), ramp_diffuse_result(), ramp_spec_result(), shade_one_light(), texture_rgb_blend(), and texture_value_blend().
int GPU_link_changed | ( | GPUNodeLink * | link | ) |
Definition at line 1283 of file gpu_codegen.c.
References ListBase::first, GPUNode::inputs, GPUInput::link, GPUNode::name, GPUOutput::node, NULL, and GPUNodeLink::output.
Referenced by do_material_tex(), GPU_shaderesult_set(), and shade_one_light().
GPUFunction* GPU_lookup_function | ( | const char * | name | ) |
Definition at line 232 of file gpu_codegen.c.
References BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash(), glsl_material_library, and gpu_parse_functions_string().
Referenced by GPU_link(), GPU_stack_link(), and GPU_stack_link_mute().
static GPUNode* GPU_node_begin | ( | const char * | name | ) | [static] |
Definition at line 833 of file gpu_codegen.c.
References MEM_callocN(), and GPUNode::name.
Referenced by GPU_link(), GPU_stack_link(), and GPU_stack_link_mute().
static void GPU_node_end | ( | GPUNode * | UNUSEDnode | ) | [static] |
Definition at line 842 of file gpu_codegen.c.
Referenced by GPU_link(), GPU_stack_link(), and GPU_stack_link_mute().
static void GPU_node_free | ( | GPUNode * | node | ) | [static] |
Definition at line 994 of file gpu_codegen.c.
References BLI_freelistN(), ListBase::first, GPU_inputs_free(), GPU_node_link_free(), GPUNode::inputs, GPUOutput::link, MEM_freeN(), GPUOutput::next, NULL, GPUNodeLink::output, and GPUNode::outputs.
Referenced by GPU_nodes_free(), and gpu_nodes_prune().
static void gpu_node_input_link | ( | GPUNode * | node, |
GPUNodeLink * | link, | ||
int | type | ||
) | [static] |
Definition at line 847 of file gpu_codegen.c.
References GPUInput::attribname, GPUNodeLink::attribname, GPUNodeLink::attribtype, GPUInput::attribtype, BLI_addtail(), BLI_strncpy(), GPUNodeLink::builtin, GPUInput::builtin, GPUNodeLink::dynamic, GPUInput::dynamicdata, GPUInput::dynamictex, GPUNodeLink::dynamictex, GPUInput::dynamictype, GPUNodeLink::dynamictype, GPUInput::dynamicvec, ListBase::first, GPU_SOURCE_ATTRIB, GPU_SOURCE_BUILTIN, GPU_SOURCE_TEX, GPU_SOURCE_TEX_PIXEL, GPU_SOURCE_VEC_UNIFORM, GPU_TEX2D, GPU_texture_create_2D(), GPU_VEC4, GPUInput::ima, GPUNodeLink::image, GPUNode::inputs, GPUInput::iuser, link(), GPUInput::link, MEM_callocN(), MEM_dupallocN(), MEM_freeN(), GPUNode::name, GPUInput::node, GPUOutput::node, NULL, GPUNodeLink::output, GPUNodeLink::ptr1, GPUNodeLink::ptr2, GPUInput::source, GPUInput::tex, GPUInput::textarget, GPUNodeLink::texture, GPUNodeLink::texturesize, GPUInput::textype, GPUInput::type, GPUNodeLink::users, and GPUInput::vec.
Referenced by GPU_link(), gpu_node_input_socket(), and GPU_stack_link().
static void gpu_node_input_socket | ( | GPUNode * | node, |
GPUNodeStack * | sock | ||
) | [static] |
Definition at line 947 of file gpu_codegen.c.
References gpu_node_input_link(), GPU_node_link_create(), link(), GPUNodeStack::link, GPUNodeLink::ptr1, GPUNodeStack::type, and GPUNodeStack::vec.
Referenced by GPU_stack_link(), and GPU_stack_link_mute().
static GPUNodeLink* GPU_node_link_create | ( | int | type | ) | [static] |
Definition at line 808 of file gpu_codegen.c.
References link(), MEM_callocN(), GPUNodeLink::type, and GPUNodeLink::users.
Referenced by GPU_attribute(), GPU_builtin(), GPU_dynamic_texture(), GPU_dynamic_uniform(), GPU_image(), gpu_node_input_socket(), GPU_node_output(), GPU_socket(), GPU_texture(), and GPU_uniform().
static void GPU_node_link_free | ( | GPUNodeLink * | link | ) | [static] |
Definition at line 817 of file gpu_codegen.c.
References GPUOutput::link, MEM_freeN(), NULL, GPUNodeLink::output, and GPUNodeLink::users.
Referenced by GPU_inputs_free(), and GPU_node_free().
static void GPU_node_output | ( | GPUNode * | node, |
int | type, | ||
const char * | UNUSEDname, | ||
GPUNodeLink ** | link | ||
) | [static] |
Definition at line 961 of file gpu_codegen.c.
References BLI_addtail(), GPU_node_link_create(), GPUOutput::link, MEM_callocN(), GPUOutput::node, GPUNodeLink::output, GPUNode::outputs, and GPUOutput::type.
Referenced by GPU_link(), GPU_stack_link(), and GPU_stack_link_mute().
Definition at line 692 of file gpu_codegen.c.
References GPUInput::bindtex, BLI_addtail(), BLI_remlink(), BLI_snprintf(), GPUInput::dynamicvec, ListBase::first, GPU_shader_bind(), GPU_shader_get_uniform(), GPU_shader_unbind(), GPU_SOURCE_ATTRIB, GPU_SOURCE_BUILTIN, GPUInput::id, GPUInput::ima, GPUNode::inputs, GPUPass::inputs, inputs, GPUInput::next, next, GPUNode::next, GPUPass::shader, GPUInput::shaderloc, GPUInput::shadername, GPUInput::source, GPUInput::tex, and GPUInput::texid.
Referenced by GPU_generate_pass().
static void GPU_nodes_free | ( | ListBase * | nodes | ) | [static] |
Definition at line 1010 of file gpu_codegen.c.
References BLI_remlink(), ListBase::first, and GPU_node_free().
Referenced by GPU_generate_pass().
static void gpu_nodes_get_builtin_flag | ( | ListBase * | nodes, |
int * | builtin | ||
) | [static] |
Definition at line 1059 of file gpu_codegen.c.
References GPUInput::builtin, ListBase::first, GPU_SOURCE_BUILTIN, GPUNode::inputs, GPUInput::next, GPUNode::next, and GPUInput::source.
Referenced by GPU_generate_pass().
static void gpu_nodes_get_vertex_attributes | ( | ListBase * | nodes, |
GPUVertexAttribs * | attribs | ||
) | [static] |
Definition at line 1023 of file gpu_codegen.c.
References GPUInput::attribfirst, GPUInput::attribid, GPUVertexAttribs::attribid, GPUInput::attribname, GPUInput::attribtype, BLI_strncpy(), ListBase::first, GPU_MAX_ATTRIB, GPU_SOURCE_ATTRIB, GPUNode::inputs, GPUVertexAttribs::layer, GPUVertexAttribs::name, GPUInput::next, GPUNode::next, GPUInput::source, GPUVertexAttribs::totlayer, and GPUVertexAttribs::type.
Referenced by GPU_generate_pass().
static void gpu_nodes_prune | ( | ListBase * | nodes, |
GPUNodeLink * | outlink | ||
) | [static] |
Definition at line 1324 of file gpu_codegen.c.
References BLI_remlink(), ListBase::first, GPU_node_free(), gpu_nodes_tag(), next, GPUNode::next, and GPUNode::tag.
Referenced by GPU_generate_pass().
static void gpu_nodes_tag | ( | GPUNodeLink * | link | ) | [static] |
Definition at line 1306 of file gpu_codegen.c.
References ListBase::first, GPUNode::inputs, GPUInput::link, GPUInput::next, GPUOutput::node, GPUNodeLink::output, and GPUNode::tag.
Referenced by gpu_nodes_prune().
static void gpu_parse_functions_string | ( | GHash * | hash, |
char * | code | ||
) | [static] |
Definition at line 124 of file gpu_codegen.c.
References BLI_ghash_insert(), FUNCTION_QUAL_IN, FUNCTION_QUAL_INOUT, FUNCTION_QUAL_OUT, GPU_DATATYPE_STR, GPU_SHADOW2D, gpu_str_prefix(), gpu_str_skip_token(), GPU_TEX2D, i, MAX_FUNCTION_NAME, MEM_callocN(), MEM_freeN(), GPUFunction::name, NULL, GPUFunction::paramqual, GPUFunction::paramtype, and GPUFunction::totparam.
Referenced by GPU_lookup_function().
void GPU_pass_bind | ( | GPUPass * | pass, |
double | time, | ||
int | mipmap | ||
) |
Definition at line 747 of file gpu_codegen.c.
References GPUInput::bindtex, ListBase::first, GPU_shader_bind(), GPU_shader_uniform_texture(), GPU_texture_bind(), GPU_texture_from_blender(), GPUInput::ima, GPUPass::inputs, inputs, GPUInput::iuser, GPUInput::next, GPUPass::shader, GPUInput::shaderloc, GPUInput::tex, and GPUInput::texid.
Referenced by GPU_material_bind().
void GPU_pass_free | ( | GPUPass * | pass | ) |
Definition at line 1389 of file gpu_codegen.c.
References GPUPass::fragmentcode, GPU_inputs_free(), GPU_shader_free(), GPUPass::inputs, MEM_freeN(), GPUPass::shader, and GPUPass::vertexcode.
Referenced by GPU_material_free().
Definition at line 687 of file gpu_codegen.c.
References GPUPass::shader.
Referenced by GPU_material_bind_uniforms(), GPU_material_construct_end(), and gpu_material_set_attrib_id().
void GPU_pass_unbind | ( | GPUPass * | pass | ) |
Definition at line 786 of file gpu_codegen.c.
References GPUInput::bindtex, ListBase::first, GPU_shader_unbind(), GPU_texture_unbind(), GPUInput::ima, GPUPass::inputs, inputs, GPUInput::next, NULL, GPUPass::shader, and GPUInput::tex.
Referenced by GPU_material_unbind().
void GPU_pass_update_uniforms | ( | GPUPass * | pass | ) |
Definition at line 770 of file gpu_codegen.c.
References GPUInput::dynamicvec, ListBase::first, GPU_shader_uniform_vector(), GPUInput::ima, GPUPass::inputs, inputs, GPUInput::next, GPUPass::shader, GPUInput::shaderloc, GPUInput::tex, and GPUInput::type.
Referenced by GPU_material_bind_uniforms().
GPUNodeLink* GPU_socket | ( | GPUNodeStack * | sock | ) |
Definition at line 1141 of file gpu_codegen.c.
References GPU_node_link_create(), link(), and GPUNodeLink::socket.
Referenced by gpu_shader_math(), and gpu_shader_vect_math().
int GPU_stack_link | ( | GPUMaterial * | mat, |
const char * | name, | ||
GPUNodeStack * | in, | ||
GPUNodeStack * | out, | ||
... | |||
) |
Definition at line 1195 of file gpu_codegen.c.
References FUNCTION_QUAL_IN, GPU_lookup_function(), gpu_material_add_node(), GPU_node_begin(), GPU_node_end(), gpu_node_input_link(), gpu_node_input_socket(), GPU_node_output(), GPU_NONE, i, link(), GPUFunction::paramqual, GPUFunction::paramtype, GPUNodeLink::socket, GPUFunction::totparam, and GPUNodeStack::type.
Referenced by gpu_shader_camera(), gpu_shader_combrgb(), gpu_shader_curve_rgb(), gpu_shader_curve_vec(), gpu_shader_geom(), gpu_shader_hue_sat(), gpu_shader_invert(), gpu_shader_mapping(), gpu_shader_math(), gpu_shader_mix_rgb(), gpu_shader_normal(), gpu_shader_output(), gpu_shader_rgb(), gpu_shader_rgbtobw(), gpu_shader_seprgb(), gpu_shader_squeeze(), gpu_shader_texture(), gpu_shader_valtorgb(), gpu_shader_value(), gpu_shader_vect_math(), node_shader_gpu_add_shader(), node_shader_gpu_bsdf_anisotropic(), node_shader_gpu_bsdf_diffuse(), node_shader_gpu_bsdf_glass(), node_shader_gpu_bsdf_glossy(), node_shader_gpu_bsdf_translucent(), node_shader_gpu_bsdf_transparent(), node_shader_gpu_bsdf_velvet(), node_shader_gpu_emission(), node_shader_gpu_fresnel(), node_shader_gpu_geometry(), node_shader_gpu_light_path(), node_shader_gpu_mix_shader(), node_shader_gpu_output_material(), node_shader_gpu_tex_checker(), node_shader_gpu_tex_coord(), node_shader_gpu_tex_environment(), node_shader_gpu_tex_gradient(), node_shader_gpu_tex_image(), node_shader_gpu_tex_magic(), node_shader_gpu_tex_musgrave(), node_shader_gpu_tex_noise(), node_shader_gpu_tex_sky(), node_shader_gpu_tex_voronoi(), and node_shader_gpu_tex_wave().
int GPU_stack_link_mute | ( | GPUMaterial * | mat, |
const char * | name, | ||
LinkInOutsMuteNode * | mlnk | ||
) |
Definition at line 1258 of file gpu_codegen.c.
References GPU_lookup_function(), gpu_material_add_node(), GPU_node_begin(), GPU_node_end(), gpu_node_input_socket(), GPU_node_output(), i, LinkInOutsMuteNode::in, GPUNode::name, LinkInOutsMuteNode::num_outs, and LinkInOutsMuteNode::outs.
Referenced by gpu_shader_pass_on().
static int gpu_str_prefix | ( | const char * | str, |
const char * | prefix | ||
) | [static] |
Definition at line 78 of file gpu_codegen.c.
Referenced by codegen_print_uniforms_functions(), and gpu_parse_functions_string().
static char* gpu_str_skip_token | ( | char * | str, |
char * | token, | ||
int | max | ||
) | [static] |
Definition at line 91 of file gpu_codegen.c.
References ELEM6, ELEM7, len(), and str.
Referenced by gpu_parse_functions_string().
GPUNodeLink* GPU_texture | ( | int | size, |
float * | pixels | ||
) |
Definition at line 1118 of file gpu_codegen.c.
References GPU_node_link_create(), link(), GPUNodeLink::ptr1, size(), GPUNodeLink::texture, and GPUNodeLink::texturesize.
Referenced by do_colorband_blend(), gpu_shader_curve_rgb(), gpu_shader_curve_vec(), gpu_shader_valtorgb(), and lamp_get_visibility().
GPUNodeLink* GPU_uniform | ( | float * | num | ) |
Definition at line 1084 of file gpu_codegen.c.
References GPU_node_link_create(), link(), NULL, GPUNodeLink::ptr1, and GPUNodeLink::ptr2.
Referenced by do_colorband_blend(), do_material_tex(), gpu_get_input_link(), GPU_shadeinput_set(), gpu_shader_mapping(), gpu_shader_normal(), gpu_shader_rgb(), gpu_shader_value(), GPU_shaderesult_set(), lamp_get_visibility(), node_shader_gpu_tex_environment(), node_shader_gpu_tex_image(), node_shader_gpu_tex_magic(), node_shader_gpu_tex_mapping(), and shade_one_light().
Definition at line 4 of file gpu_shader_material.glsl.c.
Referenced by GPU_code_generate_glsl_lib().
Definition at line 7 of file gpu_shader_vertex.glsl.c.
Referenced by code_generate_vertex().
GHash* FUNCTION_HASH = NULL [static] |
Definition at line 74 of file gpu_codegen.c.
char* glsl_material_library = NULL [static] |
Definition at line 63 of file gpu_codegen.c.
Referenced by GPU_code_generate_glsl_lib(), GPU_codegen_exit(), GPU_generate_pass(), and GPU_lookup_function().
const char* GPU_DATATYPE_STR[17] [static] |
{"", "float", "vec2", "vec3", "vec4", NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"}
Definition at line 68 of file gpu_codegen.c.
Referenced by code_generate_vertex(), codegen_declare_tmps(), codegen_print_datatype(), codegen_print_uniforms_functions(), and gpu_parse_functions_string().