Fully initialize all members of structs `IdentifierActions`, `GeneratedCode` and `DefaultIdentifierActions`
(cherry picked from commit b38ac30fe0
)
This commit is contained in:
parent
4cffca7fbc
commit
c1547d1337
|
@ -52,38 +52,38 @@ public:
|
||||||
HashMap<StringName, bool *> usage_flag_pointers;
|
HashMap<StringName, bool *> usage_flag_pointers;
|
||||||
HashMap<StringName, bool *> write_flag_pointers;
|
HashMap<StringName, bool *> write_flag_pointers;
|
||||||
|
|
||||||
HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms;
|
HashMap<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GeneratedCode {
|
struct GeneratedCode {
|
||||||
Vector<String> defines;
|
Vector<String> defines;
|
||||||
struct Texture {
|
struct Texture {
|
||||||
StringName name;
|
StringName name;
|
||||||
ShaderLanguage::DataType type;
|
ShaderLanguage::DataType type = ShaderLanguage::DataType::TYPE_VOID;
|
||||||
ShaderLanguage::ShaderNode::Uniform::Hint hint;
|
ShaderLanguage::ShaderNode::Uniform::Hint hint = ShaderLanguage::ShaderNode::Uniform::Hint::HINT_NONE;
|
||||||
bool use_color = false;
|
bool use_color = false;
|
||||||
ShaderLanguage::TextureFilter filter;
|
ShaderLanguage::TextureFilter filter = ShaderLanguage::TextureFilter::FILTER_DEFAULT;
|
||||||
ShaderLanguage::TextureRepeat repeat;
|
ShaderLanguage::TextureRepeat repeat = ShaderLanguage::TextureRepeat::REPEAT_DEFAULT;
|
||||||
bool global;
|
bool global = false;
|
||||||
int array_size;
|
int array_size = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector<Texture> texture_uniforms;
|
Vector<Texture> texture_uniforms;
|
||||||
|
|
||||||
Vector<uint32_t> uniform_offsets;
|
Vector<uint32_t> uniform_offsets;
|
||||||
uint32_t uniform_total_size;
|
uint32_t uniform_total_size = 0;
|
||||||
String uniforms;
|
String uniforms;
|
||||||
String stage_globals[STAGE_MAX];
|
String stage_globals[STAGE_MAX];
|
||||||
|
|
||||||
HashMap<String, String> code;
|
HashMap<String, String> code;
|
||||||
|
|
||||||
bool uses_global_textures;
|
bool uses_global_textures = false;
|
||||||
bool uses_fragment_time;
|
bool uses_fragment_time = false;
|
||||||
bool uses_vertex_time;
|
bool uses_vertex_time = false;
|
||||||
bool uses_screen_texture_mipmaps;
|
bool uses_screen_texture_mipmaps = false;
|
||||||
bool uses_screen_texture;
|
bool uses_screen_texture = false;
|
||||||
bool uses_depth_texture;
|
bool uses_depth_texture = false;
|
||||||
bool uses_normal_roughness_texture;
|
bool uses_normal_roughness_texture = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DefaultIdentifierActions {
|
struct DefaultIdentifierActions {
|
||||||
|
@ -91,8 +91,8 @@ public:
|
||||||
HashMap<StringName, String> render_mode_defines;
|
HashMap<StringName, String> render_mode_defines;
|
||||||
HashMap<StringName, String> usage_defines;
|
HashMap<StringName, String> usage_defines;
|
||||||
HashMap<StringName, String> custom_samplers;
|
HashMap<StringName, String> custom_samplers;
|
||||||
ShaderLanguage::TextureFilter default_filter;
|
ShaderLanguage::TextureFilter default_filter = ShaderLanguage::TextureFilter::FILTER_DEFAULT;
|
||||||
ShaderLanguage::TextureRepeat default_repeat;
|
ShaderLanguage::TextureRepeat default_repeat = ShaderLanguage::TextureRepeat::REPEAT_DEFAULT;
|
||||||
int base_texture_binding_index = 0;
|
int base_texture_binding_index = 0;
|
||||||
int texture_layout_set = 0;
|
int texture_layout_set = 0;
|
||||||
String base_uniform_string;
|
String base_uniform_string;
|
||||||
|
|
Loading…
Reference in New Issue