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

Merge commit godotengine/godot@b15b24b #951

Merged
merged 47 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a85b027
fix: space transformations in WorldPositionFromDepth visual shader no…
Namey5 Dec 13, 2024
0edd24d
Ensure icon and splash paths on export
Summersay415 Dec 30, 2024
8274e64
Fix TextEdit breakpoint hover not hiding
kitbdev Jan 15, 2025
605b970
Fix create_instance in android GodotApp so non-editor apps can restart
jamie-pate Jan 2, 2025
bed2a19
Wayland: Check selection devices before using them
Riteo Jan 18, 2025
9014cdb
Fix ResourceLoader.has_cached() and ResourceLoader.get_cached_ref() n…
MTareqAzim Jan 18, 2025
b753b87
Android Editor: Disable magnify gesture in the ScriptEditor
syntaxerror247 Jan 20, 2025
b8480ff
CI: Change godot-cpp from workflow to action
Repiteo Oct 1, 2024
be7a6d2
Fix URLs for Cubemap template images in documentation
Calinou Jan 20, 2025
ae0b7ff
Fix Embedded Game Size
Hilderin Jan 20, 2025
9eed43d
Fix NOTIFICATION_WM_CLOSE_REQUEST in Embedded Floating Window
Hilderin Jan 22, 2025
a6da0aa
Merge pull request #97742 from Repiteo/ci/godot-cpp-action
Repiteo Jan 22, 2025
76f074b
Merge pull request #101895 from Hilderin/fix-close-request-notificati…
Repiteo Jan 22, 2025
fef1bc6
Merge pull request #101807 from Hilderin/fix-embedded-game-size
Repiteo Jan 22, 2025
f1c0b5b
Merge pull request #101779 from Riteo/primary-mess
Repiteo Jan 22, 2025
660b5af
Fix ColorPicker Swatches button width
Giganzo Jan 22, 2025
8ddd498
[Editor] Add editor setting to globally override project game mode se…
bruvzg Jan 8, 2025
3973c0b
fix gpu_particles_3d randomizing seed when set_one_shot is called
TCROC Jan 22, 2025
2221f6e
WebGL2: Fix 2D array textures with RGTC compression not rendering
BlueCube3310 Jan 22, 2025
e75f679
Disable Game Embedding in Single Window Mode
Hilderin Jan 22, 2025
9ecb301
Merge pull request #101283 from bruvzg/game_mode_glob_conf
Repiteo Jan 22, 2025
d4dafee
Merge pull request #101856 from Calinou/doc-cubemap-templates-fix-urls
Repiteo Jan 22, 2025
c032ce4
Merge pull request #101613 from kitbdev/fix-te-hover-mouse-exit
Repiteo Jan 22, 2025
376b1c9
Merge pull request #101752 from MTareqAzim/fix-resource-loader-cache-uid
Repiteo Jan 22, 2025
53f3143
Merge pull request #101923 from Giganzo/color-button-click
Repiteo Jan 22, 2025
e62be79
Merge pull request #100350 from Namey5/visualshader-worldposfromdepth…
Repiteo Jan 22, 2025
28c4ae2
Merge pull request #101841 from syntaxerror247/zoom-issue
Repiteo Jan 22, 2025
1022c6b
Merge pull request #100920 from Summersay415/uid-moment
Repiteo Jan 22, 2025
b0655dc
Merge pull request #101050 from jamie-pate/fix_android_godot_app_crea…
Repiteo Jan 22, 2025
41afe2d
Update Jolt Physics `BoxShape` to allow for zero-sized boxes
mihe Jan 22, 2025
721f8e7
Fix SceneTreeDock::_new_scene_from()'s reset_scale in 3D
gofastlily Jan 23, 2025
046793b
`TextureProgressBar` minimum size selection as maximum among all text…
arkology Jan 23, 2025
7e9cbfb
Remove erroneous squared version
kiroxas Jan 23, 2025
6639174
2D: Fix `CanvasTexture` rendering when updating channels
stuartcarnie Jan 22, 2025
c30eff5
Fix performance regression introduced in #90993
darksylinc Jan 24, 2025
56fc0fd
CPUParticles2D - Add ability to follow physics interpolated target
rburing Jan 22, 2025
b381d1b
Merge pull request #101943 from gofastlily/fix-101907-save-branch-as-…
Repiteo Jan 24, 2025
1ffb40c
Merge pull request #101972 from darksylinc/matias-vma-slowdown
Repiteo Jan 24, 2025
21e1115
Merge pull request #101931 from stuartcarnie/canvas_texture_cache
Repiteo Jan 24, 2025
802cb0f
Merge pull request #101909 from BlueCube3310/compat-rgtc-arr
Repiteo Jan 24, 2025
7625d6d
Merge pull request #101940 from mihe/jolt/zero-sized-box
Repiteo Jan 24, 2025
0d7af5b
Merge pull request #101968 from kiroxas/FixSlightlyWrongPath
Repiteo Jan 24, 2025
a5015ca
Merge pull request #101957 from arkology/texture-progress-minimum-size
Repiteo Jan 24, 2025
a736394
Merge pull request #101911 from rburing/fti_2d_particles_on_target
Repiteo Jan 24, 2025
b298f6f
Merge pull request #101936 from Hilderin/disable-game-embedding-singl…
Repiteo Jan 24, 2025
b15b24b
Merge pull request #101688 from TCROC/fix-gpu-particles-2d-set_one_sh…
Repiteo Jan 24, 2025
e0ff42e
Merge commit godotengine/godot@b15b24b087e792335d919fd83055f50f276fbe22
Spartan322 Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/actions/godot-cpp-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build godot-cpp
description: Build godot-cpp with the provided options.

