Commit Graph

7537 Commits

Author SHA1 Message Date
BlueCube3310 0ed45629fd Support 64-bit image sizes for VRAM compression 2024-07-21 21:06:14 +02:00
Hugo Locurcio 0445ccf428
Fix Image CowData crash when baking large lightmaps
This switches to 64-bit integers in select locations of the Image
class, so that image resolutions of 16384×16384 (used by
lightmap texture arrays) can be used properly. Values that are larger
should also work.

VRAM compression is also supported, although most VRAM-compressed
formats are limited to individual slices of 16384×16384. WebP
is limited to 16383×16383 due to format limitations.
2024-07-19 16:04:30 +02:00
Rémi Verschelde 293c0f7646
Merge pull request #94526 from RandomShaper/wtp_rl_prize_prequel
Batch of fixes for WorkerThreadPool and ResourceLoader (safe set)
2024-07-19 11:11:03 +02:00
Pedro J. Estébanez 28a7a95531 ResourceLoader: Fix sync issues with error reporting
This is about not letting the resource format loader set the error code directly on the task anymore. Instead, it's stored locally and assigned only when it is right to do so.

Otherwise, other tasks may see an error code in the current one before it's state having transitioned to errored. While this, besides the technically true data race, may not be a problem in practice, it causes surprising situations during debugging as it breaks assumptions.
2024-07-19 10:00:41 +02:00
Fabio Alessandrelli 31454423ba [Core] Fix TypedArray encoding when full objects is disabled 2024-07-18 09:58:17 +02:00
Rémi Verschelde 0918fd2a21
Merge pull request #94452 from jamie-pate/fix_73374
Fix game window stops responding when debugger pauses
2024-07-17 15:45:14 +02:00
Rémi Verschelde 31f696cf03
Merge pull request #94373 from maiself/fix-library-path-as-abs
Fix to restore `library_path` as absolute path
2024-07-17 12:24:07 +02:00
Rémi Verschelde 59737bf3f0
Merge pull request #94413 from rburing/fix_action_press_tick
Fix physics tick count in `Input.action_press` and `Input.action_release`
2024-07-17 11:44:31 +02:00
Rémi Verschelde 1d13e95e06
Merge pull request #94307 from Bromeon/feature/bitfield-unsigned-docs
GDExtension docs: Advise bindings to use `uint64_t` for bitfields
2024-07-17 11:43:54 +02:00
Rémi Verschelde ab67408390
Merge pull request #94238 from RandomShaper/ref_is_now_rc
Make errors on `RefCounted.free()` more accurate
2024-07-17 11:43:32 +02:00
Rémi Verschelde 496fd12b17
Merge pull request #94052 from m4gr3d/clean_input_dispatch_settings
Cleanup Android input on render thread settings
2024-07-17 11:42:52 +02:00
Alvin Wong 4091abd727 Respect integrated GPU preference in Windows Settings 2024-07-16 23:46:37 +08:00
Pedro J. Estébanez 5b5cdf2414 Fixup recent changes to threading concerns
ResourceLoader:
- Fix invalid tokens being returned.
- Remove no longer written `ThreadLoadTask::dependent_path` and the code reading from it.
- Clear deadlock hazard by keeping the mutex unlocked during userland polling.

WorkerThreadPool:
- Include thread call queue override in the thread state reset set, which allows to simplify the code that handled that (imperfectly) in the ResourceLoader.
- Handle the mutex type correctly on entering an allowance zone.

CommandQueueMT:
- Handle the additional possibility of command buffer reallocation that mutex unlock allowance introduces.
2024-07-16 11:03:02 +02:00
Ricardo Buring b41ec93d63 Fix physics tick count in Input.action_press and Input.action_release
The physics tick count was not yet updated there.
2024-07-16 00:31:44 +02:00
Jan Haller b2a9ea6d22 GDExtension docs: advise bindings to use uint64_t for bitfields 2024-07-15 22:37:33 +02:00
aaronp64 c1afe7dcdf Improve CowData::insert performance
Update CowData::insert to call ptrw() before loop, to avoid calling _copy_on_write for each item in the array, as well as repeated index checks in set and get.  For larger Vectors/Arrays, this makes inserts around 10x faster for ints, 3x faster for Strings, and 2x faster for Variants.  Less of an impact on smaller Vectors/Arrays, as a larger percentage of the time is spent allocating.
2024-07-15 14:01:19 -04:00
Pedro J. Estébanez 10b543f8a7 WorkerThreadPool: Fix wrong sync logic breaking task map integrity 2024-07-15 12:15:25 +02:00
Pedro J. Estébanez 62d9ce6445 Re-add resource thread-safety measures
These deferring measures were added to aid threaded resource loading in being safe.

They were removed as seemingly unneeded, but it seems they are needed so resources involved in threaded loading interact with others only after "sync points".
2024-07-15 12:15:22 +02:00
Pedro J. Estébanez 76bfe8e0fd Make errors on RefCounted.free() more accurate 2024-07-15 08:51:42 +02:00
Mai Lavelle 16eea2c837
Fix to restore `library_path` as absolute path 2024-07-14 20:37:38 -04:00
Rémi Verschelde fe5d567917
Merge pull request #93942 from MikeSchulze/73525
Fix GDScript analyzer error when instantiating EditorPlugins.
2024-07-11 09:41:09 +02:00
Rémi Verschelde 34d4c9197d
Merge pull request #94133 from akien-mga/fix-gcc14-Wmaybe-uninitialized
Fix a couple GCC 14 `-Wmaybe-uninitialized` warnings
2024-07-11 00:27:32 +02:00
Jamie Pate b18e1e0dcd Fix Game window stops responding when debugger pauses
Fixes #73374

As of godot 4 On windows/osx the game window will be frozen and will not
be updated.

In the debugger loop it calls

OS::get_singleton()->process_and_drop_events();
which allows windows/osx to handle system events. If the window doesn't
handle these events then both systems will judge the window to be 'not
responding' (osx beachball cursor)

When the event processing code was migrated from OS to DisplayServer the
process_and_drop_events() logic was moved to DisplayServer, but the call
inside the remote debugger pause loop was not updated to call the
DisplayServer version, there are currently no implementations of
OS::process_and_drop_events() so i removed it and switched to the new
DisplayServer::force_process_and_drop_events() method.
2024-07-10 13:38:57 -07:00
baptr 810fcc7431 Fix gdscript analyzer error when instantiating EditorPlugins.
Editor code is not instantiable outside of the editor
(1d14c054a1/core/object/class_db.cpp (L369)).
This is fine for editor plugins and the like, but the GDScript analyzer
balks at it, causing F5 runs to fail: #73525.

Instead, we really just want to know if the type is abstract - so add
a new ClassDB method to check that and nothing else.

Update core/object/class_db.cpp

Apply code review comments

Co-Authored-By: Bryce <1522777+baptr@users.noreply.github.com>
2024-07-10 10:24:57 +02:00
Fredia Huya-Kouadio 5e59819727 Cleanup Android input on render thread settings
Follow up to https://github.com/godotengine/godot/pull/93933
Clean up the set of settings use to control whether Android input should be dispatched on the render thread.

