Commit Graph

249 Commits

Author SHA1 Message Date
andrew davidson
99834ab694 Engine module public header truncation warning fixes
#jira UE-160823
#rb dave.jones2, zak.middleton
#preflight 6335d07e466fb43669bc682f

[CL 22263161 by andrew davidson in ue5-main branch]
2022-09-30 00:47:16 -04:00
bryan sefcik
9905eb52bb Pass 2 on running IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.
#preflight 62c703bbd13fac04f11da948

[CL 20985655 by bryan sefcik in ue5-main branch]
2022-07-07 12:30:11 -04:00
bryan sefcik
62489fe2b3 Ran a pass of IWYU on Core.
Things to note regarding this pass:
* No includes are currently being removed from public headers.
* Any private file that has a #if is currently not being updated.

#rb Devin Doucette and Marc Audy
#preflight 62c62086756222ced497ff95
#preflight 62c626d12f2d04691814d331
#preflight 62c630107e606620fdd64e31
#preflight 62c635c6756222ced49a13cf

[CL 20979027 by bryan sefcik in ue5-main branch]
2022-07-06 21:44:18 -04:00
andrew rodham
fd93fd2553 Added micro and nano-seconds to unit conversion utilities
#rb Patrick.Boutot
#preflight 62bb5222727d9bb33bae688b

#ROBOMERGE-AUTHOR: andrew.rodham
#ROBOMERGE-SOURCE: CL 20875478 via CL 20875508 via CL 20875518
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20878382 by andrew rodham in ue5-main branch]
2022-06-29 13:39:40 -04:00
JeanFrancois Dube
e3c08e960c Data Layer: fix old data layer assets debug color when loading.
#rb richard.malo
#preflight 629fe378f73a9b013ddf953a
#rnx

[CL 20554448 by JeanFrancois Dube in ue5-main branch]
2022-06-08 07:11:02 -04:00
Jason Adcock
dccca1fb87 Fix Fortnite Networking Versioning between FN and UE branches
#jira UE-147571, UE-149373, UE-146854
#rb ryan.gerleve
#preflight

[CL 20053774 by Jason Adcock in ue5-main branch]
2022-05-04 20:56:28 -04:00
Zak Middleton
bd47021f04 #ue5 - Added VectorMod360(), for specific use by Rotator normalization where speed is more important than the stability of stock fmod() under extreme ranges. 30% - 75% faster depending on the intrinsics available to the alternate VectorMod().
Given that the second argument is always 360, we can remove some tests for bad ranges of input and use simple truncation/multiplication to compute the result, while retaining good accuracy within reasonable FRotator input value ranges.

#jira UE-129730
#preflight 62699851f97c319beba69337
#rb Dmytro.Vovk

[CL 19947858 by Zak Middleton in ue5-main branch]
2022-04-27 17:44:04 -04:00
Zak Middleton
f2e6ac0f2d #ue5 - Make UnrealMathFPU usable again when vector intrinsics are disabled or when explicitly swapped in within VectorRegister.h. Fixed some related deprecated UE constants usage. Fixed NaN handling for comparisons in UnrealMathFPU to pass the UnrealMathTest startup tests.
#jira UE-129730
#rb none
#preflight 62687fe6430b9997eb013593

[CL 19941685 by Zak Middleton in ue5-main branch]
2022-04-27 12:27:40 -04:00
Steve Robb
f4d1564ffe New BitCast<>() function which works like C++20's std::bit_cast<>().
Deprecation of FPlatformMath::IsNegative*() functions.
New FPlatformMath::IsNegativeOrNegativeZero().
Fix up of existing usage to either use < 0 or IsNegativeOrNegativeZero where appropriate.
Fixes for aliasing problems in various FMath functions, including IsNegative*().

Resubmission of CL# 19833778 with fixes for problematic Mac and Android toolchains, causing spurious errors while building PCHs.

#rb devin.doucette, charles.bloom, will.damon, chris.babcock
#jira UE-148435
#preflight 6260764d91376845adf9893f

[CL 19840896 by Steve Robb in ue5-main branch]
2022-04-20 19:05:47 -04:00
Steve Robb
5c1f45e9a8 Undo //UE5/Main/Engine/... changelist 19833778 due to Mac and Android compilation failure.
#rb none
#jira none
#preflight none
#fyi will.damon

