No description
Find a file
Matias N. Goldberg 472226422e Fix uninitialized variable ending up sent to Vulkan
The first time a shader is compiled Godot performs the following:

```cpp
for (uint32_t i = 0; i < SHADER_STAGE_MAX; i++) {
	if
(spirv_data.push_constant_stages_mask.has_flag((ShaderStage)(1 << i))) {
		binary_data.push_constant_vk_stages_mask |=
shader_stage_masks[i];
	}
}
```

However binary_data.push_constant_vk_stages_mask is never initialized to
0 and thus contains garbage data or'ed with the good data.

This value is used by push constants (and many other things) thus it can
be a big deal.

Fortunately because the relevant flags are always guaranteed to be set
(but not guaranteed to be unset), the damage is restricted to:

1. Performance (unnecessary flushing & over-excessive barriers)
2. Overwriting push descriptors already set (this would be serious,
doesn't seem to be an issue)
3. Driver implementations going crazy when they see bits set they don't
expect (unknown if this is an issue)

This uninitialized value is later saved into the binary cache.

Valgrind is able to detect this bug on the first run, but not on the
subsequent ones because they data comes from a file.

cache_file_version has been bumped to force rebuild of all cached
shaders. Because the ones generated so far are compromised.
2023-07-29 18:28:33 -03:00
.github
core Merge pull request #79953 from RandomShaper/revert_wtp_for_range 2023-07-27 15:23:01 +02:00
doc Initialize MSDF parameters in BaseMaterial3D with default 2023-07-28 13:24:44 +02:00
drivers Fix uninitialized variable ending up sent to Vulkan 2023-07-29 18:28:33 -03:00
editor Fix life cycle of ResourceImporterTexture better 2023-07-28 11:52:09 +02:00
main
misc
modules Merge pull request #79405 from Calinou/doc-import-options 2023-07-27 20:32:04 +02:00
platform Merge pull request #63826 from deakcor/dev_clipboard 2023-07-27 15:22:16 +02:00
scene Initialize MSDF parameters in BaseMaterial3D with default 2023-07-28 13:24:44 +02:00
servers Fix uninitialized variable ending up sent to Vulkan 2023-07-29 18:28:33 -03:00
tests Revert "Implement parallel foreach() for easier multithreading" 2023-07-27 13:41:27 +02:00
thirdparty [ENet] Update to upstream master. 2023-07-20 12:20:14 +02:00
.clang-format
.clang-tidy
.editorconfig
.git-blame-ignore-revs
.gitattributes
.gitignore
.lgtm.yml
.mailmap
AUTHORS.md
CHANGELOG.md
CONTRIBUTING.md
COPYRIGHT.txt
DONORS.md
gles3_builders.py
glsl_builders.py
icon.png
icon.svg
icon_outlined.png
icon_outlined.svg
LICENSE.txt
logo.png
logo.svg
LOGO_LICENSE.md
logo_outlined.png
logo_outlined.svg
methods.py
platform_methods.py
README.md
SConstruct
scu_builders.py
version.py

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported with one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in the Godot Engine editor

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the homepage.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

The best way to get in touch with the core engine developers is to join the Godot Contributors Chat.

To get started contributing to the project, see the contributing guide.

Documentation and demos

The official documentation is hosted on Read the Docs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

We also maintain official demos in their own GitHub repository as well as a list of awesome Godot community resources.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Code Triagers Badge Translate on Weblate TODOs