From 395a4fc5f27b5cc8b9ebce3d66fd95be2eea9b3b Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Wed, 25 Sep 2024 17:38:34 +0200 Subject: [PATCH 1/2] [SCons] Remove MAXLINELENGTH override for MSVC It's not clear what is the actual max value that windows support, but despite their claim of it being 8191 we have been seeing failure with just 8150. --- platform/windows/detect.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 9adab7284c9..4043f3a8c28 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -390,8 +390,6 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config): env.AppendUnique(CPPDEFINES=["R128_STDC_ONLY"]) env.extra_suffix = ".llvm" + env.extra_suffix - env["MAXLINELENGTH"] = 8192 # Windows Vista and beyond, so always applicable. - if env["silence_msvc"] and not env.GetOption("clean"): from tempfile import mkstemp From 3e0d3c433bde1f2e0b18c3f05e43c3bf3c0804bc Mon Sep 17 00:00:00 2001 From: matheusmdx Date: Thu, 25 Jul 2024 13:55:02 -0300 Subject: [PATCH 2/2] Fix pink GradientTexture2D --- scene/resources/gradient_texture.cpp | 12 ++++++------ scene/resources/gradient_texture.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/scene/resources/gradient_texture.cpp b/scene/resources/gradient_texture.cpp index 6ec9422d2de..2b0e455efb2 100644 --- a/scene/resources/gradient_texture.cpp +++ b/scene/resources/gradient_texture.cpp @@ -85,7 +85,7 @@ void GradientTexture1D::_queue_update() { callable_mp(this, &GradientTexture1D::update_now).call_deferred(); } -void GradientTexture1D::_update() { +void GradientTexture1D::_update() const { update_pending = false; if (gradient.is_null()) { @@ -172,14 +172,14 @@ RID GradientTexture1D::get_rid() const { } Ref GradientTexture1D::get_image() const { - const_cast(this)->update_now(); + update_now(); if (!texture.is_valid()) { return Ref(); } return RenderingServer::get_singleton()->texture_2d_get(texture); } -void GradientTexture1D::update_now() { +void GradientTexture1D::update_now() const { if (update_pending) { _update(); } @@ -225,7 +225,7 @@ void GradientTexture2D::_queue_update() { callable_mp(this, &GradientTexture2D::update_now).call_deferred(); } -void GradientTexture2D::_update() { +void GradientTexture2D::_update() const { update_pending = false; if (gradient.is_null()) { @@ -405,14 +405,14 @@ RID GradientTexture2D::get_rid() const { } Ref GradientTexture2D::get_image() const { - const_cast(this)->update_now(); + update_now(); if (!texture.is_valid()) { return Ref(); } return RenderingServer::get_singleton()->texture_2d_get(texture); } -void GradientTexture2D::update_now() { +void GradientTexture2D::update_now() const { if (update_pending) { _update(); } diff --git a/scene/resources/gradient_texture.h b/scene/resources/gradient_texture.h index 761e8d995b6..764e5e66453 100644 --- a/scene/resources/gradient_texture.h +++ b/scene/resources/gradient_texture.h @@ -38,13 +38,13 @@ class GradientTexture1D : public Texture2D { private: Ref gradient; - bool update_pending = false; + mutable bool update_pending = false; mutable RID texture; int width = 256; bool use_hdr = false; void _queue_update(); - void _update(); + void _update() const; protected: static void _bind_methods(); @@ -64,7 +64,7 @@ public: virtual bool has_alpha() const override { return true; } virtual Ref get_image() const override; - void update_now(); + void update_now() const; GradientTexture1D(); virtual ~GradientTexture1D(); @@ -102,9 +102,9 @@ private: float _get_gradient_offset_at(int x, int y) const; - bool update_pending = false; + mutable bool update_pending = false; void _queue_update(); - void _update(); + void _update() const; protected: static void _bind_methods(); @@ -134,7 +134,7 @@ public: virtual RID get_rid() const override; virtual bool has_alpha() const override { return true; } virtual Ref get_image() const override; - void update_now(); + void update_now() const; GradientTexture2D(); virtual ~GradientTexture2D();