Addresses comments in https://github.com/godotengine/godot/pull/93933#issuecomment-2210437977
2024-07-09 09:15:18 -07:00
Rémi Verschelde 247a481001
Fix a couple GCC 14 `-Wmaybe-uninitialized` warnings 2024-07-09 16:12:22 +02:00
Danil Alexeev 110c4d4067
GDScript: Fix "Mismatched external parser" for autoloads 2024-07-09 16:16:45 +03:00
Rémi Verschelde daba91d8c6
Merge pull request #93897 from akien-mga/vformat-better-error-message
Core: Improve `vformat` error reporting on `sprintf` failure
2024-07-09 00:03:17 +02:00
Rémi Verschelde 8ed9bfdc25
Merge pull request #94089 from dsnopek/gdext-valid-runtime-properties
GDExtension: Fix setting base class properties on a runtime class
2024-07-08 23:53:12 +02:00
David Snopek 91fcdff01e GDExtension: Fix setting base class properties on a runtime class 2024-07-08 12:33:55 -05:00
Rémi Verschelde 3ced38cf28
Merge pull request #94073 from mihe/macos-home-end
Add Home/End to text caret movements on macOS
2024-07-08 19:13:39 +02:00
Mikael Hermansson 085f0cc50a Add Home/End to text caret movements on macOS 2024-07-08 16:08:27 +02:00
Pedro J. Estébanez a426479b3f ResourceLoader: Fix error message due to already-awaited tasks being re-awaited 2024-07-08 12:19:44 +02:00
Danil Alexeev 151f34bb80
Core: Remove unused method `_is_gpl_reversed()` 2024-07-08 12:31:09 +03:00
Pedro J. Estébanez f952d3956c ResourceLoader: Fixup management of thread-specific status
- Allows the message queue override to flush after loading each resource, which was the original intent.
- Removes a redundant call to mark the thread as safe-for-nodes.
2024-07-08 10:30:25 +02:00
Ricardo Buring 2f8ab4a654 Fixed Timestep Interpolation (3D)
Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 22:15:23 +02:00
Ricardo Buring 23521635d2 Fix physics tick counter
The counter is now incremented at the start of a physics tick rather than at the end.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 19:04:05 +02:00
Rémi Verschelde 438382cdc2
Merge pull request #94006 from alvinhochun/log-file-utf8-fix
Fix UTF-8 misintepreted as Latin-1 when logging to file
2024-07-07 12:38:54 +02:00
Rémi Verschelde 5bc5ea898c
Merge pull request #93993 from Chaosus/astargrid2d_update_fix
Add a check to prevent user to call `AStarGrid2D::update` when its not needed
2024-07-07 12:38:44 +02:00
Rémi Verschelde 7197678df2
Merge pull request #91551 from m4rr5/configure_timestamp_query_elements
Add a project setting to configure the maximum number of timestamps.
2024-07-07 12:38:19 +02:00
Alvin Wong 5b3857e5f1 Fix UTF-8 misintepreted as Latin-1 when logging to file 2024-07-07 02:46:41 +08:00
Yuri Rubinsky 453c8753a9 Add a check to prevent user to call `AStarGrid2D::update` when its not needed 2024-07-06 14:59:38 +03:00
Rémi Verschelde 496b7b8482
Core: Improve vformat error reporting on sprintf failure
And fix a few occurrences of formatting errors that led me to this.
2024-07-04 10:54:55 +02:00
Togira ab13513403 Fix RandomPCG::rand_weighted incorrectly returning -1 2024-07-04 02:00:59 +02:00
rune-scape c8b697c64c Remove unused `initialize_ref` 2024-07-03 13:32:50 -07:00
Haoyu Qiu ee9cea521d Fix parsing of `4.` in Expression 2024-07-02 20:53:52 +08:00
lawnjelly 0ed71f3e0c Physics Interpolation - Fix `interpolated_transform_2d`
Uses the skew correct `Transform2D::interpolate_with()` function rather than the bugged 3.x version.
2024-07-02 08:10:55 +01:00
Rémi Verschelde 152d7c1bba
Revert "Make freed object different than null in comparison operators"
This reverts commit 150b50cfcd.

As discussed with the GDScript team, this has some implications which aren't
fully consensual yet, and which we want to revisit.

For now we revert to the 4.2 behavior for the 4.3 release, to avoid breaking
user expectations.
2024-07-01 14:11:43 +02:00
Pedro J. Estébanez f2f9a6b8a1 WorkerThreadPool: Fix wrong pointer used in the case of BinaryMutex 2024-06-28 19:46:55 +02:00
Rémi Verschelde e052a53bb6
Merge pull request #93695 from RandomShaper/res_load_main_th
`ResourceLoader`: Support polling and get-before-complete on the main thread
2024-06-28 14:43:01 +02:00
Rémi Verschelde 6f8b90e412
Merge pull request #93032 from RandomShaper/wtp_antilock
GDScript: Avoid deadlock possibility in multi-threaded load
2024-06-28 14:42:48 +02:00
Pedro J. Estébanez ec61c5064c ResourceLoader: Support polling and get-before-complete on the main thread 2024-06-28 11:25:10 +02:00
Rémi Verschelde 6cdd303c68
Merge pull request #93564 from Calinou/project-user-dir-prevent-trailing-periods
Prevent folder names with trailing periods from being used automatically
2024-06-26 18:15:19 +02:00
Rémi Verschelde 0364443d12
Merge pull request #93346 from RandomShaper/gds_cyc_alt
GDScript: Enhance handling of cyclic dependencies
2024-06-26 18:15:16 +02:00
Rémi Verschelde 3d8562d775
Merge pull request #89197 from AThousandShips/arr_typed_fix
[Core] Fix sharing of typed arrays from constructor
2024-06-26 18:15:09 +02:00
Pedro J. Estébanez c1391489e3 GDScript: Enhance handling of cyclic dependencies 2024-06-26 17:44:32 +02:00
Hugo Locurcio 492787b134
Prevent folder names with trailing periods from being used automatically
Folder names ending with one or more `.` characters are not allowed
on Windows, so this would break writing logs, shader cache and other
project-specific files. Trailing periods are now stripped in this case.

On non-Windows platforms, this change still applies in the interest
of portability.
2024-06-26 17:42:47 +02:00
Ibrahn Sahir 607c5ec49f Move MIDI parsing up from ALSA driver to platform independent driver.
Aims for more consistent MIDI support across Windows, MacOS, Linux and
to provide a base for adding MIDI drivers for other platforms.
Reworks the MIDIDriverALSAMidi MIDI parsing implementation as a platform
independent version in MIDIDriver::Parser.
Uses MIDIDriver::Parser to provide running status support in MacOS
MIDIDriverCoreMidi.
Collects connected input names at open, ensuring devices indices reported
in events match names in array returned from get_connected_inputs.

Fixes #77035.
Fixes #79811.

With code review changes by: A Thousand Ships (she/her)
<96648715+AThousandShips@users.noreply.github.com>
2024-06-25 16:46:30 +01:00
Rémi Verschelde 6b281c0c07
Merge pull request #93563 from mihe/nothreads-feature
Add `nothreads` feature tag to signify lack of `THREADS_ENABLED`
2024-06-25 10:08:33 +02:00
Rémi Verschelde b9038501db
Merge pull request #90582 from Repiteo/core/remove-macro-_NO_DISCARD_
Core: Replace `_NO_DISCARD_` macro with `[[nodiscard]]`
2024-06-25 10:01:39 +02:00
Mikael Hermansson 53d3d66f9f Add `nothreads` feature tag to signify lack of `THREADS_ENABLED` 2024-06-24 19:52:21 +02:00
Rémi Verschelde f11e8d033d
Remove editor pseudolocalization debug feature
We've seen multiple users enable it by mistake and get utterly confused,
reporting as a bug that the interface text is garbled.

