Blender Git Commit Log
Git Commits -> Revision 8cd0da8
Revision 8cd0da8 by Omar Emara (master) August 30, 2019, 15:28 (GMT) |
GPU: Split gpu_shader_material into multiple files. This patch continue the efforts to split the `gpu_shader_material` file started in D5569. Dependency resolution is now recursive. Each shading node gets its own file. Additionally, some utility files are added to be shared between files, like `math_util`, `color_util`, and `hash`. Some files are always included because they may be used in the execution function, like `world_normals`. Some glsl functions appeared to be unused, so they were removed, like `output_node`, `bits_to_01`, and `exp_blender`. Other functions have been renamed to be more general and get used as utils, like `texco_norm` which became `vector_normalize`. A lot of the opengl tests fails, but those same tests also fail in master, so this is probably unrelated to this patch. Reviewers: brecht Differential Revision: https://developer.blender.org/D5616 |
Commit Details:
Full Hash: 8cd0da88e55a0c0f88297a5f0f770eb40acc6219
Parent Commit: ac646bc
Lines Changed: +4490, -3908
87 Added Paths:
/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl (+13, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl (+15, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_attribute.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl (+11, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_bevel.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_blackbody.glsl (+13, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_bright_contrast.glsl (+10, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_bump.glsl (+27, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_camera.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_cell_noise.glsl (+17, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_clamp.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl (+28, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_color_util.glsl (+111, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_combine_hsv.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_combine_rgb.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_combine_xyz.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_diffuse.glsl (+13, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_displacement.glsl (+12, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl (+40, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_emission.glsl (+10, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_fractal_noise.glsl (+32, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_fresnel.glsl (+37, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_gamma.glsl (+14, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_geometry.glsl (+46, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_glass.glsl (+23, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_glossy.glsl (+15, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl (+21, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_hash.glsl (+217, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_holdout.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_hue_sat_val.glsl (+14, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_invert.glsl (+5, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_layer_weight.glsl (+19, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_light_falloff.glsl (+7, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_light_path.glsl (+31, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_mapping.glsl (+7, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_map_range.glsl (+10, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_math.glsl (+130, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_math_util.glsl (+101, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_mix_rgb.glsl (+291, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_mix_shader.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_noise.glsl (+74, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_normal.glsl (+5, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_normal_map.glsl (+22, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl (+16, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_output_material.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl (+11, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_particle_info.glsl (+23, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl (+439, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_refraction.glsl (+16, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_rgb_curves.glsl (+73, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_rgb_to_bw.glsl (+5, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_separate_hsv.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_separate_rgb.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_separate_xyz.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_set.glsl (+44, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_shader_to_rgba.glsl (+25, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_squeeze.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_subsurface_scattering.glsl (+42, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tangent.glsl (+25, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_texture_coordinates.glsl (+92, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_brick.glsl (+78, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_checker.glsl (+17, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_environment.glsl (+44, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_gradient.glsl (+47, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl (+355, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_magic.glsl (+61, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_musgrave.glsl (+208, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_noise.glsl (+19, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl (+116, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_wave.glsl (+42, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_white_noise.glsl (+21, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_toon.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_translucent.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_transparent.glsl (+11, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl (+30, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl (+100, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_velvet.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_absorption.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_info.glsl (+88, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_principled.glsl (+67, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_scatter.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_wireframe.glsl (+31, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_world_normals.glsl (+25, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_ambient_occlusion.glsl (+13, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl (+15, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_attribute.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl (+11, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_bevel.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_blackbody.glsl (+13, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_bright_contrast.glsl (+10, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_bump.glsl (+27, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_camera.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_cell_noise.glsl (+17, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_clamp.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_color_ramp.glsl (+28, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_color_util.glsl (+111, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_combine_hsv.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_combine_rgb.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_combine_xyz.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_diffuse.glsl (+13, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_displacement.glsl (+12, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl (+40, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_emission.glsl (+10, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_fractal_noise.glsl (+32, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_fresnel.glsl (+37, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_gamma.glsl (+14, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_geometry.glsl (+46, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_glass.glsl (+23, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_glossy.glsl (+15, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_hair_info.glsl (+21, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_hash.glsl (+217, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_holdout.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_hue_sat_val.glsl (+14, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_invert.glsl (+5, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_layer_weight.glsl (+19, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_light_falloff.glsl (+7, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_light_path.glsl (+31, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_mapping.glsl (+7, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_map_range.glsl (+10, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_math.glsl (+130, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_math_util.glsl (+101, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_mix_rgb.glsl (+291, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_mix_shader.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_noise.glsl (+74, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_normal.glsl (+5, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_normal_map.glsl (+22, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_object_info.glsl (+16, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_output_material.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_output_world.glsl (+11, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_particle_info.glsl (+23, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl (+439, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_refraction.glsl (+16, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_rgb_curves.glsl (+73, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_rgb_to_bw.glsl (+5, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_separate_hsv.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_separate_rgb.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_separate_xyz.glsl (+6, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_set.glsl (+44, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_shader_to_rgba.glsl (+25, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_squeeze.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_subsurface_scattering.glsl (+42, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tangent.glsl (+25, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_texture_coordinates.glsl (+92, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_brick.glsl (+78, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_checker.glsl (+17, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_environment.glsl (+44, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_gradient.glsl (+47, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_image.glsl (+355, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_magic.glsl (+61, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_musgrave.glsl (+208, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_noise.glsl (+19, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_sky.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_voronoi.glsl (+116, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_wave.glsl (+42, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_tex_white_noise.glsl (+21, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_toon.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_translucent.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_transparent.glsl (+11, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_uv_map.glsl (+4, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_vector_curves.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_vector_displacement.glsl (+30, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_vector_math.glsl (+100, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_velvet.glsl (+9, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_absorption.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_info.glsl (+88, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_principled.glsl (+67, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_scatter.glsl (+8, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_wireframe.glsl (+31, -0) (View)
/source/blender/gpu/shaders/material/gpu_shader_material_world_normals.glsl (+25, -0) (View)
4 Deleted Paths:
/source/blender/gpu/shaders/gpu_shader_material.glsl (+0, -3583)
/source/blender/gpu/shaders/gpu_shader_material_hash.glsl (+0, -206)
/source/blender/gpu/shaders/gpu_shader_material_magic.glsl (+0, -61)
/source/blender/gpu/shaders/gpu_shader_material_white_noise.glsl (+0, -21)
/source/blender/gpu/shaders/gpu_shader_material_hash.glsl (+0, -206)
/source/blender/gpu/shaders/gpu_shader_material_magic.glsl (+0, -61)
/source/blender/gpu/shaders/gpu_shader_material_white_noise.glsl (+0, -21)
10 Modified Paths:
/source/blender/gpu/CMakeLists.txt (+88, -4) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+18, -9) (Diff)
/source/blender/gpu/intern/gpu_material_library.h (+618, -10) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mapping.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mixRgb.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_normal_map.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_environment.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_image.c (+5, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_vectTransform.c (+1, -1) (Diff)
/source/blender/nodes/shader/node_shader_util.c (+1, -1) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+18, -9) (Diff)
/source/blender/gpu/intern/gpu_material_library.h (+618, -10) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mapping.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_mixRgb.c (+1, -1) (Diff)
/source/blender/nodes/shader/nodes/node_shader_normal_map.c (+2, -2) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_environment.c (+3, -3) (Diff)
/source/blender/nodes/shader/nodes/node_shader_tex_image.c (+5, -5) (Diff)
/source/blender/nodes/shader/nodes/node_shader_vectTransform.c (+1, -1) (Diff)
/source/blender/nodes/shader/node_shader_util.c (+1, -1) (Diff)