1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00
Commit Graph

71817 Commits

Author SHA1 Message Date
Rémi Verschelde
a5fd2a64cf Merge pull request #99717 from Repiteo/codeowners/scene-core
CI: Remove leading-underscore teams from `CODEOWNERS`
2024-12-11 18:47:00 +01:00
Thaddeus Crews
9bb747e0e8 CI: Remove leading-underscore teams from CODEOWNERS 2024-12-11 11:17:44 -06:00
Matias N. Goldberg
acf439e96d Keep processing Graphics if there are pending operations
Fixes #90017
Fixes #90030
Fixes #98044

This PR makes the following changes:

# Force processing of GPU commands for frame_count frames

The variable `frames_pending_resources_for_processing` is added to track
this.

The ticket #98044 suggested to use `_flush_and_stall_for_all_frames()`
while minimized.

Technically this works and is a viable solution.

However I noticed that this issue was happening because Logic/Physics
continue to work "business as usual" while minimized(\*). Only Graphics
was being deactivated (which caused commands to accumulate until window
is restored).

To continue this behavior of "business as usual", I decided that GPU
work should also "continue as usual" by buffering commands in a double
or triple buffer scheme until all commands are done processing (if they
ever stop coming). This is specially important if the app specifically
intends to keep processing while minimized.

Calling `_flush_and_stall_for_all_frames()` would fix the leak, but it
would make  Godot's behavior different while minimized vs while the
window is presenting.

\* `OS::add_frame_delay` _does_ consider being minimized, but it just
throttles CPU usage. Some platforms such as Android completely disable
processing because the higher level code stops being called when the app
goes into background. But this seems like an implementation-detail that
diverges from the rest of the platforms (e.g. Windows, Linux & macOS
continue to process while minimized).

# Rename p_swap_buffers for p_present

**This is potentially a breaking change** (if it actually breaks
anything, I ignore. But I strongly suspect it doesn't break anything).

"Swap Buffers" is a concept carried from OpenGL, where a frame is "done"
when `glSwapBuffers()` is called, which basically means "present to the
screen".

However it _also_ means that OpenGL internally swaps its internal
buffers in a double/triple buffer scheme (in Vulkan, we do that
ourselves and is tracked by `RenderingDevice::frame`).

Modern APIs like Vulkan differentiate between "submitting GPU work" and
"presenting".

Before this PR, calling `RendererCompositorRD::end_frame(false)` would
literally do nothing. This is often undesired and the cause of the leak.
After this PR, calling `RendererCompositorRD::end_frame(false)` will now
process commands, swap our internal buffers in a double/triple buffer
scheme **but avoid presenting to the screen**.

Hence the rename of the variable from `p_swap_buffers` to `p_present`
(which slightly alters its behavior).
If we want `RendererCompositorRD::end_frame(false)` to do nothing, then
we should not call it at all.

This PR reflects such change: When we're minimized **_and_**
`has_pending_resources_for_processing()` returns false, we don't call
`RendererCompositorRD::end_frame()` at all.

But if `has_pending_resources_for_processing()` returns true, we will
call it, but with `p_present = false` because we're minimized.

There's still the issue that Godot keeps processing work (logic,
scripts, physics) while minimized, which we shouldn't do by default. But
that's work for follow up PR.
2024-12-11 14:13:29 -03:00
Pāvels Nadtočajevs
a8c8eca74a [Windows] Fix loading debug symbol files over 2GB. 2024-12-11 17:42:47 +02:00
Lukas Tenbrink
57073ba14e Add move constructor and move assignment to CowData, String, Char16String, CharString and Vector. 2024-12-11 15:52:15 +01:00
Hugo Locurcio
3dfc832272 Replace textureSize() with a uniform in BaseMaterial3D for MSDF rendering
This uniform was already defined for other uses previously.

