Commit Graph

55678 Commits

Author SHA1 Message Date
Markus Sauermann 45718ef635 Fix superfluous `"` in error message
(cherry picked from commit fa8fec2cc1)
2023-09-21 15:14:04 +02:00
jsjtxietian 2e71f6a806 fix glMapBufferRange return null when r_index + last_item_index > max_instances
(cherry picked from commit d48b95a305)
2023-09-21 15:12:59 +02:00
Ninni Pipping dfdb6e576c Fix some mixups between 2D/3D in documentation
(cherry picked from commit 7512d88e22)
2023-09-21 15:12:58 +02:00
ocean (they/them) 0b38cf8a8d Add error message when a GDScript resource fails to load.
Currently, GDScripts who are only loaded through `ResourceLoader::load()`,
like Autoloads, do not have a pathway to announce there is an error in their
code. This contributes to significant confusion in error projects when
autoloads are involved. At least partially closes #78230.

(cherry picked from commit cca57171c1)
2023-09-21 15:12:58 +02:00
Lyuma 58e3dd6999 Add missing is_deprecated flag on the SurfaceTool.generate_lod function.
(cherry picked from commit 8153739df9)
2023-09-21 15:12:58 +02:00
Raul Santos a07b83a2dc C#: Hide hostfxr not found error
Godot tries to find hostfxr in two locations, the method that tries
to retrieve the location printed an error when it was not found.
So when the first location fails it was printing an error, even if
the second location succeeded, and users were left confused thinking
there was something wrong with their installation.

Now the error will only be printed when stdout verbose is enabled.
Users will still get an error later if hostfxr is not found in any
of the two locations.

(cherry picked from commit 394c0eb225)
2023-09-21 14:57:13 +02:00
bruvzg 88afb1a8ba [String] Fix string conversion for -0.0 float values.
(cherry picked from commit 2b3bbde6da)
2023-09-21 14:57:13 +02:00
Emmanouil Papadeas 252d816459 Fix `JavaScriptBridge.eval()` never returning PackedByteArray
It wrongly returned 20 on array buffers, which used to be the enumerator
value of Godot 3.x's type PoolByteArray, and now is the value of type Color,
while it should return 29 which is the enumerator value for PackedByteArray.