env:
GODOT_CPP_BRANCH: 4.3

inputs:
bin:
description: Path to the Godot binary.
required: true
type: string
scons-flags:
description: Additional SCons flags.
type: string
scons-cache:
description: The SCons cache path.
default: ${{ github.workspace }}/.scons_cache/
type: string

runs:
using: composite
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_CPP_BRANCH }}
path: godot-cpp

- name: Extract API
shell: sh
run: ${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api

- name: SCons Build
shell: sh
env:
SCONS_CACHE: ${{ inputs.scons-cache }}
run: scons --directory=./godot-cpp/test "gdextension_dir=${{ github.workspace }}" ${{ inputs.scons-flags }}
57 changes: 0 additions & 57 deletions .github/workflows/godot_cpp_test.yml

This file was deleted.

19 changes: 10 additions & 9 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ jobs:
proj-conv: true
api-compat: true
artifact: true
cache-limit: 1
# Validate godot-cpp compatibility on one arbitrary editor build.
godot-cpp: true
cache-limit: 2

- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)
cache-name: linux-editor-double-sanitizers
Expand All @@ -44,8 +46,6 @@ jobs:
build-mono: false
tests: true
proj-test: true
# Generate an API dump for godot-cpp tests.
api-dump: true
# Skip 2GiB artifact speeding up action.
artifact: false
cache-limit: 7
Expand Down Expand Up @@ -158,6 +158,13 @@ jobs:
tests: ${{ matrix.tests }}
scons-cache-limit: ${{ matrix.cache-limit }}

- name: Compilation (godot-cpp)
uses: ./.github/actions/godot-cpp-build
if: matrix.godot-cpp
with:
bin: ${{ matrix.bin }}
scons-flags: target=template_debug dev_build=yes verbose=yes

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
with:
Expand Down Expand Up @@ -187,12 +194,6 @@ jobs:
with:
name: ${{ matrix.cache-name }}

- name: Dump Godot API
uses: ./.github/actions/godot-api-dump
if: matrix.api-dump
with:
bin: ${{ matrix.bin }}

