Skip to content

Commit

Permalink
Merge branch 'godotengine:master' into realtime-animation-player-prop…
Browse files Browse the repository at this point in the history
…erty-updates
  • Loading branch information
dnllowe authored Aug 26, 2024
2 parents e6037e8 + e53dc80 commit 3999cf0
Show file tree
Hide file tree
Showing 114 changed files with 1,974 additions and 881 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ else: # GCC, Clang
if cc_version_major >= 11: # Broke on MethodBind templates before GCC 11.
env.Append(CCFLAGS=["-Wlogical-op"])
elif methods.using_clang(env) or methods.using_emcc(env):
env.Append(CCFLAGS=["-Wimplicit-fallthrough"])
env.Append(CCFLAGS=["-Wimplicit-fallthrough", "-Wno-undefined-var-template"])
elif env["warnings"] == "all":
env.Append(CCFLAGS=["-Wall"] + common_warnings)
elif env["warnings"] == "moderate":
Expand Down
4 changes: 4 additions & 0 deletions core/config/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ bool Engine::is_generate_spirv_debug_info_enabled() const {
return generate_spirv_debug_info;
}

bool Engine::is_extra_gpu_memory_tracking_enabled() const {
return extra_gpu_memory_tracking;
}

void Engine::set_print_error_messages(bool p_enabled) {
CoreGlobals::print_error_enabled = p_enabled;
}
Expand Down
2 changes: 2 additions & 0 deletions core/config/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Engine {
bool abort_on_gpu_errors = false;
bool use_validation_layers = false;
bool generate_spirv_debug_info = false;
bool extra_gpu_memory_tracking = false;
int32_t gpu_idx = -1;

uint64_t _process_frames = 0;
Expand Down Expand Up @@ -181,6 +182,7 @@ class Engine {
bool is_abort_on_gpu_errors_enabled() const;
bool is_validation_layers_enabled() const;
bool is_generate_spirv_debug_info_enabled() const;
bool is_extra_gpu_memory_tracking_enabled() const;
int32_t get_gpu_index() const;

void increment_frames_drawn();
Expand Down
24 changes: 12 additions & 12 deletions core/crypto/crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@

/// Resources

CryptoKey *(*CryptoKey::_create)() = nullptr;
CryptoKey *CryptoKey::create() {
CryptoKey *(*CryptoKey::_create)(bool p_notify_postinitialize) = nullptr;
CryptoKey *CryptoKey::create(bool p_notify_postinitialize) {
if (_create) {
return _create();
return _create(p_notify_postinitialize);
}
return nullptr;
}
Expand All @@ -52,10 +52,10 @@ void CryptoKey::_bind_methods() {
ClassDB::bind_method(D_METHOD("load_from_string", "string_key", "public_only"), &CryptoKey::load_from_string, DEFVAL(false));
}

X509Certificate *(*X509Certificate::_create)() = nullptr;
X509Certificate *X509Certificate::create() {
X509Certificate *(*X509Certificate::_create)(bool p_notify_postinitialize) = nullptr;
X509Certificate *X509Certificate::create(bool p_notify_postinitialize) {
if (_create) {
return _create();
return _create(p_notify_postinitialize);
}
return nullptr;
}
Expand Down Expand Up @@ -116,21 +116,21 @@ void HMACContext::_bind_methods() {
ClassDB::bind_method(D_METHOD("finish"), &HMACContext::finish);
}

HMACContext *(*HMACContext::_create)() = nullptr;
HMACContext *HMACContext::create() {
HMACContext *(*HMACContext::_create)(bool p_notify_postinitialize) = nullptr;
HMACContext *HMACContext::create(bool p_notify_postinitialize) {
if (_create) {
return _create();
return _create(p_notify_postinitialize);
}
ERR_FAIL_V_MSG(nullptr, "HMACContext is not available when the mbedtls module is disabled.");
}

/// Crypto

void (*Crypto::_load_default_certificates)(const String &p_path) = nullptr;
Crypto *(*Crypto::_create)() = nullptr;
Crypto *Crypto::create() {
Crypto *(*Crypto::_create)(bool p_notify_postinitialize) = nullptr;
Crypto *Crypto::create(bool p_notify_postinitialize) {
if (_create) {
return _create();
return _create(p_notify_postinitialize);
}
ERR_FAIL_V_MSG(nullptr, "Crypto is not available when the mbedtls module is disabled.");
}
Expand Down
16 changes: 8 additions & 8 deletions core/crypto/crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class CryptoKey : public Resource {

protected:
static void _bind_methods();
static CryptoKey *(*_create)();
static CryptoKey *(*_create)(bool p_notify_postinitialize);

public:
static CryptoKey *create();
static CryptoKey *create(bool p_notify_postinitialize = true);
virtual Error load(const String &p_path, bool p_public_only = false) = 0;
virtual Error save(const String &p_path, bool p_public_only = false) = 0;
virtual String save_to_string(bool p_public_only = false) = 0;
Expand All @@ -58,10 +58,10 @@ class X509Certificate : public Resource {

protected:
static void _bind_methods();
static X509Certificate *(*_create)();
static X509Certificate *(*_create)(bool p_notify_postinitialize);

public:
static X509Certificate *create();
static X509Certificate *create(bool p_notify_postinitialize = true);
virtual Error load(const String &p_path) = 0;
virtual Error load_from_memory(const uint8_t *p_buffer, int p_len) = 0;
virtual Error save(const String &p_path) = 0;
Expand Down Expand Up @@ -106,10 +106,10 @@ class HMACContext : public RefCounted {

protected:
static void _bind_methods();
static HMACContext *(*_create)();
static HMACContext *(*_create)(bool p_notify_postinitialize);

public:
static HMACContext *create();
static HMACContext *create(bool p_notify_postinitialize = true);

virtual Error start(HashingContext::HashType p_hash_type, const PackedByteArray &p_key) = 0;
virtual Error update(const PackedByteArray &p_data) = 0;
Expand All @@ -124,11 +124,11 @@ class Crypto : public RefCounted {

protected:
static void _bind_methods();
static Crypto *(*_create)();
static Crypto *(*_create)(bool p_notify_postinitialize);
static void (*_load_default_certificates)(const String &p_path);

public:
static Crypto *create();
static Crypto *create(bool p_notify_postinitialize = true);
static void load_default_certificates(const String &p_path);

virtual PackedByteArray generate_random_bytes(int p_bytes) = 0;
Expand Down
Loading

0 comments on commit 3999cf0

Please sign in to comment.