| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This reverts commit a0c17446add3a35f4b402e7c855301e5bf36cf47.
|
|
|
|
|
|
|
| |
Performs a single allocation, only when any instances are found, and
avoids concatenations and other unnecessary conversions.
(cherry picked from commit cbaec62b0335bc70c7cf7d55651678591bafafd2)
|
|\ |
|
| |\
| | |
| | |
| | | |
[4.3] Fix deadlocks related to ClassDB queries about global classes
|
| | |
| | |
| | |
| | |
| | |
| | | |
`ClassDB::can_instantiate()` and other reflection methods deadlock if the type is an script global class, when such script indirectly uses a not-yet-registered class. The reason is the `ClassDB` read lock is still held when invoking the `ResourceLoader` to load the class script, which may in turn need to lock for writing (for the class registration).
In particular, this happens with some types related to animation tree, that aren't registered at engine startup, but can happen with others, especially ones from the user. Registration statements are also added for the animation-related types that were lacking them.
|
| |\ \
| | |/
| |/|
| | | |
[4.3] Cherry-picks related to `ResourceLoader`
|
| | |
| | |
| | |
| | |
| | |
| | | |
Co-authored-by: Summersay415 <summersay415@gmail.com>
(cherry picked from commit fe21913ee82c9e3fd660b511f618fce40cf43e49)
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is a complement to: https://github.com/godotengine/godot/pull/96593
(cherry picked from commit 97197ff5e9c73ffbb2e3822d40a63bc3f8c47373)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit ccd470d33c49e28d5be3ca258da4f2ce950949db)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 0f3ee922e07fd4d16d9ef6dac150beb9c84ac527)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit c450f4d667e9f2462cb506cd3a32ca882c49ba68)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit bfb5570c033b633c030cc269d5e98213dfebd5a5)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 0441c67de67b3c84d57e8ade5f3a0fee70959338)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 9cbc3f14198c30c14315cabf72b0e3e3438b2f61)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 31a9e10ddb37f7b5c8697c24ba02ce7bd7a1305a)
|
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes a rare but possible deadlock, maybe due to undefined behavior. The new implementation is safer, at the cost of some added boilerplate.
(cherry picked from commit f4d76853b9d921e3645295f9bebc39eb73661e67)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. Make handling of user tokens atomic:
Loads started with the external-facing API used to perform a two-step setup of the user token. Between both, the mutex was unlocked without its reference count having been increased. A non-user-initiated load could therefore destroy the load task when it unreferenced the token.
Those stages now happen atomically so in the one hand, the described race condition can't happen so the load task life insurance doesn't have a gap anymore and, on the other hand, the ugliness that the call to load could return `ERR_BUSY` if happening while other thread was between both steps is gone.
The code has been refactored so the user token concerns are still outside the inner load start function, which is agnostic to that for a cleaner implementation.
2. Clear ambiguity between load operations running on `WorkerThreadPool`:
The two cases are: single-loaded thread directly started by a user pool task and a load started by the system as part of a multi-threaded load.
Since ensuring all the code dealing with this distinction would make it very complex, and error-prone, a different measure is applied instead: just take one of the cases out of the dicotomy. We now ensure every load happening on a pool thread has been initiated by the system.
The way of achieving that is that a single-threaded user-started load initiated from a pool thread, is run as another task.
(cherry picked from commit df23858488098086da20c67d9fc62f7ffb3d528c)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 5c970db2e49af93139d15d3fe090db44b4bd3317)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Benefits:
- Simpler code. The main load function is renamed so it's apparent that it's not just a thread entry point anymore.
- Cache and thread modes of the original task are honored. A beautiful consequence of this is that, unlike formerly, re-issued loads can use the resource cache, which makes this mechanism much more performant.
- The newly added getter for caller task id in WorkerThreadPool allows to remove the custom tracking of that in ResourceLoader.
- The check to replace a cached resource and the replacement itself happen atomically. That fixes deadlock prevention leading to multiple resource instances of the same one on disk. As a side effect, it also makes the regular check for replace load mode more robust.
(cherry picked from commit 28619e26cf35227c3ddab35878e1045f82895657)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit bd0959ebdd8819321f9b24880d05b43eb2aaa4cc)
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 2ff6594928f0d6004ca76359af8e31c504b0bd57)
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 41c07856361d7cf2bcbda6d84386b1a0d3969f6a.
(cherry picked from commit e9407d48772e9ed1382f6ccd5a73e6d12465ab2f)
|
| | | |
|
| | |
| | |
| | |
| | | |
(cherry picked from commit 3bfadeff25c5d86a65a17ee172465e626c9741ba)
|
|\ \ \
| | | |
| | | | |
[4.3] Fix copyright headers referring to Godot
|
| | | | |
|
|/ / /
| | |
| | |
| | | |
(cherry picked from commit 5fb6d30604b392776265052c621eef0470d8fadb)
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Relates to godotengine/godot#68878, specially when using orthographic projection.
Also adds some tests.
Adapted from godotengine/godot#95303
(cherry picked from commit 07730283d334280e2b4e2bede4902a796eabb4c2)
|
| | |
| | |
| | |
| | |
| | | |
Add status_version to version.py
Update Engine.xml example for get_godot_compatible_version_info
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084)
Credits:
Co-authored-by: Skogi <skogi.b@gmail.com>
Co-authored-by: Spartan322 <Megacake1234@gmail.com>
Co-authored-by: swashberry <swashdev@pm.me>
Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com>
Co-authored-by: radenthefolf <radenthefolf@gmail.com>
Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com>
Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com>
Co-authored-by: decryptedchaos <nixgod@gmail.com>
Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com>
Co-authored-by: Mister Puma <MisterPuma80@gmail.com>
Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com>
Co-authored-by: SingleError <isaaconeoneone@gmail.com>
Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
|
|/ / |
|
| |
| |
| |
| | |
(cherry picked from commit 5dade0e08b6647cf4b836402a797e9b8f46052b1)
|
| |
| |
| |
| |
| | |
Co-authored-by: lawnjelly <lawnjelly@gmail.com>
(cherry picked from commit 10e2318bdeccdc33f95ebdb2c7683b816dda67fb)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #81758
DisplayServerWeb::process_joypads handles buttons 6 and 7 of the
HTML5 Standard Gamepad as a special case by doing:
`input->joy_axis(idx, (JoyAxis)b, s_btns[b]);`
This doesn't work because there is no JoyAxis 6 or 7 in the enum
To fix this we use JoyAxis::TRIGGER_LEFT and TRIGGER_RIGHT for button 6
and 7
However since we are now lying to input->joy_axis we also need to lie in
the mappings for the standard gamepad in godotcontrollersdb.txt,
otherwise input->joy_axis will try to find a mapping to axis 4(LT) and
axis 5(RT) that's not defined.
Therefore we set lefttrigger to +a4 and righttrigger to +a5 in the
mapping, to match what we are actually sending.
A cleaner, and more involved fix to this would be modifying
input->joy_button so that it can handle analog buttons and map them to
axes preserving their value instead of converting to boolean
(cherry picked from commit 9dd372f3164f3daf01c02d1f4ba304ffde47f394)
|
| |
| |
| |
| | |
(cherry picked from commit ee9cea521d97088eb368cb1820db71100da9837b)
|
| |
| |
| |
| |
| |
| | |
Fixes #96159
(cherry picked from commit fcc8518bce17a72041de43efdeb64c9064bd0256)
|
| |
| |
| |
| | |
(cherry picked from commit 6b13236956bcf38fdeff460fc8e49acdd7af3d6e)
|
| |
| |
| |
| | |
(cherry picked from commit ab13513403f085ead06fa1a0ddb2b1e60fe3fe02)
|
| |
| |
| |
| | |
(cherry picked from commit d65ea6fb9cc26359bb6f2aa704b2a6b7604c3fd3)
|
| |
| |
| |
| | |
(cherry picked from commit 32b7f835d8fd7466c58ed84a20c46ba9c802e36b)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before this change StringName used regular static field
definitions for its mutex, _table, configured and debug_stringname
fields.
Since in the general case the ordering of the static variable and field
initialization and destruction is undefined, it was possible that
the destruction of StringName's static fields happened prior to
the destruction of statically allocated StringName instances.
By changing the static field definitions to inline in string_name.h,
the C++17 standard guarantees the correct initialization and destruction
ordering.
(cherry picked from commit 723878bbabfa7f47049e29b1c46c92358517d8d1)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.
This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.
This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.
(cherry picked from commit f44d6a235f198e3f8c5189161840315f43cfdd2e)
|
| |
| |
| |
| | |
(cherry picked from commit f483c3aafa5f3cfb1ab763ab4eb077aac74e88d6)
|
|/
|
|
|
|
| |
level module init.
(cherry picked from commit 69d52ed081ac636a0ac696984c304c5284c902a7)
|
| |
|
| |
|
| |
|
| |
|