On the other hand we haven't really seen much use of the feature by editor
UI developers, so we can likely simply remove it.

If there's a need eventually, we can re-add it as a command line option
(which is also better than an editor setting as one would typically want
to toggle it during development).
2024-06-24 17:08:26 +02:00
Rémi Verschelde e78dc83ee8
Merge pull request #93540 from RandomShaper/res_load_uncached
`ResourceLoader`: Fix handling of uncached loads
2024-06-24 13:20:24 +02:00
Pedro J. Estébanez 884d1da938 ResourceLoader: Fix handling of uncached loads
- `CACHE_MODE_IGNORE_DEEP` is checked in addition to `CACHE_MODE_IGNORE` to determine if a load is uncached. This avoids crashes in uncached loads due to prematurely freed load tasks.
- Cached load tasks are isolated (not registered in the task map ever). This avoids regular loads from reusing in-flight cached loads, which is not correct.
2024-06-24 11:25:57 +02:00
Raul Santos 175e5bcf4e
Lookup method also in base scripts of a PlaceHolderScriptInstance 2024-06-22 08:11:48 +02:00
Rémi Verschelde c53a4a7f64
Merge pull request #90069 from KoBeWi/file_suicide_prevention_measures
Don't allow copying file into its own path
2024-06-21 16:49:26 +02:00
Rémi Verschelde 74f9f12c71
Merge pull request #92320 from Hilderin/fix-importing-assets-with-csv
Fix reimporting assets with csv in the project
2024-06-21 13:54:35 +02:00
Pedro J. Estébanez 03d14e436b WorkerThreadPool: Refactor deadlock prevention collaboration into a generic mechanism
This is strictly beyond a refactor because it also changes when the mutexes are relocked,
but that's only for extra safety.
2024-06-19 14:01:54 +02:00
Rémi Verschelde 19bf77f666
Merge pull request #91382 from adamscott/sample-player
Add sample playback support
2024-06-19 07:59:07 +02:00
bruvzg dd883bebd4
Improve PR plural translation rules handling. 2024-06-18 19:04:00 +03:00
Rémi Verschelde 0a83e7c5da
Merge pull request #93288 from rune-scape/gdextension-const-stringname-weird
Object: Use const correct `GDExtensionConstStringNamePtr`
2024-06-18 17:59:25 +02:00
Rémi Verschelde a492b32ed0
Merge pull request #93281 from TitanNano/jovan/fix_get_frame_data
Make `profiling_get_frame_data` call the correct GDVIRTUAL method
2024-06-18 17:59:22 +02:00
Adam Scott 52fa4f05f3
Add samples playback support 2024-06-18 11:06:31 -04:00
Rémi Verschelde 470cc59706
Merge pull request #93293 from rune-scape/cleanup-order
Fix cleanup order in `unregister_core_types()`
2024-06-18 14:09:04 +02:00
rune-scape 818fb63f03 fixed cleanup order in `unregister_core_types()` 2024-06-18 00:44:01 -07:00
rune-scape ca916a536a Object: use correct GDExtensionConstStringNamePtr 2024-06-17 19:06:40 -07:00
Jovan Gerodetti 21586da50e Make profiling_get_frame_data call the correct GDVIRTUAL method. 2024-06-18 00:53:25 +02:00
Fabio Alessandrelli ae7045f67e [Crypto] Expose OS.get_entropy 2024-06-17 12:02:37 +02:00
Rémi Verschelde c3336aa110
Merge pull request #93178 from Faless/crypto/expose_tls_options_getters
[Crypto] Expose TLSOptions getters
2024-06-17 10:58:51 +02:00
Fabio Alessandrelli 3639c1f0ca [Crypto] Expose TLSOptions getters 2024-06-14 22:33:10 +02:00
Fabio Alessandrelli 33d0e1c50c [Crypto] Expose get_system_ca_certificates. 2024-06-14 22:27:03 +02:00
Rémi Verschelde 087ef4b942
Merge pull request #93124 from RandomShaper/skull_trio
`ResourceLoader`: Let the caller thread use its own message queue override
2024-06-14 17:13:38 +02:00
Rémi Verschelde 75eb8ad510
Merge pull request #93091 from RandomShaper/remove_false_safety
Remove no longer needed thread safety measures
2024-06-14 17:13:31 +02:00
Rémi Verschelde 08a21fda8d
Merge pull request #93082 from RandomShaper/fix_err_deadlock
ResourceLoader: Avoid deadlock when awaiting a loader thread that failed early
2024-06-14 17:13:28 +02:00
Pedro J. Estébanez cc6f5d1a7a ResourceLoader: Let the caller thread use its own message queue override 2024-06-13 10:31:11 +02:00
Pedro J. Estébanez 21c03d1956 WorkerThreadPool: Fix thread message queue not restored after overridden in a task
Also, simplifies the thread override teardown in MessageQueue.
2024-06-13 10:31:08 +02:00
bruvzg e651421905
[TextServer, GDExtension] Fix building text servers as GDExtension, expose new/changed low-level methods to GDExtension API. 2024-06-12 19:30:19 +03:00
Pedro J. Estébanez b6994a414d Remove no longer needed thread safety measures
This is basically a revertion of commit 84b85d894c.
2024-06-12 18:10:11 +02:00
Pedro J. Estébanez bdcceef0e2 ResourceLoader: Avoid deadlock when awaiting a loader thread that failed early 2024-06-12 13:49:37 +02:00
Rémi Verschelde 5bab95a556
Merge pull request #92827 from raulsntos/core/node-to_string
Use GDExtension `to_string` in Node
2024-06-12 10:00:29 +02:00
Hilderin f1099ab943 Fix reimporting assets with csv in the project 2024-06-11 17:04:15 -04:00
Raul Santos 29bf60cc02
Use GDExtension `to_string` in Node
Matches the `Object::to_string` implementation.
2024-06-11 17:40:51 +02:00
Rémi Verschelde 4629845ead
Merge pull request #92718 from jsjtxietian/importer-duplicate
Fix same importer will be added multiple times in `get_importers_for_extension`
2024-06-11 11:51:06 +02:00
Rémi Verschelde e4fa8543ea
Revert "Fix FileSystem dock won't show any file folders"
This reverts commit 72856d633a.

Fixes #93022.
2024-06-11 11:46:35 +02:00
Rémi Verschelde 94929439b6
Revert "Fix method name for custom callable"
This reverts commit e88095ed8f.

