Commit Graph

358 Commits

Author SHA1 Message Date
829dade53b Replace default deadzone magic number with named constant 2024-11-12 10:11:52 -08:00
163bf94d04 Merge pull request #98091 from AThousandShips/improve_err_prints_core
[Core] Improve error messages with `vformat`
2024-10-31 20:14:36 -05:00
38f9769bc6 [Core] Improve error messages with vformat 2024-10-30 15:55:51 +01:00
16524a8a01 Add "Game" editor for better runtime debugging 2024-10-30 11:42:17 -03:00
748f4079e3 Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebased
Add Swappy & Pre-Transformed Swapchain
2024-10-29 12:34:40 -07:00
aaa0e2fddf Add Swappy & Pre-Transformed Swapchain
- Adds Swappy for Android for stable frame pacing
- Implements pre-transformed Swapchain so that Godot's compositor is in
charge of rotating the screen instead of Android's compositor
(performance optimization for phones that don't have HW rotator)

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.

Changes from original PR:

- Removed "display/window/frame_pacing/android/target_frame_rate" option
to use Engine::get_max_fps instead.
- Target framerate can be changed at runtime using Engine::set_max_fps.
- Swappy is enabled by default.
- Added documentation.
- enable_auto_swap setting is replaced with swappy_mode.
2024-10-28 18:55:37 -03:00
edad871a2d Merge pull request #98425 from darksylinc/matias-breadcrumbs-race-fix
Fix race conditions in breadcrumbs
2024-10-25 13:04:12 -05:00
abb9c0f171 Fix InputEvent crash when opening project 2024-10-24 17:05:05 +02:00
668c9b74e2 Fix race conditions in breadcrumbs
Adds "--accurate-breadcrumbs" CLI command

Additionally, leave out breadcrumbs code in non-debug, non-dev builds.
Fix regression introduced in #98388 where command_insert_breadcrumb() is
called even in non-debug builds.

Fixes #98338
2024-10-22 22:08:46 -03:00
7dbea98c49 Merge pull request #97005 from Repiteo/core/window-corner-style
Core: Add `DisplayServer` flag for sharp corners
2024-10-21 16:39:25 -05:00
ecc2eb73fc Merge pull request #97707 from Sauermann/fix-input-device-clash
Fix `InputEvent` device id clash
2024-10-21 16:39:10 -05:00
916d480686 Fix InputEvent device id clash
`InputMap::ALL_DEVICES` and `InputEvent::DEVICE_ID_EMULATION` have the
same value `-1`.

Change value of `InputMap::All_DEVICES` so that it's different from
`InputEvent::DEVICE_ID_EMULATION`. `InputEvent::DEVICE_ID_EMULATION`
is part of the API and can't be changed without potentially breaking
projects.

Gather all special device constants in a single location inside
`InputEvent`.

Add a converter to project settings, that takes care of adjusting
project files during loading.
2024-10-20 21:56:41 +02:00
f8c4a683d7 Core: Add DisplayServer flag for sharp corners 2024-10-18 11:20:21 -05:00
b9d25580ce Fix implementation of property_can_revert() in various classes 2024-10-04 23:02:04 +02:00
794920b1ff Partially revert 96780, remove warnings from project/editor settings _get. 2024-10-04 19:13:03 +03:00
336d91551d Merge pull request #97281 from reptofrog/deadzone-new-default
Input: Change the default deadzone value for new actions from 0.5 to 0.2
2024-10-02 15:01:02 +02:00
d532eecc81 Changed the default deadzone value for new actions from 0.5 to 0.2 2024-10-01 16:47:44 +04:00
9f9ee0c813 SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
d49ec39d63 [Core] Add Engine.print_to_stout setting to control printing
Also added notes to the related project settings pointing to the
`Engine` properties.
2024-09-22 12:09:01 +02:00
41d0971c7e Fix path error when saving ProjectSettings 2024-09-17 15:05:20 +02:00
012ccbc301 Merge pull request #95048 from KoBeWi/keep_the_party_going
Add `keep_screen_on` editor setting
2024-08-27 22:27:35 +02:00
59d0422dcd Disable extra memory tracking by default
PR #90993 added several debugging utilities.

Among them, advanced memory tracking through the use of custom
allocators and VK_EXT_device_memory_report.

However as issue #95967 reveals, it is dangerous to leave it on by
default because drivers (or even the Vulkan loader) can too easily
accidentally break custom allocators by allocating memory through std
malloc but then request us to deallocate it (or viceversa).

This PR fixes the following problems:
 - Adds --extra-gpu-memory-tracking cmd line argument
 - Adds missing enum entries to
RenderingContextDriverVulkan::VkTrackedObjectType
 - Adds RenderingDevice::get_driver_and_device_memory_report
    - GDScript users can easily check via print(
RenderingServer.get_rendering_device().get_driver_and_device_memory_report()
)
- Uses get_driver_and_device_memory_report on device lost for appending
further info.

Fixes #95967
2024-08-24 20:52:39 -03:00
82adfebcf8 Merge pull request #94799 from m4gr3d/memory_allocation_cleanup_and_optimizations
Android memory cleanup and optimizations
2024-08-16 23:45:39 +02:00
a57a99f5bc Memory cleanup and optimizations
- Returns an empty list when there's not registered plugins, thus preventing the creation of spurious iterator objects

- Inline `Godot#getRotatedValues(...)` given it only had a single caller. This allows to remove the allocation of a float array on each call and replace it with float variables

- Disable sensor events by default. Sensor events can fired at 10-100s Hz taking cpu and memory resources. Now the use of sensor data is behind a project setting allowing projects that have use of it to enable it, while other projects don't pay the cost for a feature they don't use

- Create a pool of specialized input `Runnable` objects to prevent spurious, unbounded `Runnable` allocations

- Disable showing the boot logo for Android XR projects

- Delete locale references of jni strings
2024-08-16 09:27:41 -07:00
69d52ed081 [.NET] Move search in files extension list definition to be after Scene level module init. 2024-08-14 00:16:09 +03:00
ab4c23583a Add keep_screen_on editor setting 2024-08-02 03:44:29 +02:00
25f78a5eb6 Replace .NET detection code with ClassDB::class_exists("CSharpScript"). 2024-07-23 23:46:14 +03:00
110c4d4067 GDScript: Fix "Mismatched external parser" for autoloads 2024-07-09 16:16:45 +03:00
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
52fa4f05f3 Add samples playback support 2024-06-18 11:06:31 -04:00
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
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
14506a4282 GDExtension: Prevent crash during shutdown as singletons are deleted 2024-05-10 13:17:36 -05:00
47ac22486d Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +02:00
86de59d60a [Core] Add LocalVector::has for convenience 2024-05-06 18:03:37 +02:00
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
bd598d5657 Merge pull request #85678 from KoBeWi/editor_walktime
Add separate feature tags for editor runtime
2024-04-26 15:13:16 +02:00
3ebb5b84a0 Add separate feature tags for editor runtime 2024-04-26 14:44:38 +02:00
4324d01c8e Allow loading custom ProjectSettings instance 2024-04-26 11:34:37 +02:00
8d1cb7e74c Add project setting for root node auto translate mode 2024-04-16 11:02:04 +08:00
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
64146cb7f3 [Core] Add iteration support to Array 2024-04-10 14:49:34 +02:00
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
329d04d331 Windows: Add alt+space menu and fix window modes 2024-04-06 16:26:19 +05:30
ecaafa6001 Add toggle for enabling or disabling RenderingDevice's pipeline cache. 2024-04-05 13:14:07 -03:00
691854d589 Jitter raster occlusion camera to reduce false positives.
Due to the low resolution of the occlusion buffer, small gaps between occluders can be closed and incorrectly occlude instances which should show through the gaps. To ameliorate this problem, this PR jitters the occlusion buffer over time, making it more likely an instance will be seen through a gap. This is used in conjunction with an occlusion timer per instance, to prevent instances flickering on and off rapidly.
2024-04-03 12:18:45 +01:00
93559db3a2 Properly skip printing version header with --no-header
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-03-26 11:41:13 +01:00
5e6adb4a2d Merge uid_cache.bin and global_script_class_cache.cfg after mounting PCKs
fixes godotengine#82061
fixes godotengine#61556

Also, distinguish between main pack and DLC packs.
It's desirable to downloaded content to be as small as possible. This change avoids bloating non-main pack files with new versions of resources that are all read on startup and never used again. They have no effect if loaded after startup.
- project.godot/project.binary file
- extension_list.cfg
- app icon and boot_splash
- .ico and .icns files (these can still be opted in for DLC by listing them explicitly in the include filter)
2024-03-06 12:14:21 -05:00
ea8c261cc6 [Core] Move includes from project_settings.h into project_settings.cpp 2024-03-04 15:37:30 +02:00