From 91c0ba19864d285b079150d7774923cda83c6d20 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 19 Oct 2025 22:13:40 +0300 Subject: [PATCH 1/5] Enforce pointer alignment for InlinedAllocation AssetReferences stored in inlined allocation needs to be aligned to pointer sized boundary due to atomic operations having strict requirements for such. Unaligned access seems to only crash on Windows on ARM systems when trying to allocate TextRender draw chunks. --- Source/Engine/Core/Memory/Allocation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Core/Memory/Allocation.h b/Source/Engine/Core/Memory/Allocation.h index d6958d2c3..ffd51d96c 100644 --- a/Source/Engine/Core/Memory/Allocation.h +++ b/Source/Engine/Core/Memory/Allocation.h @@ -208,7 +208,7 @@ public: typedef typename FallbackAllocation::template Data FallbackData; bool _useFallback = false; - byte _data[Capacity * sizeof(T)]; + alignas(sizeof(void*)) byte _data[Capacity * sizeof(T)]; FallbackData _fallback; public: From 6b9c727a6a538a1fda40053ce0fc908c66c449c9 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Sun, 19 Oct 2025 22:16:30 +0300 Subject: [PATCH 2/5] Fix compiler warning --- Source/Engine/Scripting/ScriptingType.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Scripting/ScriptingType.h b/Source/Engine/Scripting/ScriptingType.h index cd7b05c73..b9735a5af 100644 --- a/Source/Engine/Scripting/ScriptingType.h +++ b/Source/Engine/Scripting/ScriptingType.h @@ -563,8 +563,8 @@ FORCE_INLINE int32 GetVTableIndex(void** vtable, int32 entriesCount, void* func) offset = ((*op & 0x3FFC00) >> 10) * ((*op & 0x40000000) != 0 ? 8 : 4); return offset / sizeof(void*); } - CRASH; } + CRASH; #elif defined(__clang__) // On Clang member function pointer represents the offset from the vtable begin. return (int32)(intptr)func / sizeof(void*); From be5dbbb95f5b7ae0ad55bab61a70bd576f482e8c Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Sun, 19 Oct 2025 15:55:57 -0500 Subject: [PATCH 3/5] Fix duplicate option for collections being grayed out if nothing is in clipboard. --- Source/Editor/CustomEditors/Editors/CollectionEditor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs index b977dab63..69bacee1a 100644 --- a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs +++ b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs @@ -71,7 +71,7 @@ namespace FlaxEditor.CustomEditors.Editors menu.AddButton("Copy", linkedEditor.Copy); var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index)); - b.Enabled = linkedEditor.CanPaste && !Editor._readOnly && Editor._canResize; + b.Enabled = !Editor._readOnly && Editor._canResize; b = menu.AddButton("Paste", linkedEditor.Paste); b.Enabled = linkedEditor.CanPaste && !Editor._readOnly; @@ -407,7 +407,7 @@ namespace FlaxEditor.CustomEditors.Editors menu.AddButton("Copy", linkedEditor.Copy); var b = menu.AddButton("Duplicate", () => Editor.Duplicate(Index)); - b.Enabled = linkedEditor.CanPaste && !Editor._readOnly && Editor._canResize; + b.Enabled = !Editor._readOnly && Editor._canResize; var paste = menu.AddButton("Paste", linkedEditor.Paste); paste.Enabled = linkedEditor.CanPaste && !Editor._readOnly; From 8467315a1e8ddf15141889c8e3efba4286653460 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Mon, 20 Oct 2025 18:08:54 +0200 Subject: [PATCH 4/5] Fix motion vector stability on Large World origin changes #3745 --- Content/Shaders/MotionBlur.flax | 4 ++-- Source/Engine/Renderer/MotionBlurPass.cpp | 4 ++++ Source/Shaders/MotionBlur.shader | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content/Shaders/MotionBlur.flax b/Content/Shaders/MotionBlur.flax index b713e814b..8a8bb4e4a 100644 --- a/Content/Shaders/MotionBlur.flax +++ b/Content/Shaders/MotionBlur.flax @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af63c3e954919a968e21f19313af1a704c2afa42c5a02744200e1dbf132dc88f -size 9418 +oid sha256:0e8fb3a9a966969ab731455c1d50b280cba0703163cffca93a51fd504262e77e +size 9497 diff --git a/Source/Engine/Renderer/MotionBlurPass.cpp b/Source/Engine/Renderer/MotionBlurPass.cpp index 3077e4cdb..f00df522c 100644 --- a/Source/Engine/Renderer/MotionBlurPass.cpp +++ b/Source/Engine/Renderer/MotionBlurPass.cpp @@ -30,6 +30,9 @@ GPU_CB_STRUCT(Data { Float2 Input0SizeInv; Float2 Input2SizeInv; + + Float3 PrevWorldOriginOffset; + float Dummy1; }); MotionBlurPass::MotionBlurPass() @@ -194,6 +197,7 @@ void MotionBlurPass::RenderMotionVectors(RenderContext& renderContext) Matrix::Transpose(renderContext.View.ViewProjection(), data.CurrentVP); Matrix::Transpose(renderContext.View.PrevViewProjection, data.PreviousVP); data.TemporalAAJitter = renderContext.View.TemporalAAJitter; + data.PrevWorldOriginOffset = renderContext.View.Origin - renderContext.View.PrevOrigin; auto cb = _shader->GetShader()->GetCB(0); context->UpdateCB(cb, &data); context->BindCB(0, cb); diff --git a/Source/Shaders/MotionBlur.shader b/Source/Shaders/MotionBlur.shader index 153b14bba..7041ec743 100644 --- a/Source/Shaders/MotionBlur.shader +++ b/Source/Shaders/MotionBlur.shader @@ -21,6 +21,8 @@ int MaxBlurSamples; uint VariableTileLoopCount; float2 Input0SizeInv; float2 Input2SizeInv; +float3 PrevWorldOriginOffset; +float Dummy1; META_CB_END DECLARE_GBUFFERDATA_ACCESS(GBuffer) @@ -39,7 +41,7 @@ float4 PS_CameraMotionVectors(Quad_VS2PS input) : SV_Target GBufferData gBufferData = GetGBufferData(); float4 worldPos = float4(GetWorldPos(gBufferData, input.TexCoord, deviceDepth), 1); - float4 prevClipPos = mul(worldPos, PreviousVP); + float4 prevClipPos = mul(worldPos + float4(PrevWorldOriginOffset, 0), PreviousVP); float4 curClipPos = mul(worldPos, CurrentVP); float2 prevHPos = prevClipPos.xy / prevClipPos.w; float2 curHPos = curClipPos.xy / curClipPos.w; From d1774cac28988b46bd1de87aec26745ae71fcb48 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 22 Oct 2025 16:14:05 +0200 Subject: [PATCH 5/5] Go back to `SSE4.2` on Windows as minimum requirement instead of `AVX2` for better user coverage by default #3732 --- Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs index 5154cdbf9..fddbdb3de 100644 --- a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs +++ b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchain.cs @@ -20,7 +20,7 @@ namespace Flax.Build /// Specifies the minimum CPU architecture type to support (on x86/x64). /// [CommandLine("winCpuArch", "", "Specifies the minimum CPU architecture type to support (om x86/x64).")] - public static CpuArchitecture WindowsCpuArch = CpuArchitecture.AVX2; // 94.48% support on PC according to Steam Hardware & Software Survey: May 2025 (https://store.steampowered.com/hwsurvey/) + public static CpuArchitecture WindowsCpuArch = CpuArchitecture.SSE4_2; // 99.78% support on PC according to Steam Hardware & Software Survey: September 2025 (https://store.steampowered.com/hwsurvey/) } }