Fixes #92695.
2024-06-11 11:02:03 +02:00
Rémi Verschelde 0a9f2d2262
Merge pull request #92650 from Hilderin/fix-fileSystem-dock-wont-show-any-file-folders
Fix FileSystem dock won't show any file folders
2024-06-11 10:48:46 +02:00
Hilderin 72856d633a Fix FileSystem dock won't show any file folders 2024-06-10 19:54:37 -04:00
Chris Cranford 8577340501 Expose several EngineDebugger methods and signals as plugin callbacks 2024-06-10 19:46:23 -04:00
Silc Lizard (Tokage) Renew 12571a1e95 Match the coding style for concatenating String 2024-06-09 18:35:23 +09:00
bruvzg d8e1ab085a
[Windows] Fix 32-bit MinGW LTO build. 2024-06-04 13:46:03 +03:00
Rémi Verschelde 7b63ac488e
Merge pull request #92722 from rune-scape/fix-callable-crash
Fix callable not clearing freed pointer
2024-06-04 10:16:14 +02:00
jsjtxietian 7552d242a3 Fix same importer will be added multiple times in `get_importers_for_extension` 2024-06-03 17:28:46 +08:00
Rémi Verschelde ef886b0a41
Merge pull request #92426 from RandomShaper/fix_ed_toast_mt
Avoid editor error reporting using resource loader thread's call queues
2024-06-03 11:20:50 +02:00
Rémi Verschelde 41e762ca29
Merge pull request #91454 from akien-mga/coverity-checks
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
2024-06-03 10:35:38 +02:00
rune-scape 4463e7dee9 fix callable not clearing freed pointer 2024-06-02 21:22:16 -07:00
Thaddeus Crews 05203b6a43
SCons: Fix `mono` dependency 2024-06-01 16:37:54 -05:00
Rémi Verschelde 62120c7841
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
- Fixes #88630.
- Fixes #92578.
2024-05-31 09:55:02 +02:00
Pedro J. Estébanez f61c63e3a1 Avoid editor error reporting using resource loader thread's call queues 2024-05-31 09:42:37 +02:00
Rémi Verschelde be2c5e66f4
Merge pull request #92201 from bruvzg/input_flush
Clean `Input::frame_parsed_events` before de-initialising scripting languages to ensure no script created events exist at the exit.
2024-05-30 15:41:56 +02:00
kobewi 17d3f26e5d Add event_index to InputEventAction 2024-05-30 12:51:15 +02:00
bruvzg 2c9df769ad
Clean Input::frame_parsed_events before de-initialising scripting languages to ensure no script created events exist at the exit. 2024-05-30 13:23:00 +03:00
Rémi Verschelde 9d4a736d0c
Merge pull request #91502 from lyuma/gdextension_open_library_compat
Bind compatibility GDExtension methods removed in #88418
2024-05-30 11:47:43 +02:00
Chris Cranford f76b7ed5fc Expose `get_cached_ref` from `ResourceCache` 2024-05-29 18:43:56 -04:00
clayjohn 3b9d074fd7 Ensure MovieWriter output is in gamma space when using HDR 2D 2024-05-28 15:30:13 -07:00
Rémi Verschelde b8f3c5e2ab
Merge pull request #92427 from AThousandShips/bind_go_away
Replace `.bind(...).call_deferred()` with `.call_deferred(...)`
2024-05-28 15:50:01 +02:00
Rémi Verschelde 4808f24312
Merge pull request #92350 from 4d49/undo-redo-fix-callable-name
Fix `UndoRedo` method name for custom `Callable`
2024-05-28 15:49:26 +02:00
A Thousand Ships 4ed62665a2
Replace `.bind(...).call_deferred()` with `.call_deferred(...)` 2024-05-27 13:29:57 +02:00
Mansur Isaev e88095ed8f Fix method name for custom callable 2024-05-25 10:23:10 +04:00
Mikael Hermansson e312f147aa Fix `ClassDB` not checking for `API_EDITOR_EXTENSION` 2024-05-25 00:23:12 +02:00
BlueCube3310 d260a2ba74 Optimize half and float image conversion 2024-05-24 11:01:20 +02:00
Danil Alexeev 49594d8c41
Optimize `Color::find_named_color()` 2024-05-23 15:19:19 +03:00
Rémi Verschelde c40c89f94c
Merge pull request #90457 from Chubercik/ruff-formatter
Replace `black` formatter with `ruff`
2024-05-22 09:26:42 +02:00
Jakub Marcowski d9f8ef68df
Update pre-commit hooks configuration to use `ruff` instead of `black` 2024-05-21 18:02:29 -05:00
David Snopek 62f9365b21 Don't use `ERR_PRINT_ONCE()` for runtime class error because it will hide errors 2024-05-21 13:55:56 -05:00
lawnjelly 331ecf3ca8 Clarify is_polygon_clockwise() coordinate system
The function assumes a normal Cartesian coordinate system.
2024-05-20 18:34:45 +01:00
Haoyu Qiu ed61d41697 Change param name of AStar's _estimate_cost method 2024-05-19 22:08:36 +08:00
Rémi Verschelde 944b95e1a5
Merge pull request #91897 from RandomShaper/res_unreg_if_true
Add an identity check to resource unregistration from cache
2024-05-16 09:32:03 +02:00
Rémi Verschelde e63b5ba9e4
Merge pull request #91416 from Calinou/d3d12-sdk-update-install-script
Update dependencies in D3D12 SDK installer script
2024-05-15 13:51:31 +02:00
Rémi Verschelde 527bf78486
Merge pull request #91955 from Repiteo/core/variant-class-initializer
Core: Readd Variant class initializer, fix comment
2024-05-15 12:10:03 +02:00
Thaddeus Crews 7599a7b719
Core: Readd Variant class initializer, fix comment 2024-05-14 12:20:40 -05:00
kobewi 59f05ed31a Cleanup unused/underused singleton StringNames 2024-05-14 18:18:29 +02:00
Rémi Verschelde bdefe53992
Merge pull request #91909 from KoBeWi/have_fun_reviewing_this
Use Core/Scene stringnames consistently
2024-05-14 12:07:03 +02:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde 5cb9a748d6
Merge pull request #91630 from RandomShaper/enh_mat_sh_update
Let materials' shaders update happen on loader threads
2024-05-13 17:32:11 +02:00
Rémi Verschelde 3585c2e8f9
Merge pull request #91870 from scgm0/fix_disabled_classes
SCons: Fix generation of `disabled_classes.gen.h` after #91624
2024-05-13 12:05:59 +02:00
Pedro J. Estébanez b70afac286 Add an identity check to resource unregistration from cache
This is needed because resources loaded with CACHE_MODE_IGNORE still have path_cache set.
2024-05-13 11:55:50 +02:00
scgm0 973d3a472d
SCons: Fix generation of `disabled_classes.gen.h` after #91624 2024-05-13 11:25:29 +02:00
Yuri Rubinsky db2e09e9cd Add a method to retrieve all points within a region to `AStarGrid2D` 2024-05-12 18:14:13 +03:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
Rémi Verschelde 5e28260a10
Merge pull request #91806 from dsnopek/gdextension-shutdown-crash
GDExtension: Prevent crash during shutdown as singletons are deleted
2024-05-11 12:38:30 +02:00
Rémi Verschelde 816f6170fa
Merge pull request #86755 from lawnjelly/aabb_intersect_fix
Fix AABB Ray intersection - return inside
2024-05-11 12:38:08 +02:00
David Snopek 14506a4282 GDExtension: Prevent crash during shutdown as singletons are deleted 2024-05-10 13:17:36 -05:00
Rémi Verschelde e6780b54bb
Merge pull request #91727 from RandomShaper/cmd_queue_prealloc
`CommandQueueMT`: Pre-allocate memory to avoid a bunch of allocations at startup
2024-05-10 09:55:57 +02:00
Rémi Verschelde 6fcdd24468
Merge pull request #91624 from Repiteo/scons/native-generation
SCons: Generate all scripts natively, implement wrapper function
2024-05-10 09:55:51 +02:00
lawnjelly b35264ad95 Fix AABB Ray intersection - return inside
* Separates find_intersects from test_intersects for rays, and wraps the former.
* Changes parameter name to "r_intersection_point".
* Fixes broken old version which returned per axis t.
* Returns whether the ray origin is within the AABB.
* Returns intersection point when origin outside.
* Returns "backtracking" intersection point when inside.
* Returns sensible normal when inside.
* Returns valid results on borders.
* Returns robust results dealing with floating point error.

