Commit graph

797 commits

Author SHA1 Message Date
Jānis Kiršteins
0e266b0099
[iOS] Sync the boot splash and the launch screen image scale modes 2025-02-12 17:41:18 +01:00
Marc Gilleron
c7a9d64eaf Add color channel filter to editor texture previews 2025-01-11 23:27:48 +00:00
Rémi Verschelde
da4f9339ea
Merge pull request #101072 from hpvb/thread-id-optimization
Optimize `Thread::get_caller_id()`
2025-01-05 14:52:18 +01:00
HP van Braam
873eb21ce8 Optimize Thread::get_caller_id()
By making sure that Thread always has a valid caller_id we can remove the
check making the function a straightforward getter instead.

In some quick tests we see a repeatable performance improvement of
somewhere around 0.32 mspf in TPS demo.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2025-01-03 17:33:10 +01:00
Ricardo Subtil
b77aa473a1 Implement a "Recovery Mode" for recovering crashing/hanging projects during initialization 2025-01-03 10:50:15 +00:00
Rémi Verschelde
b34adf29dc
Remove unused OS _display_driver_id member 2025-01-03 01:52:25 +01:00
Rémi Verschelde
21e6671740
Merge pull request #100937 from Repiteo/style/clang-format-sync
Style: Enforce `AllowShortFunctionsOnASingleLine`
2025-01-03 00:49:44 +01:00
Thaddeus Crews
e06d83860d
Style: Enforce AllowShortFunctionsOnASingleLine 2025-01-02 10:09:41 -06:00
Rémi Verschelde
f2d4dac92e
Thread: Re-add <new> include for std::hardware_destructive_interference_size
Somehow it would still build fine, but would crash when compiled with GCC 12.2
on Debian 12.

Also re-add wrongly removed Mutex include from `thread_safe.h`, where it's used
in macros.

Add IWYU pragma comments to prevent it from mistakenly flagging those as unused.
2025-01-01 22:43:42 +01:00
Thaddeus Crews
b97c8b37f6
Merge pull request #98441 from Yelloween10/fix-modifier-mask
Fix incorrect `KEY_MODIFIER_MASK` value
2024-12-23 11:15:17 -06:00
Rémi Verschelde
a11364d1e6
Merge pull request #99010 from Hilderin/embedding-game-process
Embed game process in editor
2024-12-20 23:56:43 +01:00
Thaddeus Crews
bf9ef5f8a5
Merge pull request #100564 from YYF233333/iwyu
Remove unused headers in core
2024-12-19 19:59:55 -06:00
Hilderin
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
Yufeng Ying
be86ce3103 Apply iwyu suggestion in core. 2024-12-19 00:43:47 +08:00
Rémi Verschelde
851d8e49e8
Merge pull request #100386 from hpvb/core-ubsan
Core: Fix UBSAN reports
2024-12-18 17:23:32 +01:00
HP van Braam
240f510fa7 Core ubsan fixes
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.

These fixes apply only to errors reported, and caused by, core/

The following things have been changed:

* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
  the API cannot pass in wrongly-sized values leading to potential stack
  corruption.
* Ensure that memcpy is never called with invalid or null pointers as
  this is undefined behavior, and when the engine is built with
  optimizations turned on leads to memory corruption and hard to debug
  crashes.
* Replace enum values only used as static values with constexpr static
  const values instead. This has no runtime overhead. This makes it so
  that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
  same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
  verify the new behavior. The behavior doesn't quite match master in
  particulary for negative doubles as the original code tried to cast -inf
  to an int. This then led to negative doubles losing all but one of
  their decimal points when serializing. Behavior in GDScript remains
  unchanged.
2024-12-18 14:31:12 +01:00
Yelloween
0153cb8c16 Fix incorrect MODIFIER_MASK value
Updated key modifier mask and documented API change

Changed the old value

Changed the old value inside the .expected file

Resolved Conflicts

Moved changes to the end
2024-12-18 02:59:29 +03:00
Hugo Locurcio
928982891e Add OS.get_version_alias() to return a human-readable Windows/macOS version number
Windows 11's major version number is actually 10.x.x, which can be confusing
if you don't know about this quirk. `OS.get_version_alias()` avoids this
by displaying the "branding" version number and the build number as a suffix,
so that individual updates can still be distinguished from each other.

On macOS, `OS.get_version_alias()` returns the version number prepended
with the version name (e.g. Sequoia for macOS 15).

