diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript.cpp | 3 | ||||
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 11 | ||||
-rw-r--r-- | modules/glslang/register_types.cpp | 34 | ||||
-rw-r--r-- | modules/gridmap/editor/grid_map_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | modules/lightmapper_rd/lightmapper_rd.cpp | 6 | ||||
-rw-r--r-- | modules/noise/editor/noise_editor_plugin.cpp | 2 | ||||
-rw-r--r-- | modules/visual_script/editor/visual_script_editor.cpp | 2 |
9 files changed, 41 insertions, 25 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index e7aa3214b4..e74314389d 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -536,6 +536,9 @@ void GDScript::_update_doc() { List<PropertyInfo> props; _get_script_property_list(&props, false); for (int i = 0; i < props.size(); i++) { + if (props[i].usage & PROPERTY_USAGE_CATEGORY || props[i].usage & PROPERTY_USAGE_GROUP || props[i].usage & PROPERTY_USAGE_SUBGROUP) { + continue; + } ScriptMemberInfo scr_member_info; scr_member_info.propinfo = props[i]; scr_member_info.propinfo.usage |= PROPERTY_USAGE_NIL_IS_VARIANT; diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index af8e4b3746..e36252ada5 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -43,7 +43,7 @@ bool GDScriptCompiler::_is_class_member_property(CodeGen &codegen, const StringN return false; } - if (codegen.locals.has(p_name)) { + if (codegen.parameters.has(p_name) || codegen.locals.has(p_name)) { return false; //shadowed } diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 0a1e1a22fb..90dcfa307e 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2004,8 +2004,8 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context, return false; } - // Check autoloads. - if (ProjectSettings::get_singleton()->has_autoload(p_identifier)) { + // Check global variables (including autoloads). + if (GDScriptLanguage::get_singleton()->get_named_globals_map().has(p_identifier)) { r_type = _type_from_variant(GDScriptLanguage::get_singleton()->get_named_globals_map()[p_identifier]); return true; } diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 6c5d416cf1..01a672c330 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -3422,7 +3422,16 @@ void GDScriptParser::get_class_doc_comment(int p_line, String &p_brief, String & p_tutorials.append(Pair<String, String>(title, link)); break; case DONE: - return; + break; + } + } + if (current_class->members.size() > 0) { + const ClassNode::Member &m = current_class->members[0]; + int first_member_line = m.get_line(); + if (first_member_line == line) { + p_brief = ""; + p_desc = ""; + p_tutorials.clear(); } } } diff --git a/modules/glslang/register_types.cpp b/modules/glslang/register_types.cpp index 64891d9ee8..b1c2140039 100644 --- a/modules/glslang/register_types.cpp +++ b/modules/glslang/register_types.cpp @@ -38,7 +38,8 @@ #include <glslang/Public/ShaderLang.h> #include <glslang/SPIRV/GlslangToSpv.h> -static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage, const String &p_source_code, RenderingDevice::ShaderLanguage p_language, String *r_error, const RenderingDevice::Capabilities *p_capabilities) { +static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage, const String &p_source_code, RenderingDevice::ShaderLanguage p_language, String *r_error, const RenderingDevice *p_render_device) { + const RD::Capabilities *capabilities = p_render_device->get_device_capabilities(); Vector<uint8_t> ret; ERR_FAIL_COND_V(p_language == RenderingDevice::SHADER_LANGUAGE_HLSL, ret); @@ -58,12 +59,12 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage glslang::EShTargetLanguageVersion TargetVersion = glslang::EShTargetSpv_1_5; glslang::TShader::ForbidIncluder includer; - if (p_capabilities->device_family == RenderingDevice::DeviceFamily::DEVICE_VULKAN) { - if (p_capabilities->version_major == 1 && p_capabilities->version_minor == 0) { + if (capabilities->device_family == RenderingDevice::DeviceFamily::DEVICE_VULKAN) { + if (capabilities->version_major == 1 && capabilities->version_minor == 0) { ClientVersion = glslang::EShTargetVulkan_1_0; TargetVersion = glslang::EShTargetSpv_1_0; check_subgroup_support = false; // subgroups are not supported in Vulkan 1.0 - } else if (p_capabilities->version_major == 1 && p_capabilities->version_minor == 1) { + } else if (capabilities->version_major == 1 && capabilities->version_minor == 1) { ClientVersion = glslang::EShTargetVulkan_1_1; TargetVersion = glslang::EShTargetSpv_1_3; } else { @@ -90,34 +91,36 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage if (check_subgroup_support) { uint32_t stage_bit = 1 << p_stage; - if ((p_capabilities->subgroup_in_shaders & stage_bit) == stage_bit) { + uint32_t subgroup_in_shaders = uint32_t(p_render_device->limit_get(RD::LIMIT_SUBGROUP_IN_SHADERS)); + uint32_t subgroup_operations = uint32_t(p_render_device->limit_get(RD::LIMIT_SUBGROUP_OPERATIONS)); + if ((subgroup_in_shaders & stage_bit) == stage_bit) { // stage supports subgroups preamble += "#define has_GL_KHR_shader_subgroup_basic 1\n"; - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_VOTE_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_VOTE_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_vote 1\n"; } - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_ARITHMETIC_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_ARITHMETIC_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_arithmetic 1\n"; } - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_BALLOT_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_BALLOT_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_ballot 1\n"; } - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_SHUFFLE_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_SHUFFLE_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_shuffle 1\n"; } - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_SHUFFLE_RELATIVE_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_SHUFFLE_RELATIVE_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_shuffle_relative 1\n"; } - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_CLUSTERED_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_CLUSTERED_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_clustered 1\n"; } - if (p_capabilities->subgroup_operations & RenderingDevice::SUBGROUP_QUAD_BIT) { + if (subgroup_operations & RenderingDevice::SUBGROUP_QUAD_BIT) { preamble += "#define has_GL_KHR_shader_subgroup_quad 1\n"; } } } - if (p_capabilities->supports_multiview) { + if (p_render_device->has_feature(RD::SUPPORTS_MULTIVIEW)) { preamble += "#define has_VK_KHR_multiview 1\n"; } @@ -184,9 +187,10 @@ static Vector<uint8_t> _compile_shader_glsl(RenderingDevice::ShaderStage p_stage return ret; } -static String _get_cache_key_function_glsl(const RenderingDevice::Capabilities *p_capabilities) { +static String _get_cache_key_function_glsl(const RenderingDevice *p_render_device) { + const RD::Capabilities *capabilities = p_render_device->get_device_capabilities(); String version; - version = "SpirVGen=" + itos(glslang::GetSpirvGeneratorVersion()) + ", major=" + itos(p_capabilities->version_major) + ", minor=" + itos(p_capabilities->version_minor) + " , subgroup_size=" + itos(p_capabilities->subgroup_operations) + " , subgroup_ops=" + itos(p_capabilities->subgroup_operations) + " , subgroup_in_shaders=" + itos(p_capabilities->subgroup_in_shaders); + version = "SpirVGen=" + itos(glslang::GetSpirvGeneratorVersion()) + ", major=" + itos(capabilities->version_major) + ", minor=" + itos(capabilities->version_minor) + " , subgroup_size=" + itos(p_render_device->limit_get(RD::LIMIT_SUBGROUP_SIZE)) + " , subgroup_ops=" + itos(p_render_device->limit_get(RD::LIMIT_SUBGROUP_OPERATIONS)) + " , subgroup_in_shaders=" + itos(p_render_device->limit_get(RD::LIMIT_SUBGROUP_IN_SHADERS)); return version; } diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp index b694c109e1..f975d95079 100644 --- a/modules/gridmap/editor/grid_map_editor_plugin.cpp +++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp @@ -1262,7 +1262,7 @@ GridMapEditor::GridMapEditor() { info_message->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER); info_message->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART); info_message->set_custom_minimum_size(Size2(100 * EDSCALE, 0)); - info_message->set_anchors_and_offsets_preset(PRESET_WIDE, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); + info_message->set_anchors_and_offsets_preset(PRESET_FULL_RECT, PRESET_MODE_KEEP_SIZE, 8 * EDSCALE); mesh_library_palette->add_child(info_message); edit_axis = Vector3::AXIS_Y; diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index 2ce3715bea..83ac478a97 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -271,8 +271,8 @@ Lightmapper::BakeError LightmapperRD::_blit_meshes_into_atlas(int p_max_texture_ mi.offset.x = best_atlas_offsets[m_i].x; mi.offset.y = best_atlas_offsets[m_i].y; mi.slice = best_atlas_offsets[m_i].z; - albedo_images.write[mi.slice]->blit_rect(mi.data.albedo_on_uv2, Rect2(Vector2(), Size2i(mi.data.albedo_on_uv2->get_width(), mi.data.albedo_on_uv2->get_height())), mi.offset); - emission_images.write[mi.slice]->blit_rect(mi.data.emission_on_uv2, Rect2(Vector2(), Size2i(mi.data.emission_on_uv2->get_width(), mi.data.emission_on_uv2->get_height())), mi.offset); + albedo_images.write[mi.slice]->blit_rect(mi.data.albedo_on_uv2, Rect2i(Vector2i(), mi.data.albedo_on_uv2->get_size()), mi.offset); + emission_images.write[mi.slice]->blit_rect(mi.data.emission_on_uv2, Rect2(Vector2i(), mi.data.emission_on_uv2->get_size()), mi.offset); } return BAKE_OK; @@ -1420,7 +1420,7 @@ LightmapperRD::BakeError LightmapperRD::bake(BakeQuality p_quality, bool p_use_d img2.instantiate(); img2->create(2, 2, false, Image::FORMAT_RGBAF, s); img2->convert(Image::FORMAT_RGB8); - img->blit_rect(img2, Rect2(0, 0, 2, 2), Point2((j % 3) * 2, (j / 3) * 2)); + img->blit_rect(img2, Rect2i(0, 0, 2, 2), Point2i((j % 3) * 2, (j / 3) * 2)); } img->save_png("res://3_light_probe_" + itos(i) + ".png"); } diff --git a/modules/noise/editor/noise_editor_plugin.cpp b/modules/noise/editor/noise_editor_plugin.cpp index 32c3f0aad4..27a86f45b5 100644 --- a/modules/noise/editor/noise_editor_plugin.cpp +++ b/modules/noise/editor/noise_editor_plugin.cpp @@ -54,7 +54,7 @@ public: set_custom_minimum_size(Size2(0, EDSCALE * PREVIEW_HEIGHT)); _texture_rect = memnew(TextureRect); - _texture_rect->set_anchors_and_offsets_preset(Control::PRESET_WIDE); + _texture_rect->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT); _texture_rect->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_COVERED); add_child(_texture_rect); diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp index d9419292ba..61ff56b62a 100644 --- a/modules/visual_script/editor/visual_script_editor.cpp +++ b/modules/visual_script/editor/visual_script_editor.cpp @@ -4628,7 +4628,7 @@ VisualScriptEditor::VisualScriptEditor() { graph = memnew(GraphEdit); add_child(graph); graph->set_v_size_flags(Control::SIZE_EXPAND_FILL); - graph->set_anchors_and_offsets_preset(Control::PRESET_WIDE); + graph->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT); graph->set_show_zoom_label(true); graph->connect("node_selected", callable_mp(this, &VisualScriptEditor::_node_selected)); graph->connect("begin_node_move", callable_mp(this, &VisualScriptEditor::_begin_node_move)); |