diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-23 15:36:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-26 20:18:34 +0300 |
commit | 7f840426fd4917f56e7bafcffffd51b93c1fc6f7 (patch) | |
tree | ef90d2c4836e1f521bfc847c92d4b692369a2295 /source/blender/gpu/CMakeLists.txt | |
parent | 6b189d2bcf3536231f7040926ed34fe01012f14e (diff) |
GPU: add mechanism for splitting up big gpu_shader_material.glsl file
Compiling this big file for every Eevee material is bad for performance, and
now that we are adding more nodes it gets worse. This patch adds a simple
mechanism to split up that file, and use only the parts used by shader nodes.
When a function is used by GPU_link, we detect which GLSL file it came from
and use it in GLSL code generation automatically. Dependencies between GLSL
files are manually specified, and function names must be unique across all
GLSL files.
Most of the actual splitting up will be done in later commits.
Differential Revision: https://developer.blender.org/D5569
Diffstat (limited to 'source/blender/gpu/CMakeLists.txt')
-rw-r--r-- | source/blender/gpu/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index fb7d3c1ace8..4a67f5f6af8 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -116,6 +116,7 @@ set(SRC intern/gpu_batch_private.h intern/gpu_codegen.h intern/gpu_context_private.h + intern/gpu_material_library.h intern/gpu_matrix_private.h intern/gpu_primitive_private.h intern/gpu_private.h @@ -232,6 +233,9 @@ data_to_c_simple(shaders/gpu_shader_keyframe_diamond_frag.glsl SRC) data_to_c_simple(shaders/gpu_shader_geometry.glsl SRC) data_to_c_simple(shaders/gpu_shader_material.glsl SRC) +data_to_c_simple(shaders/gpu_shader_material_hash.glsl SRC) +data_to_c_simple(shaders/gpu_shader_material_magic.glsl SRC) +data_to_c_simple(shaders/gpu_shader_material_white_noise.glsl SRC) data_to_c_simple(shaders/gpu_shader_gpencil_stroke_vert.glsl SRC) data_to_c_simple(shaders/gpu_shader_gpencil_stroke_frag.glsl SRC) |