[CL 19835840 by Steve Robb in ue5-main branch]
2022-04-20 15:09:51 -04:00
Steve Robb
a9e89c3ed6 New BitCast<>() function which works like C++20's std::bit_cast<>().
Deprecation of FPlatformMath::IsNegative*() functions.
New FPlatformMath::IsNegativeOrNegativeZero().
Fix up of existing usage to either use < 0 or IsNegativeOrNegativeZero where appropriate.
Fixes for aliasing problems in various FMath functions, including IsNegative*().

#rb devin.doucette, charles.bloom
#jira UE-148435
#preflight 625ece48f16e0d2accab15d9

[CL 19833778 by Steve Robb in ue5-main branch]
2022-04-20 13:38:10 -04:00
sebastian nordgren
b6b10ed4e1 KiB/MiB/GiB/TiB are now accepted spellings for the units in the details view.
#review-19625751 @lauren.barnes
#preflight 624d5688683a7dd323bde009

[CL 19644364 by sebastian nordgren in ue5-main branch]
2022-04-06 05:05:32 -04:00
Steve Robb
4bc29be92b Re-enable the removal of the legacy math macros from Core, removed in CL# 19494088.
A couple of other macro fixes in Core.

#rb none
#jira UE-140139
#preflight 6244bbb9f73c316f68e76bf3

[CL 19564411 by Steve Robb in ue5-main branch]
2022-03-30 16:57:01 -04:00
Steve Robb
51802de52f UE_ prefix added to math macros, with switches for turning on deprecation and removal for the old macros.
Fixes for all the macro use in Core.

#rb robert.manuszewski
#jira UE-140139
#preflight 623c54628900c14eecdea9c6

[CL 19493359 by Steve Robb in ue5-main branch]
2022-03-24 07:49:46 -04:00
Steve Robb
897dd170ab Replacement of DEPRECATED_MACRO with UE_DEPRECATED_MACRO.
#rb devin.doucette
#jira none
#preflight 623b225a7b69b01ec16118a7

[CL 19480377 by Steve Robb in ue5-main branch]
2022-03-23 12:07:25 -04:00
zach bethel
50274e3050 Converted FIntPoint / FIntVector / FIntRect to a template type and added unsigned variants.
#rb luke.thatcher, andrew.davidson, steve.robb
#preflight 6239e9d204769ab49354a30f

[CL 19468937 by zach bethel in ue5-main branch]
2022-03-22 13:40:58 -04:00
fabian giesen
44b81d0e43 FLinearColor conversion optimizations and some fixes.
FLinearColor ctor from FColor is mainly three table lookups, make it inline and move to the header.
Quantize, QuantizeFloor, QuantizeRound are similarly trivial, now inline.
Move Clamp01 to FColor as static method so it's namespaced; rename to Clamp01NansTo0 to explain why it's not just FMath::Clamp to [0,1]
SSE2-ified FLinearColor::ToFColorSRGB for x86 targets, bitwise exact same results as before for all input floats (tested exhaustively, test included)
Don't want to make ToFColorSRGB inline, it's a bit large for that, but make an array version that does multiple at once. Mainly try to avoid doing a cross-DLL call per pixel for large batches.
Switch ImageCore Linear->sRGB conv to use array version.
FLinearColor R,G,B,A members union'd with "deprecated" RGBA[] array, Component() updated to use it (matching recent fix for FVector)
ImageCore vector loads from FLinearColors updated to use &Component(0) which gives &RGBA[0], pointer to a 4-elem array
Add tests to UnrealMathTest.cpp to verify that sRGB<->Linear and UNORM<->Linear conversions behave as expected, plus the separate ColorConversionHeavy test that does the exhaustive equivalence check between the SSE2 ToFColorSRGB() and reference (warning: takes a while)

#rb danny.couture, martins.mozeiko
#preflight 6238c86f04769ab493469a3f

[CL 19456245 by fabian giesen in ue5-main branch]
2022-03-21 15:07:04 -04:00
fabian giesen
d0472685e2 Fix FLinearColor::ToFColorSRGB handling of large A, Quantize handling of large R/G/B/A.
For large enough floats x (e.g. 1e+7f), x*255 is too large to convert to int. On x86 this turns into INT_MIN which then gets clamped to 0, on ARM it gets saturated and turns into INT_MAX which gets clamped to 255.