On other operating systems, this returns the same value as `OS.get_version()`.
2024-12-14 18:47:50 +01:00
Rémi Verschelde
44dfa7e710
Merge pull request #99895 from mihe/jolt-physics
Add Jolt Physics as an alternative 3D physics engine
2024-12-11 14:53:57 +01:00
Mikael Hermansson
d470c2ac6a Add Jolt Physics as an alternative 3D physics engine
Co-authored-by: Jorrit Rouwe <jrouwe@gmail.com>
2024-12-11 13:57:25 +01:00
Thaddeus Crews
da8b9ba1ff
Merge pull request #99168 from RandomShaper/even_better_spinlock
SpinLock: Overhaul false sharing prevention
2024-12-09 14:33:31 -06:00
Student Main
e0693f8ad8 Add loongarch64 support 2024-12-06 00:18:26 +08:00
Thaddeus Crews
156bc92282
Merge pull request #98397 from adamscott/add-tmp-support
Add temp utilities (alias `OS::get_temp_dir()`, `FileAccess::create_temp()`, and `DirAccess::create_temp()`)
2024-12-03 14:40:59 -06:00
Thaddeus Crews
a135a6478a
Merge pull request #98383 from RandomShaper/deprecate_unsafe_th_rend
Deprecate the pointless unsafe threading model for rendering
2024-12-03 14:40:56 -06:00
Adam Scott
1b3e483899
Add file and dir temporary utilities
Co-authored by @Alex2782 for the Android bindings.
Many thanks to the reviewers also.

Co-authored-by: Alex <alex.hart.278@gmail.com>
2024-12-02 12:08:14 -05:00
Rémi Verschelde
acdffd0a14
Merge pull request #99864 from HuntJSparra/server-features-regression
Fix `OS::has_feature()` skipping custom features
2024-12-02 15:51:56 +01:00
rune-scape
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
Hunt J. Sparra
ba992ed22f Fix early exit once has_server_feature_callback is set; remove server feature warning due to consistent "fallthrough" features (e.g., OS-specific features) 2024-11-29 23:34:52 -05:00
Hunt J. Sparra
48fbe4172b Register Engine, OS, ProjectSettings, and Time early. 2024-11-21 18:09:03 -05:00
Pedro J. Estébanez
a46ea9d064 Deprecate the pointless unsafe threading model for rendering 2024-11-14 10:43:29 +01:00
Pedro J. Estébanez
a5caeeb664 SpinLock: Overhaul false sharing avoidance 2024-11-13 12:09:45 +01:00
Thaddeus Crews
179321a0a3
Merge pull request #91201 from bruvzg/con_type
[OS] Add functions to determine standard I/O device type.
2024-11-12 12:13:12 -06:00
Thaddeus Crews
c4a52e1ade
Merge pull request #98809 from bruvzg/mac_gde_libs_non_uni
[GDExtension] Improve macOS library loading/export.
2024-11-10 12:13:06 -06:00
Pedro J. Estébanez
360ed2b00d Enhance SpinLock 2024-11-08 08:06:07 +01:00
Pedro J. Estébanez
95c6a24795 Add a utility cache line size constant 2024-11-08 08:06:01 +01:00
bruvzg
76164c2aa9
[OS] Add functions to determine standard I/O device type. 2024-11-06 13:33:38 +02:00
bruvzg
2d66988f99
[GDExtension] Improve macOS library loading/export. 2024-11-04 09:28:30 +02:00
A Thousand Ships
38f9769bc6
[Core] Improve error messages with vformat 2024-10-30 15:55:51 +01:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Yevhen Babiichuk (DustDFG)
af6d260c17 Don't include core/io/image.h in core/os/os.h
`core/os/os.h` doesn't use `core/io/image.h`. It just brings
transitive dependencies. Lots of dependencies because `core/os/os.h`
is transitively included in almost every file of godot

Also added `core/io/image.h` into files^1 where `Ref<Image>` and `core/os/os.h`
were used to prevent obscure errors involving `Ref<Image>`

^1 except those which include `core/io/image_loader.h` or `core/io/image.h` by
corresponding .h file with the same name

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-10-18 19:04:19 +03:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
bruvzg
10f3c1f587
Add support for non-blocking IO mode to OS.execute_with_pipe. 2024-09-06 14:16:39 +03:00
bruvzg
d4e78b8db5
Store GLES over GL status in the OS to avoid direct renderer includes in the editor. 2024-09-03 16:11:59 +03:00
bruvzg
c273786758
Update rendering driver name on fallbacks. Fix rendering driver/method in the editor system info. 2024-09-01 18:22:40 +03:00
Rémi Verschelde
56ffcabae1
Merge pull request #94792 from akien-mga/core-remove-poolallocator
Core: Remove unused PoolAllocator
2024-08-28 00:12:20 +02:00
Rémi Verschelde
330fca1ffd
Merge pull request #93985 from alvinhochun/windows-gpu-pref
Respect integrated GPU preference in Windows Settings
2024-08-28 00:11:45 +02:00
Rémi Verschelde
ce44c91223
Merge pull request #93739 from AThousandShips/lock_unlock
[Core] Allow locking/unlocking of `MutexLock`
2024-08-26 22:45:13 +02:00
Pedro J. Estébanez
9cbc3f1419 Change warning muting so it affects all levels, but locally 2024-08-26 13:13:29 +02:00
A Thousand Ships
723f5500f4
[Core] Allow locking/unlocking of MutexLock 2024-08-26 12:38:03 +02:00
Rémi Verschelde
0ba0be27c7
Merge pull request #94169 from RandomShaper/wtp_rl_prize
Batch of fixes for `WorkerThreadPool` and `ResourceLoader`
2024-08-26 10:51:25 +02:00