Extend max level to include i for writing and so fb is complete and avoid resulting errors like:
"Framebuffer is incomplete: Attachment level is not in the [base level, max level] range".
(cherry picked from commit e9bbe6fc78)
And anything that uses luminance.
The class Luminance in luminance.cpp is in charge of averaging the
luminance of all pixels.
It performs multiple passes until it reaches a 1x1 texture containing
the total average. This is standard luminance averaging on GPU.
Then the "result" of this frame and the "prev_frame_result" are averaged
together at a certain speed to mimic eye adaptation.
Then this avarege becomes the "source" for the next frame. This is done
here:
```cpp
SWAP(p_luminance_buffers->current,
p_luminance_buffers->reduce.write[p_luminance_buffers->reduce.size() -
1]);
```
So far pretty normal stuff.
**The problem is: prev_frame_result IS UNINITIALIZED**. Therefore it's
possible for prev_frame_result to contain garbage values like -5+e15
which causes the screen to stay black for a minute until eye adaptation
catches up.
Windows will always force allocations to be reset to 0, but Linux does
not do that.
However Windows just delays the bug; because it's possible for VMA to
reuse a block.
You can repro this bug by downloading Bistro, creating a camera,
selecting a default scene; and then launching Bistro.
Everything will work fine.
Until you decide to resize the window. It takes a few tries on Godot,
but eventually the screen becomes black.
If you wait around a minute, the screen will "unblack" itself back to
normal.
Even if it's not stuck in black after resize, you may notice that every
resize is inconsistent in how the eye adaptation catches up (i.e.
sometimes it flashes to white, sometimes it does not).
If you can't repro the bug, you need to try harder by doing arbitrary
resizes until it triggers.
Also, I advise to try this on Linux; since Windows' sanitization of
memory gets in the way.
There's probably multiple tickets already filled around issues that were
rooted in luminance calculations starting from uninitialized memory.
This PR sets a default value of 0, which causes the screen to always
flash white after resize. Setting a different value like 0.1 makes the
flash effect weaker. Setting it to a high value like 5.0 makes the
screen flash from dark instead.
This bug can be backported to 4.3. I don't know if it can be backported
to earlier; as the render graph makes sure the texture_clear() calls
gets issued in the right place; whereas in <= 4.2 it might be
problematic depending on when Luminance::LuminanceBuffers::configure is
being called.
(cherry picked from commit 8888f9e649)
- Allow mouse capture to be enabled in `_ready`
- Update the input handler logic to avoid dropping mouse captured motion events
(cherry picked from commit bea6472ea4)
The app was restarting unexpectedly due to missing configChanges flags.
Added "locale|layoutDirection" to AndroidManifest.xml to prevent activity recreation.
(cherry picked from commit 1c02316365)
If the allocation is small enough that it enters the
if (p_size <= SMALL_ALLOCATION_MAX_SIZE) {} block, Godot would call
vmaFindMemoryTypeIndexForBufferInfo with the wrong parameters.
This can cause vmaFindMemoryTypeIndexForBufferInfo to potentially
misbehave on some cards or drivers.
Fixes regression introduced in #102830
Might potentially reopen#101850 (I doubt it, but it's possible)
Must be backported to 4.4
(cherry picked from commit c543c5615c)
Avoids updating the platform-specific `TargetFramework` properties if they already match the minimum required version.
(cherry picked from commit 57d5b664d3)
This aims to fix the idle CPU utilization regression from 4.3 to 4.4
by reverting to the previous approach, but only when low-processor mode
is enabled.
(cherry picked from commit 03b4e0dd58)
Another massive release with close to 3000 commits (excluding merge commits),
with a big focus on improvements to the overall workflow and usability of the
editor.
Engine features didn't want to be left out amidst this usability focus though,
and this release is absolutely feature-packed in all areas.
See the release page for details: https://godotengine.org/releases/4.4/
More than 500 contributors were involved in this new feature release,
and we want to thank them all for their amazing contributors, as well
as all users who sponsor the Development Fund, reported bugs, opened
proposals, or supported each other on our community platforms.
This should address crashes reported on the Play store. Note that those crashes lack debug symbols which reduces our ability to narrow down the exact cause of the crash. We aim to resolve that in Godot 4.5.