Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ jobs:
with:
submodules: recursive

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3'

- name: Restore Godot build cache
uses: ./.github/actions/godot-cache-restore
with:
Expand Down
6 changes: 3 additions & 3 deletions COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ License: BSD-3-clause

Files: ./thirdparty/libpng/
Comment: libpng
Copyright: 1995-2019, The PNG Reference Library Authors.
2018-2019, Cosmin Truta.
Copyright: 1995-2024, The PNG Reference Library Authors.
2018-2024, Cosmin Truta.
2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
1996-1997, Andreas Dilger.
1995-1996, Guy Eric Schalnat, Group 42, Inc.
Expand Down Expand Up @@ -478,7 +478,7 @@ License: Expat

Files: ./thirdparty/zlib/
Comment: zlib
Copyright: 1995-2022, Jean-loup Gailly and Mark Adler
Copyright: 1995-2024, Jean-loup Gailly and Mark Adler
License: Zlib

Files: ./thirdparty/zstd/
Expand Down
7 changes: 7 additions & 0 deletions core/io/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2336,6 +2336,10 @@ void Image::initialize_data(const char **p_xpm) {
} break;
case READING_PIXELS: {
int y = line - colormap_size - 1;
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wstringop-overflow=0"
#endif
for (int x = 0; x < size_width; x++) {
char pixelstr[6] = { 0, 0, 0, 0, 0, 0 };
for (int i = 0; i < pixelchars; i++) {
Expand All @@ -2350,6 +2354,9 @@ void Image::initialize_data(const char **p_xpm) {
}
_put_pixelb(x, y, pixel_size, data_write, pixel);
}
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic pop
#endif

if (y == (size_height - 1)) {
status = DONE;
Expand Down
9 changes: 4 additions & 5 deletions core/object/message_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,19 +324,18 @@ MessageQueue::~MessageQueue() {

while (read_pos < buffer_end) {
Message *message = (Message *)&buffer[read_pos];
read_pos += sizeof(Message);

Variant *args = (Variant *)(message + 1);
int argc = message->args;
if ((message->type & FLAG_MASK) != TYPE_NOTIFICATION) {
for (int i = 0; i < argc; i++) {
args[i].~Variant();
}
read_pos += sizeof(Variant) * argc;
}
message->~Message();

read_pos += sizeof(Message);
if ((message->type & FLAG_MASK) != TYPE_NOTIFICATION) {
read_pos += sizeof(Variant) * message->args;
}
message->~Message();
}

singleton = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions core/object/message_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class MessageQueue {

struct Message {
Callable callable;
int16_t type;
int16_t type = 0;
union {
int16_t notification;
int16_t notification = 0;
int16_t args;
};
};
Expand Down
8 changes: 4 additions & 4 deletions drivers/gles3/storage/texture_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ void TextureStorage::update_texture_atlas() {
//generate atlas
Vector<TextureAtlas::SortItem> itemsv;
itemsv.resize(texture_atlas.textures.size());
int base_size = 8;
uint32_t base_size = 8;

int idx = 0;

Expand All @@ -1407,7 +1407,7 @@ void TextureStorage::update_texture_atlas() {
si.size.height = (src_tex->height / border) + 1;
si.pixel_size = Size2i(src_tex->width, src_tex->height);

if (base_size < si.size.width) {
if (base_size < (uint32_t)si.size.width) {
base_size = nearest_power_of_2_templated(si.size.width);
}

Expand Down Expand Up @@ -1438,7 +1438,7 @@ void TextureStorage::update_texture_atlas() {
TextureAtlas::SortItem &si = items[i];
int best_idx = -1;
int best_height = 0x7FFFFFFF;
for (int j = 0; j <= base_size - si.size.width; j++) {
for (uint32_t j = 0; j <= base_size - si.size.width; j++) {
int height = 0;
for (int k = 0; k < si.size.width; k++) {
int h = v_offsets[k + j];
Expand Down Expand Up @@ -1469,7 +1469,7 @@ void TextureStorage::update_texture_atlas() {
}
}

if (max_height <= base_size * 2) {
if ((uint32_t)max_height <= base_size * 2) {
atlas_height = max_height;
break; //good ratio, break;
}
Expand Down
42 changes: 42 additions & 0 deletions drivers/vulkan/godot_vulkan.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**************************************************************************/
/* godot_vulkan.h */
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/

#ifndef GODOT_VULKAN_H
#define GODOT_VULKAN_H

#ifdef USE_VOLK
#include <volk.h>
#else
#include <stdint.h>
#define VK_NO_STDINT_H
#include <vulkan/vulkan.h>
#endif

#endif // GODOT_VULKAN_H
6 changes: 1 addition & 5 deletions drivers/vulkan/rendering_device_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@
#endif
#include "vk_mem_alloc.h"

#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#include "drivers/vulkan/godot_vulkan.h"

class VulkanContext;

Expand Down
6 changes: 1 addition & 5 deletions drivers/vulkan/vulkan_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@
#include "servers/display_server.h"
#include "servers/rendering/rendering_device.h"

#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#include "drivers/vulkan/godot_vulkan.h"

#include "vulkan_hooks.h"

Expand Down
6 changes: 1 addition & 5 deletions drivers/vulkan/vulkan_hooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
#ifndef VULKAN_HOOKS_H
#define VULKAN_HOOKS_H

#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#include "drivers/vulkan/godot_vulkan.h"

class VulkanHooks {
public:
Expand Down
8 changes: 4 additions & 4 deletions drivers/wasapi/audio_driver_wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ __CRT_UUID_DECL(IAudioClient3, 0x7ED4EE07, 0x8E67, 0x4CD4, 0x8C, 0x1A, 0x2B, 0x7

#endif // __MINGW32__ || __MINGW64__

#ifndef PKEY_Device_FriendlyName
#ifndef PKEY_Device_FriendlyNameGodot

#undef DEFINE_PROPERTYKEY
/* clang-format off */
#define DEFINE_PROPERTYKEY(id, a, b, c, d, e, f, g, h, i, j, k, l) \
const PROPERTYKEY id = { { a, b, c, { d, e, f, g, h, i, j, k, } }, l };
/* clang-format on */

DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyNameGodot, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14);
#endif

const CLSID CLSID_MMDeviceEnumerator = __uuidof(MMDeviceEnumerator);
Expand Down Expand Up @@ -237,7 +237,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i
PROPVARIANT propvar;
PropVariantInit(&propvar);

hr = props->GetValue(PKEY_Device_FriendlyName, &propvar);
hr = props->GetValue(PKEY_Device_FriendlyNameGodot, &propvar);
ERR_BREAK(hr != S_OK);

if (p_device->device_name == String(propvar.pwszVal)) {
Expand Down Expand Up @@ -611,7 +611,7 @@ PackedStringArray AudioDriverWASAPI::audio_device_get_list(bool p_input) {
PROPVARIANT propvar;
PropVariantInit(&propvar);

hr = props->GetValue(PKEY_Device_FriendlyName, &propvar);
hr = props->GetValue(PKEY_Device_FriendlyNameGodot, &propvar);
ERR_BREAK(hr != S_OK);

list.push_back(String(propvar.pwszVal));
Expand Down
6 changes: 1 addition & 5 deletions platform/android/vulkan/vulkan_context_android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@

#include "vulkan_context_android.h"

#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#include "drivers/vulkan/godot_vulkan.h"

const char *VulkanContextAndroid::_get_platform_surface_extension() const {
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
Expand Down
8 changes: 2 additions & 6 deletions platform/ios/display_server_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@

#include "vulkan_context_ios.h"

#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#endif
#include "drivers/vulkan/godot_vulkan.h"
#endif // VULKAN_ENABLED

#if defined(GLES3_ENABLED)
#include "drivers/gles3/rasterizer_gles3.h"
Expand Down
6 changes: 1 addition & 5 deletions platform/ios/os_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,9 @@
#include <sys/sysctl.h>

#if defined(VULKAN_ENABLED)
#include "drivers/vulkan/godot_vulkan.h"
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
#import <QuartzCore/CAMetalLayer.h>
#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#endif

// Initialization order between compilation units is not guaranteed,
Expand Down
6 changes: 1 addition & 5 deletions platform/linuxbsd/x11/vulkan_context_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@

#include "vulkan_context_x11.h"

#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
#include "drivers/vulkan/godot_vulkan.h"

const char *VulkanContextX11::_get_platform_surface_extension() const {
return VK_KHR_XLIB_SURFACE_EXTENSION_NAME;
Expand Down
7 changes: 2 additions & 5 deletions platform/macos/vulkan_context_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@

#ifdef VULKAN_ENABLED
#include "vulkan_context_macos.h"
#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif

#include "drivers/vulkan/godot_vulkan.h"

const char *VulkanContextMacOS::_get_platform_surface_extension() const {
return VK_MVK_MACOS_SURFACE_EXTENSION_NAME;
Expand Down
7 changes: 2 additions & 5 deletions platform/windows/vulkan_context_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@
#if defined(WINDOWS_ENABLED) && defined(VULKAN_ENABLED)

#include "vulkan_context_win.h"
#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif

#include "drivers/vulkan/godot_vulkan.h"

const char *VulkanContextWindows::_get_platform_surface_extension() const {
return VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
Expand Down
1 change: 1 addition & 0 deletions scene/resources/packed_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Node *SceneState::instantiate(GenEditState p_edit_state) const {
const NodeData *nd = &nodes[0];

Node **ret_nodes = (Node **)alloca(sizeof(Node *) * nc);
ret_nodes[0] = nullptr; // Sidesteps "maybe uninitialized" false-positives on GCC.

bool gen_node_path_cache = p_edit_state != GEN_EDIT_STATE_DISABLED && node_path_cache.is_empty();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ void TextureStorage::update_decal_atlas() {
//generate atlas
Vector<DecalAtlas::SortItem> itemsv;
itemsv.resize(decal_atlas.textures.size());
int base_size = 8;
uint32_t base_size = 8;

int idx = 0;

Expand All @@ -2097,7 +2097,7 @@ void TextureStorage::update_decal_atlas() {
si.size.height = (src_tex->height / border) + 1;
si.pixel_size = Size2i(src_tex->width, src_tex->height);

if (base_size < si.size.width) {
if (base_size < (uint32_t)si.size.width) {
base_size = nearest_power_of_2_templated(si.size.width);
}

Expand Down Expand Up @@ -2128,7 +2128,7 @@ void TextureStorage::update_decal_atlas() {
DecalAtlas::SortItem &si = items[i];
int best_idx = -1;
int best_height = 0x7FFFFFFF;
for (int j = 0; j <= base_size - si.size.width; j++) {
for (uint32_t j = 0; j <= base_size - si.size.width; j++) {
int height = 0;
for (int k = 0; k < si.size.width; k++) {
int h = v_offsets[k + j];
Expand Down Expand Up @@ -2159,7 +2159,7 @@ void TextureStorage::update_decal_atlas() {
}
}

if (max_height <= base_size * 2) {
if ((uint32_t)max_height <= base_size * 2) {
atlas_height = max_height;
break; //good ratio, break;
}
Expand Down
Loading
Loading