diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2021-12-08 15:15:07 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-08 15:15:07 +0300 |
commit | 04fac59f3fc035ec75a7d9b46621dd75ec9d8483 (patch) | |
tree | b2ffa6cb52a944a922f78ddebdce6a233ec6eccd /servers/rendering/renderer_rd | |
parent | 6ab7657464da75a75edac731f4d863d4afc11cd1 (diff) | |
parent | 76f6c0849c35ba1a3993b91892a977a5504e6f28 (diff) |
Merge pull request #51381 from Chaosus/shader_compile_enchancement
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r-- | servers/rendering/renderer_rd/shader_compiler_rd.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shader_compiler_rd.cpp b/servers/rendering/renderer_rd/shader_compiler_rd.cpp index b02b3d2723..794c999d1d 100644 --- a/servers/rendering/renderer_rd/shader_compiler_rd.cpp +++ b/servers/rendering/renderer_rd/shader_compiler_rd.cpp @@ -1413,7 +1413,13 @@ ShaderLanguage::DataType ShaderCompilerRD::_get_variable_type(const StringName & } Error ShaderCompilerRD::compile(RS::ShaderMode p_mode, const String &p_code, IdentifierActions *p_actions, const String &p_path, GeneratedCode &r_gen_code) { - Error err = parser.compile(p_code, ShaderTypes::get_singleton()->get_functions(p_mode), ShaderTypes::get_singleton()->get_modes(p_mode), ShaderLanguage::VaryingFunctionNames(), ShaderTypes::get_singleton()->get_types(), _get_variable_type); + SL::ShaderCompileInfo info; + info.functions = ShaderTypes::get_singleton()->get_functions(p_mode); + info.render_modes = ShaderTypes::get_singleton()->get_modes(p_mode); + info.shader_types = ShaderTypes::get_singleton()->get_types(); + info.global_variable_type_func = _get_variable_type; + + Error err = parser.compile(p_code, info); if (err != OK) { Vector<String> shader = p_code.split("\n"); |