Fix it so that over-large values result in 255 (which is the more natural behavior) everywhere and note the conversion rules used for both the sRGB and the linear channels while I'm here. Also update ImageCore optimized kernels to include the QuantizeRound fix.

Confirmed to produce bitwise identical results for textures on AncientGame (i.e. nop on typical content).

#jira  UE-146294
#preflight 6234ffcc48746817f14025dc
#rb martins.mozeiko

[CL 19442181 by fabian giesen in ue5-main branch]
2022-03-18 18:24:46 -04:00
Tim Smith
2bf67af6e7 UHT in UBT initial version. Currently disabled.
Tested against UnrealEditor, ShooterGame, QAGame, FortniteGame, Lyra, CitySample, and a local project

Ciode review was a preliminary review for a coding style.

#rnx
#rb jonathan.adamczewski, joe.kirchoff
#preflight 6220cfb76f26901529b6514e

[CL 19243710 by Tim Smith in ue5-main branch]
2022-03-03 09:59:05 -05:00
zak middleton
77f452fb9b #ue5 - LWC: Added *ToInt32() versions to Trunc/Round/Floor/Ceil to make those able to be explicit and cleaner to replace where needed. Added missing TruncToInt64(double), RoundToInt(double), RoundToInt64(double).
Added overloads for *ToFloat(double) methods to TUnrealPlatformMathSSE4Base to avoid ambiguous overloads (and make it easier for us to update later when do another pass at int64 versions).

Resolved ambiguous Max() and Min() calls when mixing int32/int64, float/double, etc by using macro to promote to the largest precision type.

#jira UE-124808
#rb Andrew.Davidson
#lockdown Julien.Marchand
#preflight 6206fa3af7376af79b56ea83

#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18984296 in //UE5/Release-5.0/... via CL 18985501 via CL 18987604
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18987966 by zak middleton in ue5-main branch]
2022-02-14 18:29:44 -05:00
shawn mcgrath
c4bd825d8b Moving third party lib into ThirdParty and corresponding simd fixups and addtional simd functionality #rb stu.mckenna #preflight 620a651d6e5d06a54291e1ce
[CL 18983019 by shawn mcgrath in ue5-main branch]
2022-02-14 13:49:00 -05:00
andrew davidson
c08177950b LWC: Double NetSerialize support for FVector/FVector2D.
Backwards compatibility with replays from float based builds.
#rb ryan.gerleve
#preflight 61f3ed956b5aea38e5b68e9c

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18770363 in //UE5/Release-5.0/... via CL 18770369 via CL 18770589
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18770595 by andrew davidson in ue5-main branch]
2022-01-28 09:06:33 -05:00
marc audy
f58e74d6f4 Final(?) fix for -nopch linker issues but also not breaking other platforms
#rb Aurel.Cordonnier
[CODEREVIEW] Zak.Middleton, Andrew.Davidson
#rnx
#jira

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18726718 via CL 18726727 via CL 18726743 via CL 18727559 via CL 18727890
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18727913 by marc audy in ue5-main branch]
2022-01-25 16:02:57 -05:00
ben woodhouse
3337972c23 Non-SSE platforms compile fix
[CODEREVIEW] Andrew.Davidson, Zak.Middleton
#rb Aurel.Cordonnier, Ben.Woodhouse
#jira
#rnx

#ROBOMERGE-AUTHOR: ben.woodhouse
#ROBOMERGE-SOURCE: CL 18721153 via CL 18721173 via CL 18721177 via CL 18724669 via CL 18725098
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18725122 by ben woodhouse in ue5-main branch]
2022-01-25 13:02:17 -05:00
marc audy
24c7f7c62d Fix VectorMatrixMultiply not existing if -nopch is used
[CODEREVIEW] Andrew.Davidson, Zak.Middleton
#rb Aurel.Cordonnier, Ben.Woodhouse
#jira
#rnx

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18720641 via CL 18720643 via CL 18720644 via CL 18720812 via CL 18720886
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18720889 by marc audy in ue5-main branch]
2022-01-25 04:42:27 -05:00