Skip to content

Commit

Permalink
Merge pull request #4 from godotengine/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
prfiredragon authored Oct 11, 2024
2 parents 8a5654b + 92e51fc commit 92ce481
Show file tree
Hide file tree
Showing 36 changed files with 486 additions and 222 deletions.
64 changes: 45 additions & 19 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Each line is a file pattern followed by one or more owners.
# Owners can be @users, @org/teams or emails

# Buildsystem
# Buildsystem (Before everything to be overwritten)

* @godotengine/buildsystem

Expand All @@ -17,10 +17,11 @@
# Doc

/doc/ @godotengine/documentation
**/doc_classes/ @godotengine/documentation

# Drivers

/drivers/ @godotengine/_systems

## Audio
/drivers/alsa/ @godotengine/audio
/drivers/alsamidi/ @godotengine/audio
Expand All @@ -34,7 +35,9 @@
## Rendering
/drivers/d3d12/ @godotengine/rendering
/drivers/dummy/ @godotengine/rendering
/drivers/egl/ @godotengine/rendering
/drivers/gles3/ @godotengine/rendering
/drivers/metal/ @godotengine/rendering
/drivers/spirv-reflect/ @godotengine/rendering
/drivers/vulkan/ @godotengine/rendering

Expand All @@ -47,18 +50,19 @@

# Editor

/editor/*debugger* @godotengine/debugger
/editor/ @godotengine/_editor
/editor/**/*2d* @godotengine/2d-editor
/editor/**/*3d* @godotengine/3d-editor
/editor/**/*code* @godotengine/script-editor
/editor/**/*debugger* @godotengine/debugger
/editor/**/*dock* @godotengine/docks
/editor/**/*script* @godotengine/script-editor
/editor/**/*shader* @godotengine/shaders
/editor/debugger/ @godotengine/debugger
/editor/gui/ @godotengine/usability @godotengine/gui-nodes
/editor/icons/ @godotengine/usability
/editor/import/ @godotengine/import
/editor/plugins/*2d_*.* @godotengine/2d-editor
/editor/plugins/*3d_*.* @godotengine/3d-editor
/editor/plugins/script_*.* @godotengine/script-editor
/editor/plugins/*shader*.* @godotengine/shaders
/editor/themes/ @godotengine/usability @godotengine/gui-nodes
/editor/code_editor.* @godotengine/script-editor
/editor/*dock*.* @godotengine/docks
/editor/*shader*.* @godotengine/shaders

# Main

Expand All @@ -71,9 +75,16 @@

# Modules

/modules/ @godotengine/_engine
/modules/**/doc_classes/ @godotengine/_engine @godotengine/documentation
/modules/**/editor/ @godotengine/_engine @godotengine/_editor
/modules/**/icons/ @godotengine/_engine @godotengine/usability
/modules/**/tests/ @godotengine/_engine @godotengine/tests

## Audio (+ video)
/modules/interactive_music/ @godotengine/audio
/modules/interactive_music/doc_classes/ @godotengine/audio @godotengine/documentation
/modules/interactive_music/editor/ @godotengine/audio @godotengine/_editor
/modules/minimp3/ @godotengine/audio
/modules/minimp3/doc_classes/ @godotengine/audio @godotengine/documentation
/modules/ogg/ @godotengine/audio
Expand All @@ -93,8 +104,10 @@
/modules/etcpak/ @godotengine/import
/modules/fbx/ @godotengine/import
/modules/fbx/doc_classes/ @godotengine/import @godotengine/documentation
/modules/fbx/editor/ @godotengine/import @godotengine/_editor
/modules/gltf/ @godotengine/import
/modules/gltf/doc_classes/ @godotengine/import @godotengine/documentation
/modules/gltf/editor/ @godotengine/import @godotengine/_editor
/modules/gltf/tests/ @godotengine/import @godotengine/tests
/modules/hdr/ @godotengine/import
/modules/jpg/ @godotengine/import
Expand All @@ -112,12 +125,14 @@
/modules/mbedtls/tests/ @godotengine/network @godotengine/tests
/modules/multiplayer/ @godotengine/network
/modules/multiplayer/doc_classes/ @godotengine/network @godotengine/documentation
/modules/multiplayer/editor/ @godotengine/network @godotengine/_editor
/modules/upnp/ @godotengine/network
/modules/upnp/doc_classes/ @godotengine/network @godotengine/documentation
/modules/webrtc/ @godotengine/network
/modules/webrtc/doc_classes/ @godotengine/network @godotengine/documentation
/modules/websocket/ @godotengine/network
/modules/websocket/doc_classes/ @godotengine/network @godotengine/documentation
/modules/websocket/editor/ @godotengine/network @godotengine/_editor