`textureSize()` is known to be slow on mobile platforms due to how
the drivers implement it there, so it's best avoided.
2024-12-11 15:44:06 +01:00
Timo Schwarzer
11bf2da9de Improve editor file dialog options 2024-12-11 15:11:34 +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
kobewi
b8b1584f5a Don't emit text_changed signal when clearing empty LineEdit 2024-12-11 14:16:36 +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
bruvzg
800076a6c2 [Windows] Use dwarf-4 for clang builds on Windows. 2024-12-11 14:10:57 +02:00
Yuri Rubinsky
a40fc2354a Merge pull request #100036 from Chaosus/hover_sname
[Scene] Add `SceneStringName::hover`
2024-12-11 12:24:09 +03:00
Yuri Rubinsky
ff9d389aa6 Merge pull request #99934 from Chaosus/animation_node_state_machine_fix_orphan_strings
Fix orphan strings in `AnimationNodeStateMachine`
2024-12-11 12:23:22 +03:00
Chaosus
9a8d6628de [Scene] Add SceneStringName::hover 2024-12-11 11:11:25 +03:00
Chaosus
7adb986e15 Fix orphan strings in AnimationNodeStateMachine 2024-12-11 11:08:23 +03:00
Pāvels Nadtočajevs
8b853b7db7 [macOS] Print full source paths in the trace. 2024-12-11 09:21:25 +02:00
smix8
7c84eba663 Add basic editor editing for ConvexPolygonShape2D and ConcavePolygonShape2D
Adds basic editor tooling to move the existing points of a ConvexPolygonShape2D or move the  segments of a ConcavePolygonShape2D while a CollisionShape2D node is selected.
2024-12-11 02:31:42 +01:00
Markus Sauermann
4d6a6b21e2 Allow canceling drag-and-drop with right mouse button
This is a small usability enhancement, that allows users to cancel
drag-and-drop without the need to press the escape key on the keyboard.
2024-12-11 00:13:54 +01:00
devloglogan
3deb5884d7 Renderer agnostic motion vector rendering/OpenXR changes 2024-12-10 15:59:17 -06:00
Thaddeus Crews
cf038deb10 Merge pull request #100222 from DarioSamo/partial-coverage-fix
Fix incorrect return value on partial coverage detection.
2024-12-10 14:16:13 -06:00
Thaddeus Crews
9cf645df22 Merge pull request #100218 from akien-mga/scene-debugger-crash-invalid-shortcut
[Debugger] Fix scene debugger crash when editor shortcuts are invalid
2024-12-10 14:16:12 -06:00
Thaddeus Crews
69c67ede17 Merge pull request #88950 from bruvzg/excap
[macOS, Windows] Add support for excluding windows from a screenshot.
2024-12-10 14:16:10 -06:00
Thaddeus Crews
15aa18bc92 Merge pull request #98675 from YeldhamDev/dont_be_shy_plugin
Fix certain editor plugins not showing when they should
2024-12-10 14:16:09 -06:00
Thaddeus Crews
deb4c00f06 Merge pull request #100210 from hpvb/scons-use-md5-timestamp
SCons: Unconditionally use `env.Decider("MD5-timestamp")`
2024-12-10 14:16:08 -06:00
Thaddeus Crews
25122e7dd3 Merge pull request #100081 from clayjohn/rd-clearcoat
Ensure schlick is available when using clearcoat with GGX
2024-12-10 14:16:07 -06:00
Thaddeus Crews
3cb8419703 Merge pull request #100207 from bruvzg/mingw_dbg
[Windows] Fix MinGW debug symbols.
2024-12-10 14:16:06 -06:00
Thaddeus Crews
ba89529390 Merge pull request #99695 from peterdang1502/error-calling-deferred-method-99571
Fix argument error when restarting project by executing Project -> Tools -> Upgrade Mesh Surface
2024-12-10 14:16:05 -06:00
Thaddeus Crews
ae38cdbb6d Merge pull request #95839 from GustJc/interactive_audio_current_playback
Expose `AudioStreamPlaybackInteractive::get_current_clip_index()`.
2024-12-10 14:16:04 -06:00
Thaddeus Crews
f962fdce0e Merge pull request #100185 from Repiteo/scons/fix-thirdparty-warnings
SCons: Fix MSVC bypassing disabled warnings
2024-12-10 14:16:02 -06:00
Thaddeus Crews
b789935a13 Merge pull request #100049 from Chaosus/flat_button_sname
[Scene] Add `SceneStringName::FlatButton`
2024-12-10 14:16:01 -06:00
Thaddeus Crews
ba66c478c0 Merge pull request #100041 from Ivorforce/optimize-string-similarity
Optimize String.similarity by avoiding allocation for bigrams.
2024-12-10 14:16:00 -06:00
Thaddeus Crews
b88fd31687 Merge pull request #99397 from yosoyfreeman/master
Allow `apply_floor_snap` to preserve the horizontal position regardless of `stop_on_slopes`
2024-12-10 14:15:59 -06:00
Thaddeus Crews
3ef8e835c2 Merge pull request #99775 from Ivorforce/string-builder-template-append
Optimize StringBuilder by using `LocalVector` instead of `Vector`.
2024-12-10 14:15:58 -06:00
Thaddeus Crews
1f0eeea7b5 Merge pull request #99902 from Repiteo/dotnet/ci-warnings
C#: Fix warnings caught by new problem-matchers
2024-12-10 14:15:57 -06:00
Thaddeus Crews
66dea152b5 Merge pull request #99257 from darksylinc/matias-TheForge-pr04-excluded-ubo+render_opt
Improvements from TheForge
2024-12-10 14:15:55 -06:00
Thaddeus Crews
6cbf7c77c2 Merge pull request #100150 from ArchercatNEO/homeless-export
Use temp dirs instead of cache dirs for export
2024-12-10 14:15:54 -06:00
Thaddeus Crews
8f16f864a6 Merge pull request #99765 from dalexeev/core-fix-json-from-to-native
Core: Fix `JSON.{from,to}_native()` issues
2024-12-10 14:15:53 -06:00
Thaddeus Crews
d108d4f29e Merge pull request #100147 from esainane/vector-victor
Remove apparent contradiction in vector.h header
2024-12-10 14:15:52 -06:00
Thaddeus Crews
f222cc43f3 Merge pull request #99633 from buresu/fix-wayland-keymapping
Fix underscore input not working with jp106 keyboard on wayland platform
2024-12-10 14:15:51 -06:00
Thaddeus Crews
79dd5179e3 Merge pull request #99887 from JackErb/gdscript-parser-error-fix
Improve misleading `Unexpected "x" in class body.` GDScript parser error
2024-12-10 14:15:50 -06:00
Thaddeus Crews
78215f3cc6 Merge pull request #100132 from Ivorforce/string-compile-time-strlen
Optimize String construction from statically known strings by evaluating `strlen` at compile-time.
2024-12-10 14:15:49 -06:00
Thaddeus Crews
ef0d1e0eb9 Merge pull request #100001 from clayjohn/rd-uniform-set-cache
Increase the size of the uniform set cache to 4096 to avoid cache thrashing from projects with high numbers of unique textures
2024-12-10 14:15:48 -06:00
Thaddeus Crews
b26f9f0380 Merge pull request #85275 from TheSofox/anchors-undo-fix
Correctly restore Control position on undoing an Anchors Preset
2024-12-10 14:15:47 -06:00
Thaddeus Crews
2e7f5f1bf3 Merge pull request #100250 from YYF233333/style
[Codestyle] Merge identical code piece in ConvexHullComputer
2024-12-10 14:15:45 -06:00
Thaddeus Crews
14b2f62d04 Merge pull request #100247 from BlueCube3310/tex-preview-all
Consider all texture types for resource thumbnail generation
2024-12-10 14:15:44 -06:00
Thaddeus Crews
dfaf8074e0 Merge pull request #100245 from Faless/web/audio_worklet_fallback
[Web] Restore ScriptProcessorNode audio driver fallback
2024-12-10 14:15:43 -06:00
Thaddeus Crews
bfc1d2f95f Merge pull request #96773 from tetrapod00/resource-save-popup
[Editor] Use toast (notification) instead of dialog when saving with no open scene
2024-12-10 14:15:42 -06:00
Thaddeus Crews
a167afd70a Merge pull request #96771 from clayjohn/RD-static-lighting
Avoid calculating dynamic lights when lights are already baked using the static bake mode in the Forward+ renderer
2024-12-10 14:15:41 -06:00
Thaddeus Crews
57d08dbec3 C#: Fix warnings caught by new problem-matchers
• Restore MSVC problem matcher for Linux builds
2024-12-10 14:04:35 -06:00
Allen Pestaluky
db63d3e3a0 Prevent WASAPI error spam when device cannot be initialized.
Fixes #99968 and prevents the error spam referenced in comments of #18732.
Also fixes a number of memory leaks that occur when an audio device is reinitialized or fails to reinitialize and gates reinitialization attempts to around 1 per second instead of ~1000 attempts per second.

Co-authored-by: Kusok <118438257+kus04e4ek@users.noreply.github.com>
2024-12-10 13:32:33 -05:00