(cherry picked from commit c662491bd4)
2023-09-21 14:57:13 +02:00
Chia-Hsiang Cheng cdc0e00557 Draw separators before selected style boxes
(cherry picked from commit 749db00227)
2023-09-21 14:57:13 +02:00
Eoin O'Neill 58ff96b8b7 Prevent double input events on gamepad when running through steam input
During GDC and general testing on Steam Deck units, we found that single
gamepads would often register inputs twice under certain circumstances.
This was caused by SteamInput creating a new virtual device, which Godot
registers as a second gamepad. This resulted in two gamepad devices
reporting the same button presses, often leading to buggy input response
on games with no multi-device logic and other-wise could cause intended
Steam rebindings to not work as intended (for example, swapping o and x
on a playstation pad if that feature isn't supported by the game.)

SDL gets around this by taking in a list of devices that are to be
ignored. When valve sees a controller that wants to be rebound via
SteamInput, they push a new VID/PID entry onto the environment
variable `SDL_GAMECONTROLLER_IGNORE_DEVICES` for the original gamepad
so that all game inputs can be read from the virtual gamepad instead.

This leverages the same logic as we are already using SDL gamepad
related HID mappings.

(cherry picked from commit 8de98dbf21)
2023-09-21 14:57:13 +02:00
Hugo Locurcio 2d480eb632 Uncollapse favorites by default in the editor FileSystem dock
(cherry picked from commit 075bd4b281)
2023-09-21 14:57:13 +02:00
Dario 29bcc51734 Add half-pixel offset to lightmapper rasterization.
Add half-pixel offset to lightmapper to fix issues where the ray would be generated from the wrong spot corresponding to the pixel and causing light leaks. Fixes Issue #69126.

(cherry picked from commit ddc3126bbf)
2023-09-21 14:57:13 +02:00
Dario 1bcb77fb15 Add motion vector support for GPU 3D Particles.
Add the capability of resizing the transforms buffer for particles to be double its size and alternate where the current output is written to. Only works for particles that use index as their draw order.

(cherry picked from commit 293302ccd8)
2023-09-21 14:20:04 +02:00
Dario 1f18125652 Fix incorrect error checking and notifications introduced in PR #80414.
There was an error in the other branch of the refactored function where the size of the array was not properly multiplied by the size of the float to check against the buffer size. This was only an error in the error-checking itself and not the functionality. There was also an error where the proper notification was not emitted whenever the buffer for the multimesh is recreated to invalidate the previous references the renderer might've created to it. This fixes CPU Particles getting corrupted when they're created without emission being enabled.

(cherry picked from commit 420f3890b0)
2023-09-21 14:20:04 +02:00
Dario b447e1baaf Improve handling of motion vectors for multimesh instances.
Fixes #67287. There was a subtle error where due to how enabling motion vectors for multi-meshes was handled, only the first instance would have a valid transforms buffer and the rest would point to an invalid buffer. This change moves over the responsibility of enabling motion vectors only when changes happen to the individual 3D transforms or the entire buffer itself. It also fixes an unnecessary download of the existing buffer that'd get overwritten by the current cache if it exists. Another fix is handling the case where the buffer was not set, and enabling motion vectors would not cause the buffer to be recreated correctly.

(cherry picked from commit 5155870d64)
2023-09-21 14:20:04 +02:00
Matias N. Goldberg efbe9237cc Fix integer underflow when rounding up in VoxelGI
The code wanted to divide and round up:
 - 0 / 64 = 0
 - 63 / 64 = 1
 - 64 / 64 = 1
 - 65 / 64 = 2

However when the dividend was exactly 0 it would underflow and produce
67108864 instead.

This caused TDRs on empty scenes or extremely slow performance

Fix #80286

(cherry picked from commit e783e32108)
2023-09-21 14:09:19 +02:00
Yogendra Manawat a90aac5415 Fix TabContainer's font_hovered_color theme property
(cherry picked from commit d7bf05b490)
2023-09-21 14:09:19 +02:00
bitsawer 904582b4a8 Fix Vulkan texture update
(cherry picked from commit 3daa19dd95)
2023-09-21 14:09:19 +02:00
bitsawer bc95b36fbf Clear SDFGI textures when created
(cherry picked from commit 09c887ce82)
2023-09-21 14:09:19 +02:00
Haoyu Qiu 9dfb3ddad5 Fix ItemList not update when icon scale changes
(cherry picked from commit 1bf4c12c0a)
2023-09-21 14:09:19 +02:00
Hugo Locurcio a972686972 Clamp Volumetric Fog Length property to prevent rendering issues
A length of 0 units doesn't make sense anyway.

(cherry picked from commit 8041cff865)
2023-09-21 14:09:19 +02:00
Haoyu Qiu de5a7b3764 Fix Button text when overrun is not trim nothing
(cherry picked from commit 7f70ac56a0)
2023-09-21 14:09:19 +02:00
Danil Alexeev 102f93b8b8 GDScript: Fix conflict between property and group names
(cherry picked from commit bf8f996212)
2023-09-21 14:09:19 +02:00
A Thousand Ships c4be3487ca Make editor camera speed indicator use `m/s` and `m`
(cherry picked from commit 8d7a2c615c)
2023-09-21 14:09:19 +02:00
A Thousand Ships 485d53133d Add check to ensure registered classes are declared
Checks that all classes registered to `ClassDB` have been properly
declared with `GDCLASS`

(cherry picked from commit c638238fae)
2023-09-21 13:50:25 +02:00
clayjohn 5261d12a66 Enable depth writes during shadow pass and depth pass. Disable during color pass
This fixes an unreported performance bug. Basically, without this change, the depth prepass did nothing

(cherry picked from commit b986afed46)
2023-09-21 13:50:25 +02:00
Yuri Sizov 08bd6ba734 Check the native base of scripts when resolving icons
(cherry picked from commit 21c5f86d5d)
2023-09-21 13:35:31 +02:00
kobewi a5b59b596f Don't grab theme icons for scripts
(cherry picked from commit 51f92d1100)
2023-09-21 13:34:46 +02:00
Adam Scott 4f59255059 Fix file permissions for the web platform
(cherry picked from commit b6faccccd5)
2023-09-21 13:34:46 +02:00
Rémi Verschelde 269b115d9c SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.

(cherry picked from commit 3907e53ff6)
2023-09-20 22:44:05 +02:00
Rémi Verschelde 8be838481d Allow unbundling OpenXR (for Linux distros)
Copy XrMatrix4x4f_CreateProjectionFov to our OpenXRUtil, instead of relying
on a private header.

(cherry picked from commit 34a07b81ae)
2023-09-20 22:44:05 +02:00
bruvzg a4c041b6b6 [macOS] Workaround Xcode 15 linker bug.
(cherry picked from commit 6da8c7a662)
2023-09-20 22:44:05 +02:00
Valery Zhuk 94dfa4eaf9 fix build options configuration for Visual Studio projects
(cherry picked from commit 6158578087)
2023-09-20 22:44:04 +02:00
Dario 5f7685c831 Carry over the windows_subsystem setting to the generated vsproj if it's not the default.
Even if you specify the subsystem to be the console one, the vsproj doesn't carry over the setting, which makes working with this mode in the IDE a bit annoying since it'll regenerate the vsproj right afterwards. Since there's only two options and 'gui' is the default, we only carry over the 'console' setting.

(cherry picked from commit cda4b4ebf3)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 12aeb83043 Web: Fix version check for missing scalbnf LTO workaround
The check needs to happen after we set `env["CXX"]`.
Follow-up to #81340.

(cherry picked from commit 50161808c2)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 6122cf3178 Web: Workaround Emscripten 3.1.42+ LTO regression
Fixes #80010.

(cherry picked from commit b064008c07)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 9fb23c4e56 CI: Bump version for `actions/checkout@v4` and `actions/setup-dotnet@v3`
(cherry picked from commit de14f1d295)
2023-09-20 22:44:04 +02:00
ocean (they/them) cd2e003a05 Build system: add option for MSVC incremental linking.
(cherry picked from commit bbafe14970)
2023-09-20 22:44:04 +02:00
bruvzg d3265cf518 [Windows] Add main executable to the console wrapper dependencies to prevent simultaneous linking.
(cherry picked from commit f37ace7036)
2023-09-20 22:44:04 +02:00
Rémi Verschelde e30ff075ce CI: Propagated error code when glue generation fails
This used to be ignored as we ran the X11 version with Vulkan software renderer and xvfb-run, which could crash at the time. Now that we have headless mode, this is not a problem anymore.

(cherry picked from commit 5eb8253fc0)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 21adf29b8e SCons: Enable `/WX` on LINKFLAGS for MSVC with `werror=yes`
(cherry picked from commit 30bdb23f03)
2023-09-20 22:44:04 +02:00
Rémi Verschelde cdce948473 Fix GCC -Wmaybe-uninitialized warnings
(cherry picked from commit efdff9cbc2)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 32b7664371 SCons: Disable misbehaving MSVC incremental linking
Fixes #77968.

(cherry picked from commit bc1aef88ee)
2023-09-20 22:44:04 +02:00
bruvzg ee009d26da Fix API validation script on macOS.
(cherry picked from commit 231c07d1af)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 3076f2f9c9 CI: Make extension API compatibility check mandatory
This means that any PR which breaks the extension API should
handle it properly, that is:

- Add compatibility methods to ensure that existing function hashes work
- Document the changes in the relevant misc/extension_api_validation/ file

(cherry picked from commit a890457693)
2023-09-20 22:44:04 +02:00
kobewi ef1d0cda30 Automatically add path to built-in scripts
(cherry picked from commit ed6ad376c6)
2023-09-20 22:44:04 +02:00
William Edwards 9332a2b387 Fix dumping of signal API parameters
(cherry picked from commit 188132884d)
2023-09-20 22:44:04 +02:00
Dario f6f2b0897a Propagate error correctly when max texture size for lightmaps is too small.
Add error handling for BAKE_ERROR_LIGHTMAP_TOO_SMALL, which was previously ignored. Fixes #81453.

(cherry picked from commit 7dfb854556)
2023-09-20 22:44:04 +02:00
jsjtxietian f2b6eda210 Fix a crash when enable a plugin uses `make_mesh_previews`
The bug happens when plugin tree is propagating mouse events
(so it is blocked), but EditorProgress's dtor will make main editor
focused and call update_plugins immediately
 which will update the blocked tree.

(cherry picked from commit 7e3a762369)
2023-09-20 22:44:04 +02:00
Danil Alexeev 6d5127d34b Core: Fix recursion level check for `VariantWriter::write()` with objects
(cherry picked from commit 5d689ad560)
2023-09-20 22:44:04 +02:00