## Physics
/modules/godot_physics_2d/ @godotengine/physics
Expand All @@ -134,12 +149,14 @@
## Scripting
/modules/gdscript/ @godotengine/gdscript
/modules/gdscript/doc_classes/ @godotengine/gdscript @godotengine/documentation
/modules/gdscript/editor/ @godotengine/gdscript @godotengine/_editor
/modules/gdscript/icons/ @godotengine/gdscript @godotengine/usability
/modules/gdscript/tests/ @godotengine/gdscript @godotengine/tests
/modules/jsonrpc/ @godotengine/gdscript @godotengine/network
/modules/jsonrpc/tests @godotengine/gdscript @godotengine/network @godotengine/tests
/modules/mono/ @godotengine/dotnet
/modules/mono/doc_classes/ @godotengine/dotnet @godotengine/documentation
/modules/mono/editor/ @godotengine/dotnet @godotengine/_editor
/modules/mono/icons/ @godotengine/dotnet @godotengine/usability

## Text
Expand All @@ -156,19 +173,24 @@
/modules/mobile_vr/doc_classes/ @godotengine/xr @godotengine/documentation
/modules/openxr/ @godotengine/xr
/modules/openxr/doc_classes/ @godotengine/xr @godotengine/documentation
/modules/openxr/editor/ @godotengine/xr @godotengine/_editor
/modules/webxr/ @godotengine/xr
/modules/webxr/doc_classes/ @godotengine/xr @godotengine/documentation

## Misc
/modules/csg/ @godotengine/3d-nodes
/modules/csg/doc_classes/ @godotengine/3d-nodes @godotengine/documentation
/modules/csg/editor/ @godotengine/3d-nodes @godotengine/_editor
/modules/csg/icons/ @godotengine/3d-nodes @godotengine/usability
/modules/navigation/ @godotengine/navigation
/modules/gridmap/ @godotengine/3d-nodes
/modules/gridmap/doc_classes/ @godotengine/3d-nodes @godotengine/documentation
/modules/gridmap/editor/ @godotengine/3d-nodes @godotengine/_editor
/modules/gridmap/icons/ @godotengine/3d-nodes @godotengine/usability
/modules/navigation/ @godotengine/navigation
/modules/navigation/editor/ @godotengine/navigation @godotengine/_editor
/modules/noise/ @godotengine/core
/modules/noise/doc_classes/ @godotengine/core @godotengine/documentation
/modules/noise/editor/ @godotengine/core @godotengine/_editor
/modules/noise/icons/ @godotengine/core @godotengine/usability
/modules/noise/tests/ @godotengine/core @godotengine/tests
/modules/regex/ @godotengine/core
Expand All @@ -180,6 +202,7 @@

# Platform

/platform/ @godotengine/_platforms
/platform/android/ @godotengine/android
/platform/android/doc_classes/ @godotengine/android @godotengine/documentation
/platform/ios/ @godotengine/ios
Expand All @@ -195,6 +218,7 @@

# Scene

/scene/ @godotengine/_systems @godotengine/core
/scene/2d/ @godotengine/2d-nodes
/scene/2d/physics/ @godotengine/2d-nodes @godotengine/physics
/scene/3d/ @godotengine/3d-nodes
Expand All @@ -213,14 +237,16 @@

# Servers

/servers/audio* @godotengine/audio
/servers/camera* @godotengine/xr
/servers/display_server.* @godotengine/_platforms
/servers/navigation_server*.* @godotengine/navigation
/servers/physics* @godotengine/physics
/servers/rendering* @godotengine/rendering
/servers/text_server.* @godotengine/gui-nodes
/servers/xr* @godotengine/xr
/servers/ @godotengine/_systems
/servers/**/audio* @godotengine/audio
/servers/**/camera* @godotengine/xr
/servers/**/debugger* @godotengine/debugger
/servers/**/display* @godotengine/_platforms
/servers/**/navigation* @godotengine/navigation
/servers/**/physics* @godotengine/physics
/servers/**/rendering* @godotengine/rendering
/servers/**/text* @godotengine/gui-nodes
/servers/**/xr* @godotengine/xr