- name: Unit tests
if: matrix.tests
run: |
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,3 @@ jobs:
name: 🌐 Web
needs: static-checks
uses: ./.github/workflows/web_builds.yml

# Third stage: Run auxiliary tests using build artifacts from previous jobs.

# Can be turned off for PRs that intentionally break compat with godot-cpp,
# until both the upstream PR and the matching godot-cpp changes are merged.
godot-cpp-test:
name: 🪲 Godot CPP
# This can be changed to depend on another platform, if we decide to use it for
# godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step
# appropriately.
needs: linux-build
uses: ./.github/workflows/godot_cpp_test.yml
4 changes: 2 additions & 2 deletions core/core_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ PackedStringArray ResourceLoader::get_dependencies(const String &p_path) {
}

bool ResourceLoader::has_cached(const String &p_path) {
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
String local_path = ::ResourceLoader::_validate_local_path(p_path);
return ResourceCache::has(local_path);
}

Ref<Resource> ResourceLoader::get_cached_ref(const String &p_path) {
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
String local_path = ::ResourceLoader::_validate_local_path(p_path);
return ResourceCache::get_ref(local_path);
}

Expand Down
2 changes: 1 addition & 1 deletion core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ void ResourceLoader::_run_load_task(void *p_userdata) {
curr_load_task = curr_load_task_backup;
}

