summaryrefslogtreecommitdiff
path: root/servers/rendering/shader_compiler.cpp
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2022-01-10 21:46:41 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2022-01-12 14:19:12 +0300
commit422f7b280f8ee7b3f737b1e87e4c1de912e62f8a (patch)
treeecf24dcf58ce15579791c243a9406938f6147662 /servers/rendering/shader_compiler.cpp
parentd9f6e33663f365478150550acc3ec64aa9bb347c (diff)
Optimize include files to improve `shader_language.h` compilation speed
Diffstat (limited to 'servers/rendering/shader_compiler.cpp')
-rw-r--r--servers/rendering/shader_compiler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp
index 79749dc66c..114e7e66cb 100644
--- a/servers/rendering/shader_compiler.cpp
+++ b/servers/rendering/shader_compiler.cpp
@@ -32,6 +32,7 @@
#include "core/config/project_settings.h"
#include "core/os/os.h"
+#include "servers/rendering/shader_types.h"
#include "servers/rendering_server.h"
#define SL ShaderLanguage
@@ -1333,7 +1334,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
ShaderLanguage::DataType ShaderCompiler::_get_variable_type(const StringName &p_type) {
RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_type);
- return RS::global_variable_type_get_shader_datatype(gvt);
+ return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
}
Error ShaderCompiler::compile(RS::ShaderMode p_mode, const String &p_code, IdentifierActions *p_actions, const String &p_path, GeneratedCode &r_gen_code) {