Co-authored-by: Claire Blackshaw <evilkimau@gmail.com>
2024-05-09 20:41:19 +01:00
Pedro J. Estébanez c0529dc4f2 CommandQueueMT: Pre-allocate memory to avoid a bunch of allocations at startup 2024-05-09 11:51:07 +02:00
Rémi Verschelde c4279fe3e0
Merge pull request #91725 from RandomShaper/cmd_queue_avoid_skip
`CommandQueueMT`: Fix sync command awaiters missing the chance
2024-05-09 02:06:34 +02:00
Pedro J. Estébanez a4014a2f78 CommandQueueMT: Fix sync command awaiters missing the chance 2024-05-08 18:56:58 +02:00
Pedro J. Estébanez 1589433e8f Apply additional fixes to servers' threading 2024-05-08 17:41:40 +02:00
Pedro J. Estébanez 6f0760beb3 CommandQueueMT: Fix command cleanup (revive destructor call + plus handle buffer realloc) 2024-05-08 17:41:40 +02:00
Pedro J. Estébanez b834037841 Object: Add missing lock 2024-05-08 17:41:40 +02:00
Rémi Verschelde a9a1d0a162
Merge pull request #91619 from AThousandShips/find_improve
Replace `find` with `contains/has` where applicable
2024-05-08 14:35:44 +02:00
A Thousand Ships b4c6cc7d82
[Core] Add case-insensitive `String::containsn` 2024-05-08 12:48:01 +02:00
A Thousand Ships a0dbdcc3ab
Replace `find` with `contains/has` where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde 17a81260cb
Merge pull request #91684 from Chubercik/embree4_aftermath
Fix `builtin_embree=no` build linking the wrong version of Embree
2024-05-08 09:54:24 +02:00
Rémi Verschelde 63ed5749ac
Merge pull request #91104 from RandomShaper/simple_type_cpp
Redefine `GetSimpleTypeT<>` in terms of `<type_traits>`
2024-05-08 09:54:16 +02:00
Jakub Marcowski 7699d678c4
Fix `builtin_embree=no` build linking the wrong version of Embree 2024-05-08 00:40:45 +02:00
Thaddeus Crews 34fb3f7730
SCons: Generate all scripts natively 2024-05-07 15:30:45 -05:00
Hugo Locurcio 47ac22486d
Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +02:00
Wilson E. Alvarez d4154dbc55
Add const char * overloads to String class
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-05-07 10:53:00 -04:00
Lyuma 0e5e743258 Bind compatibility GDExtension methods removed in 88418
These functions were likely not used, but we must ensure they are still bound to ensure API stability.
2024-05-07 01:36:36 -07:00
Rémi Verschelde 4b070e8031
Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
A Thousand Ships 09460d33e6
[Core] Fix sharing of typed arrays from constructor 2024-05-07 09:52:17 +02:00
Rémi Verschelde a1905b8e7d
Merge pull request #91570 from Naros/preferred_file_name_casing_default
Add default implementation of `ScriptLanguageExtension::preferred_file_name_casing`
2024-05-07 09:04:48 +02:00
Rémi Verschelde e63252b421
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
2024-05-07 09:04:44 +02:00
Pedro J. Estébanez 187e5ef258 Let materials' shaders update happen on loader threads 2024-05-06 19:40:00 +02:00
A Thousand Ships 86de59d60a
[Core] Add `LocalVector::has` for convenience 2024-05-06 18:03:37 +02:00
Rémi Verschelde 1069d7b7c6
Merge pull request #88343 from Riteo/warped-mouse-float
Handle warped mouse motion as floating point
2024-05-06 15:14:46 +02:00
Marcel Offermans 2bb34a4489 Added a project setting to configure the maximum amount of timestamps, with a description and a reference to the setting when the limit is hit and an ERR_FAIL_COND is hit. 2024-05-05 09:09:04 +02:00
Chris Cranford fdc5b42646 Add default implementation of `ScriptLanguageExtension::preferred_file_name_casing`. 2024-05-04 18:50:04 -04:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Rémi Verschelde 03e6fbb010
Merge pull request #85474 from fire/packedvector4array
Add `PackedVector4Array` Variant type
2024-05-03 12:25:26 +02:00
Rémi Verschelde 25fe3d4b46
Merge pull request #81639 from MJacred/is_letter
Add `is_valid_letter()` to `TextServer`
2024-05-03 01:21:34 +02:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
MJacred 717513a62d Add is_valid_letter() to TextServer 2024-05-02 21:32:20 +02:00
Radiant 789c6ebdfd Implement `amplitude` to Input.vibrate_handheld
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: m4gr3d <m4gr3d@users.noreply.github.com>
2024-05-02 19:09:42 +03:00
Rémi Verschelde 28a18cf1b8
Merge pull request #88763 from BlueCube3310/image-is-compressed-static
Image: Add static `is_format_compressed` function.
2024-05-02 14:01:18 +02:00
A Thousand Ships 0f5e0d1637
Expose `Vector*` component-wise and scalar `min/max` to scripting 2024-05-02 13:02:40 +02:00
A Thousand Ships 308dbb8c63
[Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
A Thousand Ships c4e24d2b3b
[GDScript] Correctly report invalid read-only access 2024-05-01 12:28:47 +02:00
Rémi Verschelde 4e30bc71f5
Merge pull request #91376 from clayjohn/DOCS-reflect-vec3
Update the description and parameter name for Vector3 reflect to correct how the plane is constructed
2024-05-01 09:55:27 +02:00
Rémi Verschelde 645be5cdbb
Merge pull request #90760 from RandomShaper/cmd_queue_good_sync
CommandQueueMT: Optimize & fix handling of sync/ret commands
2024-05-01 09:54:54 +02:00
Rémi Verschelde 273a643145
Merge pull request #89647 from AThousandShips/read_only_dict
[Core] Fix property access on read-only `Dictionary`
2024-05-01 09:54:48 +02:00
clayjohn 4d580b15be Update the description and parameter name for Vector3 reflect to correct how the plane is constructed 2024-04-30 13:50:39 -07:00
Rémi Verschelde ef481148b2
Merge pull request #90394 from dsnopek/object-ptrcall-null-unlikely
Use `likely()` in `PtrToArg<T *>` when checking for null `Object *`s
2024-04-30 17:03:16 +02:00
Rémi Verschelde 32070144af
Merge pull request #91100 from bruvzg/x_finks
Add symlink API support for Windows, expose symlink methods.
2024-04-29 13:00:37 +02:00
Rémi Verschelde 947f5a8741
Merge pull request #91247 from AThousandShips/callable_fix
Fix unsafe uses of `Callable.is_null()`
2024-04-29 10:10:32 +02:00
Rémi Verschelde dee1231ce6
Merge pull request #91220 from Repiteo/scons/colorize-warn-error
SCons: Colorize warnings/errors during generation
2024-04-29 10:10:16 +02:00
Rémi Verschelde 2bf4509353
Merge pull request #91208 from akien-mga/gcc-14-Wtemplate-id-cdtor-warning
Fix GCC 14 `-Wtemplate-id-cdtor` warnings
2024-04-29 10:10:06 +02:00
Rémi Verschelde 7dd31b4082
Merge pull request #91179 from Bromeon/feature/free-property-list-count
GDExtension: provide `free_property_list_func` with length of array
2024-04-29 10:09:53 +02:00
Thaddeus Crews e0e8ce1fc0
SCons: Colorize warnings/errors during generation 2024-04-28 16:24:48 -05:00
bruvzg fc948e87f6 Add symlink API support for Windows, expose symlink methods. 2024-04-28 19:59:34 +03:00
A Thousand Ships 31e7ee63f2
Fix unsafe uses of `Callable.is_null()`
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and
doesn't guarantee the call is valid.
2024-04-27 16:22:57 +02:00
Jan Haller 27a637d287 GDExtension: provide `free_property_list_func` with length of array 2024-04-27 14:13:17 +02:00
Rémi Verschelde 6118592c6d
Merge pull request #91210 from Faless/fix/core_unztell64
[Core] Use unztell64 in FileAccessZIP to ensure 64 bit return
2024-04-26 15:13:44 +02:00
Rémi Verschelde bd598d5657
Merge pull request #85678 from KoBeWi/editor_walktime
Add separate feature tags for editor runtime
2024-04-26 15:13:16 +02:00
Rémi Verschelde 53ef784519
Merge pull request #84581 from KoBeWi/varray(1,2,3,4,5,6,7,8,9,100);
Make `varray()` variadic
2024-04-26 15:13:09 +02:00
kobewi 3ebb5b84a0 Add separate feature tags for editor runtime 2024-04-26 14:44:38 +02:00
kobewi f647888006 Make varray() variadic 2024-04-26 14:33:11 +02:00
Fabio Alessandrelli efccebd3db [Core] Use unztell64 in FileAccessZIP to ensure 64 bit return 2024-04-26 11:49:54 +02:00
Rémi Verschelde a8ff47b6d6
Fix GCC 14 -Wtemplate-id-cdtor warnings
Fixes #91206.
2024-04-26 11:41:09 +02:00
kobewi 4324d01c8e Allow loading custom ProjectSettings instance 2024-04-26 11:34:37 +02:00
David Snopek 45463f75d6 Fix ptrcalls to static GDExtension methods 2024-04-25 08:20:22 -05:00
Rémi Verschelde de9933444e
Merge pull request #91108 from akien-mga/sync-gamecontrollerdb
Sync controller mappings DB with SDL 2 community repo
2024-04-24 18:55:22 +02:00
Rémi Verschelde dcdaa7d5a9
Merge pull request #90900 from Calinou/file-logging-strip-ansi-escape-codes
Strip ANSI escape codes from file logging
2024-04-24 18:55:10 +02:00
Rémi Verschelde 2e92fb00d4
Merge pull request #90540 from Repiteo/core/type-info-use-type-traits
Core: Use `<type_traits>` where applicable
2024-04-24 18:55:07 +02:00
Rémi Verschelde 00cc0a3e8f
Merge pull request #90091 from ajreckof/Fix-load-subtask-not-being-registered-leading-to-false-progress-values-
Fix load subtask not being registered leading to false progress values.
2024-04-24 18:55:04 +02:00
Rémi Verschelde 1da02fa7be
Sync controller mappings DB with SDL 2 community repo
Synced with mdqinc/SDL_GameControllerDB@5b4efa3a20
2024-04-24 11:55:55 +02:00
Pedro J. Estébanez dee65d1435 Redefine GetSimpleTypeT<> in terms of <type_traits> 2024-04-24 11:43:13 +02:00
Hugo Locurcio 459f14c098
Strip ANSI escape codes from file logging
Text editors cannot display ANSI escape codes, so these should be
stripped from log files to ensure readability.

Since this uses a regex, this works both for `print_rich()`
and manually inserted ANSI escape codes.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2024-04-24 01:02:47 +02:00
Pedro J. Estébanez 15de869a9c CommandQueueMT: Optimize & fix handling of sync/ret commands 2024-04-23 19:57:12 +02:00
Rémi Verschelde ff9d78c141
Merge pull request #90889 from timothyqiu/compat
Use compatible text resource format when possible
2024-04-23 19:11:46 +02:00
Rémi Verschelde cb1d6140be
Merge pull request #90866 from Repiteo/core/variant-initalizer-lists
Core: Utilize initalizer lists in Variant constructors
2024-04-23 19:11:29 +02:00
Haoyu Qiu 941e5c4820 Use compatible text resource format when possible 2024-04-23 12:04:44 +08:00
Rémi Verschelde e22743298a
Merge pull request #90961 from Lateasusual/gdextension-hot-reloading-borked
GDExtension: Fix missing library path breaking hot reloading
2024-04-22 22:18:34 +02:00
Rémi Verschelde 2980a6b295
Merge pull request #90916 from Naros/expose-classdb-class-get-property-default-value
Expose `ClassDB::class_get_property_default_value` method
2024-04-22 22:18:26 +02:00
A Thousand Ships ec29c3e784
[Core] Fix property access on read-only `Dictionary` 2024-04-22 13:57:34 +02:00
Rémi Verschelde 659cf339bc
Merge pull request #90931 from aaronfranke/is-ascii-alphabet-char
Rename internal `is_ascii_char` to `is_ascii_alphabet_char`
2024-04-22 12:53:28 +02:00
Rémi Verschelde 61d146c89e
Merge pull request #90748 from aaronfranke/fix-basis-scale-global
Fix incorrect name of internal Basis global scale getter
2024-04-22 12:52:52 +02:00
Rémi Verschelde 4b6629978e
Merge pull request #90701 from permelin/improve-delaunay3d-triangulation
Delaunay3D/LightmapGI: Improve triangulation
2024-04-22 12:52:12 +02:00
Rémi Verschelde 504d01b61e
Merge pull request #90403 from bruvzg/file_resize
[FileAccess] Implement `resize` method.
2024-04-22 12:51:55 +02:00
Rémi Verschelde 0b89b8b64c
Merge pull request #90368 from Naros/expose-classdb-is-enum-bitfield
Expose `ClassDB::is_enum_bitfield` as `ClassDB::is_class_enum_bitfield`
2024-04-22 12:51:51 +02:00
Rémi Verschelde fb3c3ace62
Merge pull request #90153 from rburing/clipper2_electric_boogaloo
Replace Clipper1 library by Clipper2 library
2024-04-22 12:51:46 +02:00
Rémi Verschelde 0cf1557045
Merge pull request #89780 from AThousandShips/import_fix
Fix import and saving related crashes
2024-04-22 12:51:37 +02:00
A Thousand Ships 49ae632b7d
Fix import and saving related crashes
* Don't add empty mesh to result when importing obj files
* Check for null resources in `ResourceSaver`
2024-04-22 12:13:19 +02:00
Chris Clyne 8564e94547 GDExtension: Fix missing library path breaking hot reloading 2024-04-20 21:08:11 +01:00
Ricardo Buring 8a28f816d0 Replace Clipper1 library by Clipper2 library 2024-04-20 13:37:59 +02:00
Aaron Franke b1f5e9fe3a
Rename internal is_ascii_char to is_ascii_alphabet_char 2024-04-20 02:36:41 -07:00
Chris Cranford fdf31011a5 Expose ClassDB::class_get_property_default_value method 2024-04-19 13:51:28 -04:00
Chris Cranford c936ee54ee Expose `ClassDB::is_enum_bitfield` as `ClassDB::is_class_enum_bitfield` 2024-04-19 12:46:36 -04:00
Fredia Huya-Kouadio 764de7fe31 Collapse the gdextension arguments into the `GDExtensionData` struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
2024-04-19 07:56:02 -07:00
Fredia Huya-Kouadio ede88cf59d Fix loading GDExtension dependencies on Android 2024-04-19 07:55:08 -07:00
Rémi Verschelde e50867ae34
Merge pull request #90776 from Naros/avoid-script-language-not-overridden
Defer call to `set_break_language`
2024-04-19 16:27:33 +02:00
Rémi Verschelde 0b8042180e
Merge pull request #90447 from dsnopek/gdextension-hot-reload-not-classdb-instantiate
Fix GDExtension hot reload for classes not created via `ClassDB::instantiate()`
2024-04-19 16:27:26 +02:00
Thaddeus Crews b95e7fcecd
Core: Integrate initalizer lists for Variant 2024-04-19 08:52:17 -05:00
Pedro J. Estébanez 8192d1cbc7 WorkerThreadPool: Fix yield-over for not-yet-started tasks 2024-04-18 19:25:19 +02:00
Rémi Verschelde 866f2c56f7
Merge pull request #90674 from RadiantUwU/change_stuff
Implement `Object.remove_user_signal(signal: StringName)`
2024-04-18 12:24:34 +02:00
Radiant e263b11cdd Implement remove_user_signal()
Co-authored-by: Timothe Bonhoure <tbonhoure@ymail.Com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-04-18 11:22:59 +03:00
Pedro J. Estébanez 9653bcaa43 WorkerThreadPool: Polish yielding (fix corner case, remove misleading warning) 2024-04-17 18:32:14 +02:00
Rémi Verschelde 56dfed4efd
Merge pull request #90751 from dalexeev/core-marshalls-fix-objects-as-id-in-typed-arrays
Core: Fix binary serialization of objects in typed arrays
2024-04-17 10:59:01 +02:00
Chris Cranford d0fa2c3cfa Defer call to set_break_language 2024-04-16 20:01:53 -04:00
Danil Alexeev 27b94eb44c
Core: Fix binary serialization of objects in typed arrays
* Allow typed arrays to be encoded even if `p_full_objects` is `false`.
* Use `Array[EncodedObjectAsID]` instead of the encoded element type
  when decoding an array if `p_allow_objects` is `false`.
2024-04-16 16:19:10 +03:00
Rémi Verschelde 0ae1dcc3d2
Merge pull request #90741 from yorickdewid/patch-1
Fix missing return in `StreamPeerTCP::poll` when connection is `STATUS_CONNECTED`
2024-04-16 13:31:03 +02:00
Rémi Verschelde dc8e82b00a
Merge pull request #90730 from timothyqiu/root-auto-translate
Add project setting for root node auto translate mode
2024-04-16 13:31:00 +02:00
Rémi Verschelde 7210d6cb43
Merge pull request #90358 from KoBeWi/finding_errors_in_other_apps
Add `OS.get_process_exit_code()` method
2024-04-16 13:30:41 +02:00
Aaron Franke e83807ef85
Fix incorrect name of Basis global scale getter 2024-04-16 04:26:52 -07:00
kobewi dce4a3e4c2 Add get_process_exit_code() method 2024-04-16 12:46:15 +02:00
Yorick de Wid 61a2f5c534
FIX: Return if TCP is in STATUS_CONNECTED
If the `StreamPeerTCP` is polled and the TCP connection is `STATUS_CONNECTED` it should return after polling netsocket. Without `return` poll keeps calling `_sock->connect_to_host` and `connect()`.
2024-04-16 10:32:11 +02:00
Haoyu Qiu 8d1cb7e74c Add project setting for root node auto translate mode 2024-04-16 11:02:04 +08:00
Per Melin 89d0934f71 Delaunay3D: Improve triangulation 2024-04-15 18:48:21 +02:00
Danil Alexeev 3c62f5fe5c
Core: Fix `RefCounted` handling in `marshalls.cpp` 2024-04-15 13:53:40 +03:00
Rémi Verschelde c951421c99
Merge pull request #90268 from RandomShaper/wtp_servers
Use WorkerThreadPool for Server threads (enhanced)
2024-04-15 10:12:00 +02:00
Rémi Verschelde 50fd380359
Merge pull request #90562 from bruvzg/fix_links
[Unix / DirAccess] Fix removing directory symlinks with `remove`, ensure `erase_contents_recursive` is not following directory symlinks.
2024-04-15 10:00:22 +02:00
A Thousand Ships 80cb914e06
[Core] Fix incorrect comparison for `Array` const iterator 2024-04-13 17:32:33 +02:00
ajreckof ca020ad8cd Fix load subtask not being registered leading to false progress values. 2024-04-13 01:42:29 +02:00
Thaddeus Crews 55a4836e5b
Core: Replace `_NO_DISCARD_` macro with attribute 2024-04-12 16:40:01 -05:00
bruvzg 88b3e68f93
[FileAccess] Implement `resize` method. 2024-04-12 19:20:49 +03:00
bruvzg 57fde36f31
[Unix / DirAccess] Fix removing directory symlinks with `remove`, ensure `erase_contents_recursive` is not following directory symlinks. 2024-04-12 10:06:49 +03:00
Thaddeus Crews 127025679b
Core: Use `<type_traits>` where applicable 2024-04-11 13:13:59 -05:00
Rémi Verschelde 58f8a227b9
Merge pull request #90482 from Faless/mbedtls/3.6.0-tls
mbedTLS: Update to new LTS v3.6.0
2024-04-11 11:02:46 +02:00
Rémi Verschelde 8ec0372f01
Merge pull request #90470 from RandomShaper/fix_cmd_queue_mt_reentrancy
CommandQueueMT: Fix flush re-entrancy
2024-04-11 11:02:42 +02:00
Rémi Verschelde e73f40e260
Merge pull request #87117 from DmitriySalnikov/rename_pdb
Add renaming of PDB files to avoid blocking them
2024-04-11 11:02:31 +02:00
Lyuma 40fa684c18 mbedTLS: Update to new LTS v3.6.0
Keep module compatibility with mbedtls 2.x (old LTS branch).

A patch has been added to allow compiling after removing all the `psa_*`
files from the library folder (will look into upstreaming it).

Note: mbedTLS 3.6 finally enabled TLSv1.3 by default, but it requires
some module changes, and to enable PSA crypto (new "standard" API
specification), so it might be best done in a separate commit/PR.
2024-04-10 21:19:22 +02:00
Juan Linietsky 65686dedf9 Use WorkerThreadPool for Server threads
* Servers now use WorkerThreadPool for background computation.
* This helps keep the number of threads used fixed at all times.
* It also ensures everything works on HTML5 with threads.
* And makes it easier to support disabling threads for also HTML5.

CommandQueueMT now syncs with the servers via the WorkerThreadPool
yielding mechanism, which makes its classic main sync semaphore
superfluous.

Also, some warnings about calls that kill performance when using
threaded rendering are removed because there's a mechanism that
warns about that in a more general fashion.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2024-04-10 18:47:42 +02:00
Pedro J. Estébanez 1b104ffcd8 WorkerThreadPool: Support daemon-like tasks (via yield semantics) 2024-04-10 18:47:42 +02:00
Pedro J. Estébanez 71facbaa88 WorkerThreadPool: Fix data race 2024-04-10 18:47:41 +02:00
Rémi Verschelde 8764769ee8
Merge pull request #89186 from groud/save_byte_arrays_as_base64_encoded
Save PackedByteArrays as base64 encoded
2024-04-10 17:49:24 +02:00
A Thousand Ships 64146cb7f3
[Core] Add iteration support to `Array` 2024-04-10 14:49:34 +02:00
clayjohn c0d0bdc160
Clarify bounce and reflect docs and update param names 2024-04-10 14:07:08 +02:00
Pedro J. Estébanez 114b14b0fa CommandQueueMT: Fix flush re-entrancy 2024-04-10 10:02:30 +02:00
Rémi Verschelde bff6955459
Merge pull request #85024 from Jordyfel/moving-scripts-of-types-of-exported-typed-arrays
When saving a resource with an exported typed array, check whether the type is an external resource
2024-04-09 22:25:00 +02:00
David Snopek 87aec2745d Fix GDExtension hot reload for classes not created via `ClassDB::instantiate()` 2024-04-09 13:40:33 -05:00
Jordyfel 82de00a174 Type of exported typed array can be external resource 2024-04-09 15:28:42 +03:00
Rémi Verschelde 6772047e50
Sync controller mappings DB with SDL 2 community repo
Synced with mdqinc/SDL_GameControllerDB@4c9b8dace8
2024-04-08 22:22:30 +02:00
David Snopek 927f2e1e53 Use `likely()` in `PtrToArg<T *>` when checking for null `Object *`s 2024-04-08 11:06:56 -05:00
Rémi Verschelde 97b5c142f8
Merge pull request #90269 from KoBeWi/sir,_your_file_cannot_be_opened
Ignore `ERR_FILE_CANT_OPEN` error when loading
2024-04-08 11:38:15 +02:00
Rémi Verschelde 9738cc7ef2
Merge pull request #90335 from Faless/io/marshall_nil_script
[IO] Fix marshall decoding when script is NIL
2024-04-08 11:21:50 +02:00
Rémi Verschelde 7d96ec4f9d
Merge pull request #88329 from ManpreetXSingh/key-window-menu
Windows: Add support for enabling Alt+Space menu and fix borderless maximize
2024-04-08 11:20:05 +02:00
Fabio Alessandrelli 8addab785d [IO] Fix marshall decoding when script is NIL
We changed how scripts are binary serialized, and added a check to
ensure the new format is enforced, but there is still a case where the
old format (plain "prop"-"value" combo) is used, and that is when the
script is NIL.
2024-04-07 09:55:15 +02:00
Rémi Verschelde dd9aacd59f
Merge pull request #90273 from Pylgos/fix-gdextension-get-rid
Fix `Resource::get_rid override` not working in GDExtension
2024-04-06 13:06:50 +02:00
Rémi Verschelde c1b2cfdced
Merge pull request #90271 from DarioSamo/pipeline_cache_setting
Add toggle for enabling or disabling RenderingDevice's pipeline cache.
2024-04-06 13:06:47 +02:00
Manpreet Singh 329d04d331 Windows: Add alt+space menu and fix window modes 2024-04-06 16:26:19 +05:30
Haoyu Qiu 9bcda8f94c Prefer family name in fonts' names table 2024-04-06 16:08:59 +08:00
Pylgos c2be2dfbde Fix Resource::get_rid override not working in GDExtension 2024-04-06 01:27:16 +09:00
Dario ecaafa6001 Add toggle for enabling or disabling RenderingDevice's pipeline cache. 2024-04-05 13:14:07 -03:00
kobewi f0cbd388dc Ignore ERR_FILE_CANT_OPEN error when loading scene 2024-04-05 17:51:27 +02:00
Rémi Verschelde 0ff056ea2e
Merge pull request #90218 from Repiteo/do-while-false-cleanup
Update lingering `do/while(0)` defines
2024-04-05 12:16:34 +02:00
Rémi Verschelde d100888f0d
Merge pull request #90208 from Repiteo/scons/ninja-msvc
SCons: Fix Ninja compilation with MSVC
2024-04-05 12:16:22 +02:00
DmitriySalnikov b73e740786 Add renaming of PDB files to avoid blocking them 2024-04-05 00:14:23 +03:00
Thaddeus Crews bbb3eb3a1a
Update lingering `do/while(0)` defines 2024-04-04 14:17:22 -05:00
Thaddeus Crews 7918d50297
SCons: Fix Ninja compilation with MSVC 2024-04-04 10:16:33 -05:00
Thaddeus Crews b0cda1f85f
Core: Use fixed-width integer types in Variant 2024-04-04 08:54:11 -05:00
Rémi Verschelde c5ac5d2308
Merge pull request #90063 from aaronfranke/really-floaty
Fix some uses of `float` and `real_t` in `core/math`
2024-04-04 14:36:57 +02:00
Rémi Verschelde c8088c100f
Merge pull request #90038 from AThousandShips/load_path
[Core] Fix `ResourceLoader.load` cache with relative paths
2024-04-04 14:36:51 +02:00
Rémi Verschelde 3fdc169751
Merge pull request #89889 from BoThompson/compute_image_metrics-fix
Remove a redundant `MAX` comparison within a loop in `compute_image_metrics`.
2024-04-04 14:35:17 +02:00
Rémi Verschelde 7fa97f37fb
Merge pull request #89452 from Riteo/name-a-better-duo
SCons: Enable the experimental Ninja backend and minimize timestamp changes to generated code
2024-04-04 14:31:24 +02:00
Rémi Verschelde 69a4ff8996
Merge pull request #88328 from Khasehemwy/reversed-z
Use Reverse Z for the depth buffer
2024-04-04 14:30:53 +02:00
Rémi Verschelde a1ab287010
Merge pull request #88047 from theashtronaut/add_partial_return_astar
Add a partial path return option for astar
2024-04-04 14:30:49 +02:00
Rémi Verschelde 406d9426cb
Merge pull request #86121 from lawnjelly/occlusion_cull_jitter
Jitter raster occlusion camera to reduce false positives.
2024-04-04 14:30:42 +02:00
Rémi Verschelde 84b3d14c9a
Merge pull request #82852 from timothyqiu/property-context
Add context support for editor property name i18n
2024-04-04 14:30:29 +02:00