From 2a489273d7e2354a9f1afc3212863ff4b463cf86 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 14 Jul 2017 17:40:54 +0200 Subject: Implement Uniformbuffer objects for nodetree parameters For users that means you can tweak shaders in the nodetree and things are way faster. This is a huge improvement, particularly in systems that have no shader cache. From the code perspective it means we are no longer re-compiling the shader every time a value is tweaked in the UI. We are using uniforms for those values. It would be slow to add that many uniforms for all the shaders. So instead we are using UBO (Uniform Buffer Objects). This fixes the main issue of T51467. However GWN_shaderinterface_create() still needs to be improvedi. When opening a .blend all shaders are compiled once, so optimizing it will bring a measurable impact. ======================================================================== NOTE: This breaks update of Cycles material upon nodetree nodes tweaking. It will be fixed separately by depsgraph, once tackling T51925 (Animated Eevee values slowdown). The idea is to make Depsgraph update more granular. The XXX TODO in rna_nodetree.c will be tackled at that time as well. ======================================================================== Reviewers: sergey, brecht, fclem Differential Revision: https://developer.blender.org/D2739 --- source/blender/gpu/intern/gpu_codegen.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/gpu/intern/gpu_codegen.h') diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 159b1f4ef8e..28eb55968bb 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -168,6 +168,7 @@ struct GPUPass { typedef struct GPUPass GPUPass; GPUPass *GPU_generate_pass_new( + struct GPUMaterial *material, ListBase *nodes, struct GPUNodeLink *frag_outlink, struct GPUVertexAttribs *attribs, const char *vert_code, const char *geom_code, -- cgit v1.2.3