Commit Graph

66736 Commits

Author SHA1 Message Date
DeeJayLSP 703c31fb40 WAV: Add missing break on `get_length()` 2024-08-25 14:18:26 -03:00
Craig-Stoneham 604df4fc83 Improve Template Class Conditionals (Code Style)
Refactored the following template classes by replacing runtime checks with compile-time checks using if constexpr for improved code clarity and maintainability:

- RID_Alloc
- SortArray
- PagedAllocator

Changes made:

- Updated conditional checks for THREAD_SAFE in the RID_Alloc class.
- Updated conditional checks for Validate in the SortArray class.
- Updated conditional checks for thread_safe in the PagedAllocator class.
2024-08-25 18:10:51 +01:00
Adam Scott 7e580150f9
Add import tab "import_script/path" relative path support 2024-08-25 12:50:50 -04:00
A Thousand Ships 5b91040ba6
[Doc] Clarify `is_null` methods of `Callable` and `Signal` 2024-08-25 14:33:07 +02:00
Saracen 06709e6865 Fix importer preview for models with scaled armatures. 2024-08-25 13:15:26 +01:00
Matias N. Goldberg 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
Stuart Carnie 2ef1ef63a5
Metal: Improve startup times by using concurrent shader compilation APIs 2024-08-25 09:05:58 +10:00
Tallivm b516742358 Fix typo in Array code example 2024-08-24 20:44:01 +03:00
Rémi Verschelde e3550cb20f
Merge pull request #95975 from darksylinc/matias-TheForge-hotfix
Fix build error in arm32
2024-08-24 01:01:37 +02:00
Joel Winarske 6ce71f0fb0 Use wayland-egl-core.h instead of wayland-egl.h
-avoid use of transitive wayland include

-resolves https://github.com/godotengine/godot/issues/95830

Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
2024-08-23 14:16:37 -07:00
kit 23927c3d9b Fix script overwriting with external editor 2024-08-23 16:34:24 -04:00
David Giardi e371587147 Improve SpinBox interaction, split arrows, add theme attributes 2024-08-23 18:21:20 +02:00
Matias N. Goldberg 38ae58bda2 Fix build error in arm32
Fixes #95973
2024-08-23 12:52:47 -03:00
Alex Docauer 08dcbce6b5
Add movement caveats to InputEventMouseMotion docs
InputEventMouseMotion may fire when the mouse hasn't moved.
Also, it generally won't fire when the mouse stops moving.
This makes reliably detecting when the mouse isn't moving tricky.

Update the docs for InputEventMouseMotion to capture these caveats
and give guidance for the best way to detect lack of mouse movement.
2024-08-23 07:54:18 -07:00
Rémi Verschelde a1acd38c35
Merge pull request #95945 from stuartcarnie/sgc/metal_mobile_fix
Metal: Fix artefacts for mobile render method and disable multi-view
2024-08-23 08:45:13 +02:00
Lars Pettersson dfdf7ebcda
Add a zoom speed setting to the 2D editor 2024-08-23 07:13:16 +02:00
Alex Docauer 125ff3213a
Only reset tooltip timer when mouse actually moved
InputEventMouseMotion isn't guaranteed to fire only on actual mouse
movement. It's not uncommon for the underlying OS motion event to be
sent either by the OS itself or another application even though the
mouse hasn't moved.  Godot will generate such zero-motion
InputEventMouseMotion events itself for things like cursor shape
changes.

