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/intern/gpu_codegen.h | |
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/intern/gpu_codegen.h')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 6eb6bc2f05f..4e09f16ebf8 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -33,6 +33,7 @@ struct GPUNode; struct GPUOutput; struct GPUShader; struct GPUVertAttrLayers; +struct GSet; struct ListBase; /* Pass Generation @@ -207,4 +208,6 @@ struct GPUTexture **gpu_material_ramp_texture_row_set(GPUMaterial *mat, float *pixels, float *row); +struct GSet *gpu_material_used_libraries(struct GPUMaterial *material); + #endif |