static String _validate_local_path(const String &p_path) {
String ResourceLoader::_validate_local_path(const String &p_path) {
ResourceUID::ID uid = ResourceUID::get_singleton()->text_to_id(p_path);
if (uid != ResourceUID::INVALID_ID) {
return ResourceUID::get_singleton()->get_id_path(uid);
Expand Down
7 changes: 7 additions & 0 deletions core/io/resource_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
#include "core/object/worker_thread_pool.h"
#include "core/os/thread.h"

namespace core_bind {
class ResourceLoader;
}

class ConditionVariable;

template <int Tag>
Expand Down Expand Up @@ -103,6 +107,7 @@ typedef void (*ResourceLoadedCallback)(Ref<Resource> p_resource, const String &p

class ResourceLoader {
friend class LoadToken;
friend class core_bind::ResourceLoader;

enum {
MAX_LOADERS = 64
Expand Down Expand Up @@ -219,6 +224,8 @@ class ResourceLoader {

static bool _ensure_load_progress();

static String _validate_local_path(const String &p_path);

public:
static Error load_threaded_request(const String &p_path, const String &p_type_hint = "", bool p_use_sub_threads = false, ResourceFormatLoader::CacheMode p_cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE);
static ThreadLoadStatus load_threaded_get_status(const String &p_path, float *r_progress = nullptr);
Expand Down
1 change: 1 addition & 0 deletions doc/classes/CPUParticles2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
<member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false">
Align Y axis of particle with the direction of its velocity.
</member>
<member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" overrides="Node" enum="Node.PhysicsInterpolationMode" default="2" />
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
Particle system starts as if it had already run for this many seconds.
</member>
Expand Down
8 changes: 4 additions & 4 deletions doc/classes/Cubemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
A cubemap is made of 6 textures organized in layers. They are typically used for faking reflections in 3D rendering (see [ReflectionProbe]). It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.
This resource is typically used as a uniform in custom shaders. Few core Redot methods make use of [Cubemap] resources.
To create such a texture file yourself, reimport your image files using the Redot Editor import presets. The expected image order is X+, X-, Y+, Y-, Z+, Z- (in Redot's coordinate system, so Y+ is "up" and Z- is "forward"). You can use one of the following templates as a base:
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/img/cubemap_template_2x3.webp]2×3 cubemap template (default layout option)[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/img/cubemap_template_3x2.webp]3×2 cubemap template[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/img/cubemap_template_1x6.webp]1×6 cubemap template[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/img/cubemap_template_6x1.webp]6×1 cubemap template[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/tutorials/assets_pipeline/img/cubemap_template_2x3.webp]2×3 cubemap template (default layout option)[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/tutorials/assets_pipeline/img/cubemap_template_3x2.webp]3×2 cubemap template[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/tutorials/assets_pipeline/img/cubemap_template_1x6.webp]1×6 cubemap template[/url]
- [url=https://raw.githubusercontent.com/Redot-Engine/redot-docs/master/tutorials/assets_pipeline/img/cubemap_template_6x1.webp]6×1 cubemap template[/url]
[b]Note:[/b] Redot doesn't support using cubemaps in a [PanoramaSkyMaterial]. To use a cubemap as a skybox, convert the default [PanoramaSkyMaterial] to a [ShaderMaterial] using the [b]Convert to ShaderMaterial[/b] resource dropdown option, then replace its code with the following:
[codeblock lang=text]
shader_type sky;
Expand Down
3 changes: 3 additions & 0 deletions doc/classes/EditorSettings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,9 @@
- [b]Launch in PiP mode[/b] will launch the Play window directly in picture-in-picture (PiP) mode if PiP mode is supported and enabled. When maximized, the Play window will occupy the same window as the Editor.
[b]Note:[/b] Only available in the Android editor.
</member>
<member name="run/window_placement/game_embed_mode" type="int" setter="" getter="">
Overrides game embedding setting for all newly opened projects. If enabled, game embedding settings are not saved.
</member>
<member name="run/window_placement/play_window_pip_mode" type="int" setter="" getter="">
Specifies the picture-in-picture (PiP) mode for the Play window.
- [b]Disabled:[/b] PiP is disabled for the Play window.
Expand Down
11 changes: 10 additions & 1 deletion drivers/gles3/storage/texture_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,8 +1511,17 @@ void TextureStorage::_texture_set_data(RID p_texture, const Ref<Image> &p_image,
GLenum internal_format;
bool compressed = false;

bool needs_decompress = texture->resize_to_po2;

// Support for RGTC-compressed Texture Arrays isn't mandated by GLES3/WebGL.
if (!RasterizerGLES3::is_gles_over_gl() && texture->target == GL_TEXTURE_2D_ARRAY) {
if (p_image->get_format() == Image::FORMAT_RGTC_R || p_image->get_format() == Image::FORMAT_RGTC_RG) {
needs_decompress = true;
}
}

Image::Format real_format;
Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), real_format, format, internal_format, type, compressed, texture->resize_to_po2);
Ref<Image> img = _get_gl_image_and_format(p_image, p_image->get_format(), real_format, format, internal_format, type, compressed, needs_decompress);
ERR_FAIL_COND(img.is_null());
if (texture->resize_to_po2) {
if (p_image->is_compressed()) {
Expand Down
2 changes: 2 additions & 0 deletions drivers/vulkan/rendering_device_driver_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1532,10 +1532,12 @@ RDD::BufferID RenderingDeviceDriverVulkan::buffer_create(uint64_t p_size, BitFie
if (is_src && !is_dst) {
// Looks like a staging buffer: CPU maps, writes sequentially, then GPU copies to VRAM.
alloc_create_info.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT;
alloc_create_info.preferredFlags |= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
}
if (is_dst && !is_src) {
// Looks like a readback buffer: GPU copies from VRAM, then CPU maps and reads.
alloc_create_info.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT;
alloc_create_info.preferredFlags |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
}
alloc_create_info.requiredFlags = (VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT);
} break;
Expand Down
2 changes: 2 additions & 0 deletions editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,12 +935,14 @@ void CodeTextEditor::_text_editor_gui_input(const Ref<InputEvent> &p_event) {
}
}

#ifndef ANDROID_ENABLED
Ref<InputEventMagnifyGesture> magnify_gesture = p_event;
if (magnify_gesture.is_valid()) {
_zoom_to(zoom_factor * powf(magnify_gesture->get_factor(), 0.25f));
accept_event();
return;
}
#endif

Ref<InputEventKey> k = p_event;

Expand Down
Loading