summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/editor_inspector.cpp8
-rw-r--r--editor/input_map_editor.h2
-rw-r--r--editor/scene_tree_dock.cpp5
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h2
-rw-r--r--scene/main/viewport.h2
-rw-r--r--thirdparty/vulkan/loader/loader.c2
-rw-r--r--thirdparty/vulkan/loader/loader.h3
-rw-r--r--thirdparty/vulkan/loader/vk_loader_platform.h16
-rw-r--r--thirdparty/vulkan/patches/Vulkan-Loader-revert-pr260.patch57
9 files changed, 88 insertions, 9 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 9900e8184d..601f0ad735 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -358,10 +358,6 @@ bool EditorPropertyRevert::may_node_be_in_instance(Node *p_node) {
Node *node = p_node;
while (node) {
- if (node->get_scene_instance_state().is_valid()) {
- might_be = true;
- break;
- }
if (node == edited_scene) {
if (node->get_scene_inherited_state().is_valid()) {
might_be = true;
@@ -370,6 +366,10 @@ bool EditorPropertyRevert::may_node_be_in_instance(Node *p_node) {
might_be = false;
break;
}
+ if (node->get_scene_instance_state().is_valid()) {
+ might_be = true;
+ break;
+ }
node = node->get_owner();
}
diff --git a/editor/input_map_editor.h b/editor/input_map_editor.h
index cc806fc660..87a25e91b0 100644
--- a/editor/input_map_editor.h
+++ b/editor/input_map_editor.h
@@ -69,7 +69,7 @@ class InputMapEditor : public Control {
AcceptDialog *message;
UndoRedo *undo_redo;
String inputmap_changed;
- bool setting;
+ bool setting = false;
void _update_actions();
void _add_item(int p_item, Ref<InputEvent> p_exiting_event = Ref<InputEvent>());
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index c4e90ca3ff..46e9cd4676 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -1762,6 +1762,8 @@ void SceneTreeDock::_script_created(Ref<Script> p_script) {
void SceneTreeDock::_script_creation_closed() {
script_create_dialog->disconnect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
+ script_create_dialog->disconnect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
+ script_create_dialog->disconnect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
}
void SceneTreeDock::_toggle_editable_children_from_selection() {
@@ -2651,7 +2653,8 @@ void SceneTreeDock::attach_script_to_selected(bool p_extend) {
}
script_create_dialog->connect("script_created", callable_mp(this, &SceneTreeDock::_script_created));
- script_create_dialog->connect("popup_hide", callable_mp(this, &SceneTreeDock::_script_creation_closed), varray(), CONNECT_ONESHOT);
+ script_create_dialog->connect("confirmed", callable_mp(this, &SceneTreeDock::_script_creation_closed));
+ script_create_dialog->connect("cancelled", callable_mp(this, &SceneTreeDock::_script_creation_closed));
script_create_dialog->set_inheritance_base_type("Node");
script_create_dialog->config(inherits, path);
script_create_dialog->popup_centered();
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 7e136ff9bb..ee17a52d31 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -93,7 +93,7 @@ class GridMapEditor : public VBoxContainer {
List<SetItem> set_items;
- GridMap *node;
+ GridMap *node = nullptr;
MeshLibrary *last_mesh_library;
ClipMode clip_mode;
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 9238f7637c..b7d4a56b9e 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -279,7 +279,7 @@ private:
MSAA msaa;
ScreenSpaceAA screen_space_aa;
- bool use_debanding;
+ bool use_debanding = false;
Ref<ViewportTexture> default_texture;
Set<ViewportTexture *> viewport_textures;
diff --git a/thirdparty/vulkan/loader/loader.c b/thirdparty/vulkan/loader/loader.c
index 418b88e30a..a6b5522cd4 100644
--- a/thirdparty/vulkan/loader/loader.c
+++ b/thirdparty/vulkan/loader/loader.c
@@ -7849,7 +7849,7 @@ out:
return result;
}
-#if defined(_WIN32)
+#if defined(_WIN32) && defined(LOADER_DYNAMIC_LIB)
BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
switch (reason) {
case DLL_PROCESS_ATTACH:
diff --git a/thirdparty/vulkan/loader/loader.h b/thirdparty/vulkan/loader/loader.h
index 621eb0be3b..a3c1f6b635 100644
--- a/thirdparty/vulkan/loader/loader.h
+++ b/thirdparty/vulkan/loader/loader.h
@@ -428,6 +428,9 @@ static inline void loader_init_dispatch(void *obj, const void *data) {
// Global variables used across files
extern struct loader_struct loader;
extern THREAD_LOCAL_DECL struct loader_instance *tls_instance;
+#if defined(_WIN32) && !defined(LOADER_DYNAMIC_LIB)
+extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_init);
+#endif
extern loader_platform_thread_mutex loader_lock;
extern loader_platform_thread_mutex loader_json_lock;
extern loader_platform_thread_mutex loader_preload_icd_lock;
diff --git a/thirdparty/vulkan/loader/vk_loader_platform.h b/thirdparty/vulkan/loader/vk_loader_platform.h
index e227bf07b2..b7664f50a1 100644
--- a/thirdparty/vulkan/loader/vk_loader_platform.h
+++ b/thirdparty/vulkan/loader/vk_loader_platform.h
@@ -368,9 +368,25 @@ typedef HANDLE loader_platform_thread;
// The once init functionality is not used when building a DLL on Windows. This is because there is no way to clean up the
// resources allocated by anything allocated by once init. This isn't a problem for static libraries, but it is for dynamic
// ones. When building a DLL, we use DllMain() instead to allow properly cleaning up resources.
+#if defined(LOADER_DYNAMIC_LIB)
#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var)
#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var)
#define LOADER_PLATFORM_THREAD_ONCE(ctl, func)
+#else
+#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) INIT_ONCE var = INIT_ONCE_STATIC_INIT;
+#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) INIT_ONCE var;
+#define LOADER_PLATFORM_THREAD_ONCE(ctl, func) loader_platform_thread_once_fn(ctl, func)
+static BOOL CALLBACK InitFuncWrapper(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context) {
+ void (*func)(void) = (void (*)(void))Parameter;
+ func();
+ return TRUE;
+}
+static void loader_platform_thread_once_fn(void *ctl, void (*func)(void)) {
+ assert(func != NULL);
+ assert(ctl != NULL);
+ InitOnceExecuteOnce((PINIT_ONCE)ctl, InitFuncWrapper, (void *)func, NULL);
+}
+#endif
// Thread IDs:
typedef DWORD loader_platform_thread_id;
diff --git a/thirdparty/vulkan/patches/Vulkan-Loader-revert-pr260.patch b/thirdparty/vulkan/patches/Vulkan-Loader-revert-pr260.patch
new file mode 100644
index 0000000000..1267e560df
--- /dev/null
+++ b/thirdparty/vulkan/patches/Vulkan-Loader-revert-pr260.patch
@@ -0,0 +1,57 @@
+diff --git a/thirdparty/vulkan/loader/loader.c b/thirdparty/vulkan/loader/loader.c
+index 87d08d5116..c7cdb47122 100644
+--- a/thirdparty/vulkan/loader/loader.c
++++ b/thirdparty/vulkan/loader/loader.c
+@@ -7330,7 +7330,7 @@ out:
+ return result;
+ }
+
+-#if defined(_WIN32)
++#if defined(_WIN32) && defined(LOADER_DYNAMIC_LIB)
+ BOOL WINAPI DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) {
+ switch (reason) {
+ case DLL_PROCESS_ATTACH:
+diff --git a/thirdparty/vulkan/loader/loader.h b/thirdparty/vulkan/loader/loader.h
+index 5e9495521b..56745a968d 100644
+--- a/thirdparty/vulkan/loader/loader.h
++++ b/thirdparty/vulkan/loader/loader.h
+@@ -420,6 +420,9 @@ static inline void loader_init_dispatch(void *obj, const void *data) {
+ // Global variables used across files
+ extern struct loader_struct loader;
+ extern THREAD_LOCAL_DECL struct loader_instance *tls_instance;
++#if defined(_WIN32) && !defined(LOADER_DYNAMIC_LIB)
++extern LOADER_PLATFORM_THREAD_ONCE_DEFINITION(once_init);
++#endif
+ extern loader_platform_thread_mutex loader_lock;
+ extern loader_platform_thread_mutex loader_json_lock;
+
+diff --git a/thirdparty/vulkan/loader/vk_loader_platform.h b/thirdparty/vulkan/loader/vk_loader_platform.h
+index 7824e35d6b..62e8e3ae09 100644
+--- a/thirdparty/vulkan/loader/vk_loader_platform.h
++++ b/thirdparty/vulkan/loader/vk_loader_platform.h
+@@ -330,9 +330,25 @@ typedef HANDLE loader_platform_thread;
+ // The once init functionality is not used when building a DLL on Windows. This is because there is no way to clean up the
+ // resources allocated by anything allocated by once init. This isn't a problem for static libraries, but it is for dynamic
+ // ones. When building a DLL, we use DllMain() instead to allow properly cleaning up resources.
++#if defined(LOADER_DYNAMIC_LIB)
+ #define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var)
+ #define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var)
+ #define LOADER_PLATFORM_THREAD_ONCE(ctl, func)
++#else
++#define LOADER_PLATFORM_THREAD_ONCE_DECLARATION(var) INIT_ONCE var = INIT_ONCE_STATIC_INIT;
++#define LOADER_PLATFORM_THREAD_ONCE_DEFINITION(var) INIT_ONCE var;
++#define LOADER_PLATFORM_THREAD_ONCE(ctl, func) loader_platform_thread_once_fn(ctl, func)
++static BOOL CALLBACK InitFuncWrapper(PINIT_ONCE InitOnce, PVOID Parameter, PVOID *Context) {
++ void (*func)(void) = (void (*)(void))Parameter;
++ func();
++ return TRUE;
++}
++static void loader_platform_thread_once_fn(void *ctl, void (*func)(void)) {
++ assert(func != NULL);
++ assert(ctl != NULL);
++ InitOnceExecuteOnce((PINIT_ONCE)ctl, InitFuncWrapper, (void *)func, NULL);
++}
++#endif
+
+ // Thread IDs:
+ typedef DWORD loader_platform_thread_id;