Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from godotengine:master #72

Merged
merged 54 commits into from
Dec 12, 2024
Merged

Conversation

pull[bot]
Copy link

@pull pull bot commented Dec 12, 2024

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

Calinou and others added 30 commits July 24, 2024 23:47
…utput

This makes the output easier to understand when it's copied to a plain
text file (without visible colors).
Success lines are no longer printed, making the CI log shorter
and faster to read.
…tal`/`@tutorial`

These annotations don't exist at a source level, so the error messages
point to the documentation comment syntax.
The v1 version is deprecated and bound to be removed in the future from
all compositors. This patch adds a v1/v2 designator to everything
related to the protocol and prefers the v2 protocol if both are
available.

Additionally, renames the event handler to follow the Wayland interface
name, for consistency with the rest of the codebase.
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.
…hape2D

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.
…dering

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.
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.
Despaghettify NavigationServer path queries.
…-the-trailing-zero

Update documentation's "Prints" comments after #47502
…sion

`CompositorEffect` should use `GDVIRTUAL_CALL()` so it works with GDExtension
Implement `RD::buffer_get_data_async()` and `RD::texture_get_data_async()`
…bit-hoole

Fix C# boolean "Prints" comments in documentation
mbedtls: Update to upstream 3.6.2
…-bind

Add missing `GDVIRTUAL_BIND()` for `AudioStream::_has_loop()` and `::_get_bar_beats()`
Keep processing Graphics if there are pending operations
Despaghettify NavigationServer path queries
…-drag

Allow canceling drag-and-drop with right mouse button
Add `samplerExternalOES` type to shader globals
Document `_process()` and `_physics_process()` delta behavior at low FPS
…size

Replace `textureSize()` with a uniform in BaseMaterial3D for MSDF rendering
[Shader Language] Add missing token name.
GitHub Actions: Use quiet xmllint output to only print error lines
…imental-annotations

Tweak unknown annotation GDScript error for `@deprecated`/`@experimental`/`@tutorial`
[Windows & macOS] Fix popup window shows behind `always_on_top` parent.
Add basic editor editing for `ConvexPolygonShape2D` and `ConcavePolygonShape2D`
…-formatting

Tweak warning/error formatting in EditorLog to be closer to console output
Change some image error messages to output the file path
Fix Lock and Group for canvas items not updated in editor after changed in SceneTree
Clarify `limit_length()` for infinite vectors
…ptions

Improve editor file dialog options
Fix user selection on top of `bgcolor` areas in a `RichTextLabel`
Fix shader crash when using varyings with non-`flat` integer type
Wayland: Add support for xdg-foreign-unstable-v2
@pull pull bot added the ⤵️ pull label Dec 12, 2024
@pull pull bot merged commit 3877573 into jcalifornia:master Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.