# Tests

Expand Down
27 changes: 21 additions & 6 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,32 @@ jobs:
# Skip debug symbols, they're way too big with MSVC.
sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
bin: ./bin/godot.windows.editor.x86_64.exe
artifact: true
compiler: msvc

- name: Editor w/ clang-cl (target=editor, tests=yes, use_llvm=yes)
cache-name: windows-editor-clang
target: editor
tests: true
sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
bin: ./bin/godot.windows.editor.x86_64.llvm.exe
compiler: clang

- name: Template (target=template_release, tests=yes)
cache-name: windows-template
target: template_release
tests: true
sconsflags: debug_symbols=no
bin: ./bin/godot.windows.template_release.x86_64.console.exe
artifact: true
compiler: msvc

- name: Template w/ GCC (target=template_release, tests=yes, use_mingw=yes)
cache-name: windows-template-gcc
# MinGW takes MUCH longer to compile; save time by only targeting Template.
target: template_release
tests: true
sconsflags: debug_symbols=no use_mingw=yes
bin: ./bin/godot.windows.template_release.x86_64.console.exe
compiler: gcc

steps:
- name: Checkout
Expand All @@ -69,16 +79,21 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@1.1.2
with:
repo: godotengine/godot-angle-static
version: tags/chromium/6029
file: Windows.6029-1.MSVC_17.x86_64.x86_32.zip
version: tags/chromium/6601.2
file: godot-angle-static-x86_64-${{ matrix.compiler == 'gcc' && 'gcc' || 'msvc' }}-release.zip
target: angle/angle.zip

- name: Extract pre-built ANGLE static libraries
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/

- name: Setup MSVC problem matcher
if: matrix.compiler == 'msvc'
uses: ammaraskar/msvc-problem-matcher@master

- name: Setup GCC problem matcher
if: matrix.compiler != 'msvc'
uses: ammaraskar/gcc-problem-matcher@master

- name: Compilation
uses: ./.github/actions/godot-build
with:
Expand All @@ -94,12 +109,12 @@ jobs:
continue-on-error: true

- name: Prepare artifact
if: ${{ matrix.artifact }}
if: matrix.compiler == 'msvc'
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
- name: Upload artifact
if: ${{ matrix.artifact }}
if: matrix.compiler == 'msvc'
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
Expand Down
18 changes: 6 additions & 12 deletions core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1167,22 +1167,16 @@ bool ProjectSettings::is_project_loaded() const {
}

bool ProjectSettings::_property_can_revert(const StringName &p_name) const {
if (!props.has(p_name)) {
return false;
}

return props[p_name].initial != props[p_name].variant;
return props.has(p_name);
}

