Clément Foucault
acb2f02910
EEVEE: Reduce necessary includes
This saves a few milisecond of compile time per shader.
This removes the need for occlusion lib when not using occlusion
node.
To improve detection of uneeded includes, we add a new logging
system which output can be fed to mermaid to inspect dependencies.
The new dependencies can be inspected using `--log "gpu.shader_dependencies"`
Example pasted here:
```mermaid
flowchart LR
draw_curves_lib.glsl_7298 --> gpu_shader_math_constants_lib.glsl_600
style gpu_shader_math_constants_lib.glsl_600 fill:#0f0
gpu_shader_math_matrix_conversion_lib.glsl_1032 --> gpu_shader_math_base_lib.glsl_1406
style gpu_shader_math_base_lib.glsl_1406 fill:#1e0
gpu_shader_math_matrix_conversion_lib.glsl_1032 --> gpu_shader_math_euler_lib.glsl_461
style gpu_shader_math_euler_lib.glsl_461 fill:#0f0
gpu_shader_math_matrix_compare_lib.glsl_2964 --> gpu_shader_math_vector_compare_lib.glsl_2489
style gpu_shader_math_vector_compare_lib.glsl_2489 fill:#2d0
gpu_shader_math_matrix_conversion_lib.glsl_1032 --> gpu_shader_math_matrix_compare_lib.glsl_2964
style gpu_shader_math_matrix_compare_lib.glsl_2964 fill:#2d0
gpu_shader_math_matrix_conversion_lib.glsl_1032 --> gpu_shader_math_quaternion_lib.glsl_395
style gpu_shader_math_quaternion_lib.glsl_395 fill:#0f0
gpu_shader_math_matrix_conversion_lib.glsl_1032 --> gpu_shader_utildefines_lib.glsl_3112
style gpu_shader_utildefines_lib.glsl_3112 fill:#3c0
draw_curves_lib.glsl_7298 --> gpu_shader_math_matrix_conversion_lib.glsl_1032
style gpu_shader_math_matrix_conversion_lib.glsl_1032 fill:#1e0
draw_curves_lib.glsl_7298 --> gpu_shader_math_matrix_transform_lib.glsl_706
style gpu_shader_math_matrix_transform_lib.glsl_706 fill:#0f0
eevee_surf_deferred_frag.glsl_4531 --> draw_curves_lib.glsl_7298
style draw_curves_lib.glsl_7298 fill:#780
eevee_surf_deferred_frag.glsl_4531 --> draw_view_lib.glsl_3551
style draw_view_lib.glsl_3551 fill:#3c0
eevee_gbuffer_lib.glsl_14598 --> gpu_shader_math_vector_reduce_lib.glsl_1383
style gpu_shader_math_vector_reduce_lib.glsl_1383 fill:#1e0
eevee_gbuffer_lib.glsl_14598 --> gpu_shader_codegen_lib.glsl_6143
style gpu_shader_codegen_lib.glsl_6143 fill:#690
eevee_gbuffer_lib.glsl_14598 --> gpu_shader_math_vector_lib.glsl_5038
style gpu_shader_math_vector_lib.glsl_5038 fill:#5a0
eevee_gbuffer_lib.glsl_14598 --> gpu_shader_utildefines_lib.glsl_3112
style gpu_shader_utildefines_lib.glsl_3112 fill:#3c0
eevee_gbuffer_write_lib.glsl_7324 --> eevee_gbuffer_lib.glsl_14598
style eevee_gbuffer_lib.glsl_14598 fill:#e10
eevee_surf_deferred_frag.glsl_4531 --> eevee_gbuffer_write_lib.glsl_7324
style eevee_gbuffer_write_lib.glsl_7324 fill:#780
eevee_ambient_occlusion_lib.glsl_10738 --> draw_view_lib.glsl_3551
style draw_view_lib.glsl_3551 fill:#3c0
draw_math_geom_lib.glsl_5172 --> gpu_shader_math_vector_lib.glsl_5038
style gpu_shader_math_vector_lib.glsl_5038 fill:#5a0
draw_math_geom_lib.glsl_5172 --> gpu_shader_math_vector_reduce_lib.glsl_1383
style gpu_shader_math_vector_reduce_lib.glsl_1383 fill:#1e0
eevee_ray_types_lib.glsl_2390 --> draw_math_geom_lib.glsl_5172
style draw_math_geom_lib.glsl_5172 fill:#5a0
eevee_ray_types_lib.glsl_2390 --> draw_view_lib.glsl_3551
style draw_view_lib.glsl_3551 fill:#3c0
eevee_ray_types_lib.glsl_2390 --> gpu_shader_math_matrix_transform_lib.glsl_706
style gpu_shader_math_matrix_transform_lib.glsl_706 fill:#0f0
gpu_shader_math_safe_lib.glsl_1235 --> gpu_shader_math_constants_lib.glsl_600
style gpu_shader_math_constants_lib.glsl_600 fill:#0f0
eevee_ray_types_lib.glsl_2390 --> gpu_shader_math_safe_lib.glsl_1235
style gpu_shader_math_safe_lib.glsl_1235 fill:#1e0
eevee_ray_types_lib.glsl_2390 --> gpu_shader_ray_lib.glsl_137
style gpu_shader_ray_lib.glsl_137 fill:#0f0
eevee_ambient_occlusion_lib.glsl_10738 --> eevee_ray_types_lib.glsl_2390
style eevee_ray_types_lib.glsl_2390 fill:#2d0
eevee_sampling_lib.glsl_4291 --> gpu_shader_math_base_lib.glsl_1406
style gpu_shader_math_base_lib.glsl_1406 fill:#1e0
eevee_sampling_lib.glsl_4291 --> gpu_shader_math_constants_lib.glsl_600
style gpu_shader_math_constants_lib.glsl_600 fill:#0f0
eevee_sampling_lib.glsl_4291 --> gpu_shader_math_safe_lib.glsl_1235
style gpu_shader_math_safe_lib.glsl_1235 fill:#1e0
eevee_ambient_occlusion_lib.glsl_10738 --> eevee_sampling_lib.glsl_4291
style eevee_sampling_lib.glsl_4291 fill:#4b0
eevee_ambient_occlusion_lib.glsl_10738 --> eevee_utility_tx_lib.glsl_1225
style eevee_utility_tx_lib.glsl_1225 fill:#1e0
eevee_ambient_occlusion_lib.glsl_10738 --> gpu_shader_math_base_lib.glsl_1406
style gpu_shader_math_base_lib.glsl_1406 fill:#1e0
gpu_shader_math_fast_lib.glsl_921 --> gpu_shader_math_constants_lib.glsl_600
style gpu_shader_math_constants_lib.glsl_600 fill:#0f0
eevee_ambient_occlusion_lib.glsl_10738 --> gpu_shader_math_fast_lib.glsl_921
style gpu_shader_math_fast_lib.glsl_921 fill:#0f0
gpu_shader_math_vector_safe_lib.glsl_5847 --> gpu_shader_math_safe_lib.glsl_1235
style gpu_shader_math_safe_lib.glsl_1235 fill:#1e0
eevee_ambient_occlusion_lib.glsl_10738 --> gpu_shader_math_vector_safe_lib.glsl_5847
style gpu_shader_math_vector_safe_lib.glsl_5847 fill:#5a0
eevee_ambient_occlusion_lib.glsl_10738 --> gpu_shader_utildefines_lib.glsl_3112
style gpu_shader_utildefines_lib.glsl_3112 fill:#3c0
eevee_nodetree_frag_lib.glsl_395 --> eevee_ambient_occlusion_lib.glsl_10738
style eevee_ambient_occlusion_lib.glsl_10738 fill:#a50
eevee_nodetree_frag_lib.glsl_395 --> eevee_geom_types_lib.glsl_682
style eevee_geom_types_lib.glsl_682 fill:#0f0
draw_model_lib.glsl_2563 --> draw_view_lib.glsl_3551
style draw_view_lib.glsl_3551 fill:#3c0
eevee_nodetree_lib.glsl_16051 --> draw_model_lib.glsl_2563
style draw_model_lib.glsl_2563 fill:#2d0
draw_object_infos_lib.glsl_1114 --> draw_model_lib.glsl_2563
style draw_model_lib.glsl_2563 fill:#2d0
eevee_nodetree_lib.glsl_16051 --> draw_object_infos_lib.glsl_1114
style draw_object_infos_lib.glsl_1114 fill:#1e0
eevee_nodetree_lib.glsl_16051 --> draw_view_lib.glsl_3551
style draw_view_lib.glsl_3551 fill:#3c0
eevee_nodetree_lib.glsl_16051 --> eevee_renderpass_lib.glsl_1793
style eevee_renderpass_lib.glsl_1793 fill:#1e0
eevee_nodetree_lib.glsl_16051 --> eevee_utility_tx_lib.glsl_1225
style eevee_utility_tx_lib.glsl_1225 fill:#1e0
eevee_nodetree_lib.glsl_16051 --> gpu_shader_codegen_lib.glsl_6143
style gpu_shader_codegen_lib.glsl_6143 fill:#690
eevee_nodetree_lib.glsl_16051 --> gpu_shader_math_base_lib.glsl_1406
style gpu_shader_math_base_lib.glsl_1406 fill:#1e0
eevee_nodetree_lib.glsl_16051 --> gpu_shader_math_safe_lib.glsl_1235
style gpu_shader_math_safe_lib.glsl_1235 fill:#1e0
eevee_nodetree_lib.glsl_16051 --> gpu_shader_math_vector_reduce_lib.glsl_1383
style gpu_shader_math_vector_reduce_lib.glsl_1383 fill:#1e0
eevee_nodetree_lib.glsl_16051 --> gpu_shader_utildefines_lib.glsl_3112
style gpu_shader_utildefines_lib.glsl_3112 fill:#3c0
eevee_nodetree_frag_lib.glsl_395 --> eevee_nodetree_lib.glsl_16051
style eevee_nodetree_lib.glsl_16051 fill:#f00
gpu_shader_material_ambient_occlusion.glsl_558 --> gpu_shader_math_vector_safe_lib.glsl_5847
style gpu_shader_math_vector_safe_lib.glsl_5847 fill:#5a0
eevee_nodetree_frag_lib.glsl_395 --> gpu_shader_material_ambient_occlusion.glsl_558
style gpu_shader_material_ambient_occlusion.glsl_558 fill:#0f0
eevee_nodetree_frag_lib.glsl_395 --> gpu_shader_material_emission.glsl_380
style gpu_shader_material_emission.glsl_380 fill:#0f0
gpu_shader_material_output_material.glsl_850 --> gpu_shader_material_transform_utils.glsl_2136
style gpu_shader_material_transform_utils.glsl_2136 fill:#2d0
eevee_nodetree_frag_lib.glsl_395 --> gpu_shader_material_output_material.glsl_850
style gpu_shader_material_output_material.glsl_850 fill:#0f0
eevee_nodetree_frag_lib.glsl_395 --> gpu_shader_material_world_normals.glsl_128
style gpu_shader_material_world_normals.glsl_128 fill:#0f0
eevee_surf_deferred_frag.glsl_4531 --> eevee_nodetree_frag_lib.glsl_395
style eevee_nodetree_frag_lib.glsl_395 fill:#0f0
eevee_surf_deferred_frag.glsl_4531 --> eevee_sampling_lib.glsl_4291
style eevee_sampling_lib.glsl_4291 fill:#4b0
eevee_surf_lib.glsl_3650 --> draw_view_lib.glsl_3551
style draw_view_lib.glsl_3551 fill:#3c0
eevee_surf_lib.glsl_3650 --> gpu_shader_codegen_lib.glsl_6143
style gpu_shader_codegen_lib.glsl_6143 fill:#690
eevee_surf_lib.glsl_3650 --> gpu_shader_math_base_lib.glsl_1406
style gpu_shader_math_base_lib.glsl_1406 fill:#1e0
eevee_surf_lib.glsl_3650 --> gpu_shader_math_vector_safe_lib.glsl_5847
style gpu_shader_math_vector_safe_lib.glsl_5847 fill:#5a0
eevee_surf_deferred_frag.glsl_4531 --> eevee_surf_lib.glsl_3650
style eevee_surf_lib.glsl_3650 fill:#3c0
```
Pull Request: https://projects.blender.org/blender/blender/pulls/146580
2025-09-23 17:21:56 +02:00
..
2025-09-22 18:02:32 +02:00
2025-08-08 16:41:38 +10:00
2025-08-08 07:37:33 +10:00
2025-09-06 14:11:41 +10:00
2025-09-23 12:10:28 +02:00
2025-09-23 09:42:48 +10:00
2025-09-22 18:08:45 +02:00
2025-07-13 21:58:53 +10:00
2025-07-26 12:08:15 +00:00
2025-09-23 09:42:48 +10:00
2025-09-22 10:24:10 +02:00
2025-07-15 02:08:14 +02:00
2025-09-22 18:02:32 +02:00
2025-09-23 17:21:56 +02:00
2025-09-23 16:06:52 +02:00
2025-09-14 17:53:54 +02:00
2025-09-14 11:08:50 +00:00
2025-09-12 01:59:03 +02:00
2025-09-23 17:21:56 +02:00
2025-08-21 02:05:34 +00:00
2025-09-22 20:26:55 +02:00
2025-09-18 01:20:46 +02:00
2025-09-22 18:08:45 +02:00
2025-09-23 16:52:46 +02:00
2025-09-17 01:41:00 +02:00
2025-09-23 09:42:48 +10:00
2025-09-23 13:35:33 +10:00
2025-09-21 23:08:59 +02:00
2025-09-18 16:09:09 +02:00
2025-09-05 19:03:32 +02:00
2025-04-21 17:59:41 +02:00
2025-09-22 18:57:04 +02:00
2025-09-08 14:09:21 +02:00