1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Optimize include files to improve shader_language.h compilation speed

This commit is contained in:
Yuri Roubinsky
2022-01-10 21:46:41 +03:00
parent d9f6e33663
commit 422f7b280f
9 changed files with 9 additions and 9 deletions

View File

@@ -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) {