bool ProjectSettings::_property_get_revert(const StringName &p_name, Variant &r_property) const {
if (!props.has(p_name)) {
return false;
const RBMap<StringName, ProjectSettings::VariantContainer>::Element *value = props.find(p_name);
if (value) {
r_property = value->value().initial.duplicate();
return true;
}

// Duplicate so that if value is array or dictionary, changing the setting will not change the stored initial value.
r_property = props[p_name].initial.duplicate();

return true;
return false;
}

void ProjectSettings::set_setting(const String &p_setting, const Variant &p_value) {
Expand Down
12 changes: 7 additions & 5 deletions core/math/geometry_2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
#define STB_RECT_PACK_IMPLEMENTATION
#include "thirdparty/misc/stb_rect_pack.h"

#define PRECISION 5 // Based on CMP_EPSILON.
const int clipper_precision = 5; // Based on CMP_EPSILON.
const double clipper_scale = Math::pow(10.0, clipper_precision);

Vector<Vector<Vector2>> Geometry2D::decompose_polygon_in_convex(const Vector<Point2> &polygon) {
Vector<Vector<Vector2>> decomp;
Expand Down Expand Up @@ -224,7 +225,7 @@ Vector<Vector<Point2>> Geometry2D::_polypaths_do_operation(PolyBooleanOperation
path_b[i] = PointD(p_polypath_b[i].x, p_polypath_b[i].y);
}

ClipperD clp(PRECISION); // Scale points up internally to attain the desired precision.
ClipperD clp(clipper_precision); // Scale points up internally to attain the desired precision.
clp.PreserveCollinear(false); // Remove redundant vertices.
if (is_a_open) {
clp.AddOpenSubject({ path_a });
Expand Down Expand Up @@ -298,9 +299,10 @@ Vector<Vector<Point2>> Geometry2D::_polypath_offset(const Vector<Point2> &p_poly
}

// Inflate/deflate.
PathsD paths = InflatePaths({ polypath }, p_delta, jt, et, 2.0, PRECISION, 0.0);
// Here the miter_limit = 2.0 and arc_tolerance = 0.0 are Clipper2 defaults,
// and the PRECISION is used to scale points up internally, to attain the desired precision.
PathsD paths = InflatePaths({ polypath }, p_delta, jt, et, 2.0, clipper_precision, 0.25 * clipper_scale);
// Here the points are scaled up internally and
// the arc_tolerance is scaled accordingly
// to attain the desired precision.

Vector<Vector<Point2>> polypaths;
for (PathsD::size_type i = 0; i < paths.size(); ++i) {
Expand Down
3 changes: 2 additions & 1 deletion doc/classes/Environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@
The background mode. See [enum BGMode] for possible values.
</member>
<member name="fog_aerial_perspective" type="float" setter="set_fog_aerial_perspective" getter="get_fog_aerial_perspective" default="0.0">
If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky]. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY].
If set above [code]0.0[/code] (exclusive), blends between the fog's color and the color of the background [Sky], as read from the radiance cubemap. This has a small performance cost when set above [code]0.0[/code]. Must have [member background_mode] set to [constant BG_SKY].
This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to [code]1.0[/code], the fog color comes completely from the [Sky]. If set to [code]0.0[/code], aerial perspective is disabled.
Notice that this does not sample the [Sky] directly, but rather the radiance cubemap. The cubemap is sampled at a mipmap level depending on the depth of the rendered pixel; the farther away, the higher the resolution of the sampled mipmap. This results in the actual color being a blurred version of the sky, with more blur closer to the camera. The highest mipmap resolution is used at a depth of [member Camera3D.far].
</member>
<member name="fog_density" type="float" setter="set_fog_density" getter="get_fog_density" default="0.01">
The fog density to be used. This is demonstrated in different ways depending on the [member fog_mode] mode chosen:
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/PackedVector2Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</brief_description>
<description>
An array specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector3Array] versus [code]Array[Vector2][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Differences between packed arrays, typed arrays, and untyped arrays:[/b] Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. [PackedVector2Array] versus [code]Array[Vector2][/code]). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as [method Array.map]. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
[b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
</description>
<tutorials>
Expand Down
6 changes: 6 additions & 0 deletions drivers/d3d12/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ from misc.utility.scons_hints import *
import os
from pathlib import Path

import methods

Import("env")

env_d3d12_rdd = env.Clone()
Expand Down Expand Up @@ -139,6 +141,10 @@ else:
extra_defines += [
"HAVE_STRUCT_TIMESPEC",
]
if methods.using_gcc(env) and methods.get_compiler_version(env)["major"] < 13:
# `region` & `endregion` not recognized as valid pragmas.
env_d3d12_rdd.Append(CCFLAGS=["-Wno-unknown-pragmas"])
env.Append(CCFLAGS=["-Wno-unknown-pragmas"])

# This is needed since rendering_device_d3d12.cpp needs to include some Mesa internals.
env_d3d12_rdd.Prepend(CPPPATH=mesa_private_inc_paths)
Expand Down
2 changes: 1 addition & 1 deletion drivers/d3d12/dxil_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void compute_dxil_hash(const BYTE *pData, UINT byteCount, BYTE *pOutHash) {
UINT NextEndState = bTwoRowsPadding ? N - 2 : N - 1;
const BYTE *pCurrData = pData;
for (UINT i = 0; i < N; i++, offset += 64, pCurrData += 64) {
UINT x[16];
UINT x[16] = {};
const UINT *pX;
if (i == NextEndState) {
if (!bTwoRowsPadding && i == N - 1) {
Expand Down
Loading

0 comments on commit 92ce481

Please sign in to comment.