Once started, the tooltip timer is reset only after a mouse movement of
at least 5 pixels in one frame.
2024-08-22 19:20:41 -07:00
Radiant 02fc4bbc2a Implement `ClassDB::class_call_static_method` 2024-08-23 02:56:29 +03:00
David Snopek 6f7c52d17f Temporarily disable "validation errors no longer occur" warnings 2024-08-22 18:16:11 -05:00
Rakka Rage ba23b22153 Enable revert button for `ShaderMaterial::next_pass` and `ShaderMaterial::render_priority`. 2024-08-22 16:28:59 -04:00
Dungeon Master 1928a84f6e Fix some C# variable types In `AStar2D/3D` Class Reference 2024-08-23 02:25:56 +08:00
David Snopek 11dd1f52ae Fix crash when calling OpenXRAPI::get_hand_tracker() and hand-tracking is disabled 2024-08-22 13:03:05 -05:00
bruvzg fba7ad8c7b
Remove spaces and punctuation from the beginning of translatable strings. 2024-08-22 20:51:13 +03:00
Vinni Richburgh 3e86f7b50e In Node.xml mentioned that Node::duplicate also copies children.
The list now uses the Oxford comma.
2024-08-22 18:57:05 +02:00
passivestar 155033384c Fix animation timeline resize widget allowing impossible internal values 2024-08-22 16:32:38 +04:00
Stuart Carnie bbc7962fe2
Metal: fix artefacts for mobile render method and return false for multi-view support 2024-08-22 21:34:53 +10:00
Raul Santos 4dd6e8eca5
GDExtension: Implement `GDExtensionLoader` concept
- Implements the concept of GDExtension loaders that can be used to customize how GDExtensions are loaded and initialized.
- Moves the parsing of `.gdextension` config files to the new `GDExtensionLibraryLoader`.
- `GDExtensionManager` is now meant to be the main way to load/unload extensions and can optionally take a `GDExtensionLoader`.
- `EditorFileSystem` avoids unloading extensions if the file still exists, this should prevent unloading extensions that are outside the user project.
2024-08-22 05:29:11 +02:00
Bastiaan Olij 1925d1e6f9 OpenXR: Check correct status bit for hand tracking 2024-08-22 11:57:56 +10:00
Goutte a014705d64 docs: update UPnP gdscript snippet to latest gdscript
This commit adds usage of the new (stringless) signal API.
2024-08-22 00:49:52 +02:00
Rémi Verschelde 568589c9d8
Merge pull request #90993 from darksylinc/matias-TheForge
Add debug utilities for Vulkan
2024-08-22 00:38:22 +02:00
Rémi Verschelde 37ae2a2900
Merge pull request #95921 from akien-mga/scons-validate-opt-in-drivers
SCons: Better validation for platform-specific opt-in drivers
2024-08-22 00:10:56 +02:00
Rémi Verschelde 0badddaccb
Merge pull request #95917 from BlueCube3310/lightmap-align-fix
LightmapGI: Fix shader data alignment after #89919
2024-08-22 00:10:53 +02:00
Rémi Verschelde 720615a913
Merge pull request #95898 from KoBeWi/capital_of_nonexistent_properties
Remove references to deleted `capitalize_properties` setting
2024-08-22 00:10:50 +02:00
Rémi Verschelde 2a98d8d78a
Merge pull request #95883 from jsjtxietian/curve2d-doc
Fix Curve2D incorrect sample range description
2024-08-22 00:10:46 +02:00
Rémi Verschelde 9396e058f5
Merge pull request #95874 from tetrapod00/remember-view-grid
Remember "View Grid" (per-viewport) setting between editor sessions
2024-08-22 00:10:43 +02:00
Rémi Verschelde 39b77ea04e
Merge pull request #95790 from aaronfranke/rect-aabb-support
Simplify Rect2/AABB `get_support` function
2024-08-22 00:10:39 +02:00
Rémi Verschelde 100fbb51ab
Merge pull request #95665 from Hilderin/fix-drag-drop-between-window
Fix drag&drop between window on Windows
2024-08-22 00:10:35 +02:00
Rémi Verschelde 78f47abe2b
Merge pull request #94022 from Riteo/a-fraction-of-the-work
Wayland: Switch pointer position handling to doubles
2024-08-22 00:10:31 +02:00
Rémi Verschelde 091212b4f1
Merge pull request #93602 from aaronp64/inspector_latency
Improve Editor Inspector/Theme item lookup performance
2024-08-22 00:10:26 +02:00
Rémi Verschelde 3b81db3bf0
Merge pull request #93577 from passivestar/themable-animation-editor
Allow theming animation editor
2024-08-22 00:10:22 +02:00
Rémi Verschelde d4b6bd5b60
Merge pull request #91172 from clayjohn/detect-rd
Disable creating RD projects in project manager if RD is not supported
2024-08-22 00:10:15 +02:00
Matias N. Goldberg 364f916f3f
Add debug utilities for Vulkan
Features:
- Debug-only tracking of objects by type. See
get_driver_allocs_by_object_type et al.
 - Debug-only Breadcrumb info for debugging GPU crashes and device lost
 - Performance report per frame from get_perf_report
- Some VMA calls had to be modified in order to insert the necessary
memory callbacks

Functionality marked as "debug-only" is only available in debug or dev
builds.

Misc fixes:
 - Early break optimization in RenderingDevice::uniform_set_create

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

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.
2024-08-21 23:48:08 +02:00
Rémi Verschelde 6e9bcc0f18
SCons: Better validation for platform-specific opt-in drivers
This replaces cryptic compilation errors with a clear error message
and early build termination.
2024-08-21 22:53:34 +02:00
BlueCube3310 4aa145624e LightmapGI: Fix shader data alignment after #89919 2024-08-21 21:37:13 +02:00
clayjohn f4ccba7508 Use correct lightmap coefficients to ensure that the directional lightmap mode looks correct
Also remove the metallic option from directional lightmap as it is guaranteed to return negative numbers in many cases
2024-08-21 10:24:32 -07:00
kobewi b314a9105a Remove references to deleted capitalize_properties setting 2024-08-21 17:27:54 +02:00
passivestar 6120786ddc Allow theming animation editor 2024-08-21 15:29:27 +04:00
Pedro J. Estébanez f4d76853b9 WorkerThreadPool (plus friends): Overhaul unlock allowance zones
This fixes a rare but possible deadlock, maybe due to undefined behavior. The new implementation is safer, at the cost of some added boilerplate.
2024-08-21 12:22:52 +02:00
Pedro J. Estébanez df23858488 ResourceLoader: Fix edge cases in the management of user tokens
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.
2024-08-21 12:22:52 +02:00
Pedro J. Estébanez 5c970db2e4 ResourceLoader: Optimize remap check by deferring until a non-mutex zone 2024-08-21 12:19:43 +02:00