Commit Graph

463 Commits

Author SHA1 Message Date
Devin Doucette
938e209187 CompositeBuffer: Added EqualBytes to compare the contents of two composite buffers
#preflight 62869550286cf1867a059f88
#rb Zousar.Shaker

[CL 20287260 by Devin Doucette in ue5-main branch]
2022-05-19 16:45:47 -04:00
Andriy Tylychko
355cb277e8 FTaskPriorityCVar - a console var to configure Tasks System priorities, by analogy with FAutoConsoleTaskPriority for TaskGraph
#preflight 628386e43f6aa88b1a777e76

[CL 20240822 by Andriy Tylychko in ue5-main branch]
2022-05-17 07:43:35 -04:00
Yuriy ODonnell
714ce9e6ff Fix compile errors when Find() is used on a const TRobinHoodHashMap/Set, add basic automated test
#rb arne.schober
#preflight 628294047d471e73a5667dc9

[CL 20228682 by Yuriy ODonnell in ue5-main branch]
2022-05-16 14:36:58 -04:00
Andriy Tylychko
573d2c69a4 fixed task retraction while waiting on named threads. check the new unit test for exact conditions
#rb francis.hurteau
#preflight 627d27784a05ef0394cc3970

[CL 20165251 by Andriy Tylychko in ue5-main branch]
2022-05-12 11:46:49 -04:00
Andriy Tylychko
6f55471852 added unit-tests for Tasks System to demonstrate how pipe retraction works
#preflight 6273c2461364d1b5cc4d0961

[CL 20056536 by Andriy Tylychko in ue5-main branch]
2022-05-05 08:49:03 -04:00
Andriy Tylychko
c0e85478d9 removed "BlockingWorkers" TaskGraph unit test as it's not relevant anymore
#preflight 62726c4ae95a8b960eadb94f

[CL 20040250 by Andriy Tylychko in ue5-main branch]
2022-05-04 08:15:27 -04:00
Andriy Tylychko
3843ea9667 moved EExtendedTaskPriority from the private to the public Tasks System API. This allows:
1) to use "inline" priority publicly, which is often helpful for perf
2) to use Tasks System with named threads (only if "tasks integration" is enabled - `TASKGRAPH_NEW_FRONTEND`)
#preflight 6271491cfe09c0cfbc3c5b69

[CL 20027004 by Andriy Tylychko in ue5-main branch]
2022-05-03 12:01:34 -04:00
fabian giesen
59068a179f UnrealMathTest Color conversion tests: don't test NaN/inf when compiled with fast/finite math only
These compiler flags promise that NaN/Inf won't occur and allows the compiler to make transformations that break in the presence of these values. As long as we compile with this on, there's no expectation that these values behave in any particular way, and no sane way to test it.

#jira UE-149288
#rb sean.barrett, charles.bloom
#preflight 626c65e09e6bef179217b30e
#preflight 626c6a59320b21984490a080

[CL 19987806 by fabian giesen in ue5-main branch]
2022-04-29 18:58:18 -04:00
Zak Middleton
44e593855e #ue5 - LWC: add missing VectorClamp() for doubles, it was only defined for floats, and also not in UnrealMathFPU.
#jira none
#preflight 626c38ac9e6bef17920d445c
#rb none

[CL 19984279 by Zak Middleton in ue5-main branch]
2022-04-29 15:53:27 -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
Zak Middleton
7646f156c5 #ue5 - VectorMod() uses either SVML fmod or std::fmod(). Previous alternate implementations could result in different results with certain inputs, especially when FMA3 was not available.
#jira UE-150201
#preflight 62684dbe2f53f9169a7388b1
#rb Dmytro.Vovk

[CL 19928187 by Zak Middleton in ue5-main branch]
2022-04-26 16:40:32 -04:00
Andriy Tylychko
a14be302ec added TTask::IsAwaitable() to detect if the task can be waited for from the current thread. The only case that is detected right now is a waiting from inside a task that leads to a deadlock. Required by parallel animation evaluation to detect that a code is executed inside a task during task retraction.
#rb francis.hurteau, danny.couture
#preflight 626802fb853fdb6fddbcaa37

[CL 19920343 by Andriy Tylychko in ue5-main branch]
2022-04-26 11:03:40 -04:00
Brandon Schaefer
07e79d9dbc Comment out broken tests for Non-Windows platforms
#jira UE-150201
#rb none
#fyi Dmytro.Vovk, Zak.Middleton
#preflight none

[CL 19919893 by Brandon Schaefer in ue5-main branch]
2022-04-26 10:35:28 -04:00
Zak Middleton
5c4d1add39 #ue5 - LWC: Improve precision of some math functions and optimize/improve some SSE-specific implementations where possible.
- FMath::Fmod() changed to use standard fmod() function, because old version could go out of range for combinations of very large and very small values. VectorMod() changed where possible to do the same.

- Fixed ambiguous naming conventions for many functions (inconsistency between InvSqrt, Reciprocal, etc and their estimate functions). Now the default for such functions is to be accurate, and the estimate functions are explicitly named with "Estimate".

- VectorReciprocalSqrt() implementation no longer refines an estimate, as this can diverge between Intel and AMD; this was an issue addressed earlier in UnrealPlatformMathSSE.h (CL 16466371) and we now match that implementation. VectorReciprocal() also no longer refines an estimate for the same reason. Attempted to use SVML InvSqrt however it suffered from measurable variations on AMD/Intel platforms.

- Added missing vectorized implementation for VectorPow() for doubles in SSE.

- Added missing VectorSqrt() implementations for doubles..

- Did a small pass at fixing up some missing functions in UnrealMathFPU so it can pass engine startup tests and HeadlessChaos tests when enabled, though there are a few more that need implementation updates for Niagara (to come soon).

#jira UE-129730
#rb Andrew.Davidson, Dmytro.Vovk
#preflight 62632206e70367fd1e0d29db

[CL 19906229 by Zak Middleton in ue5-main branch]
2022-04-25 14:19:05 -04:00
Devin Doucette
92a888c1f6 Replaced uses of _ASV with ANSITEXTVIEW
#preflight 6266acf50634d0904cdfe91c
#rb Steve.Robb
#rnx

[CL 19903251 by Devin Doucette in ue5-main branch]
2022-04-25 11:31:36 -04:00
Devin Doucette
0b7aa65637 Replaced uses of _U8SV with UTF8TEXTVIEW
#preflight 626310ac006fa20b683d17b9
#rb Zousar.Shaker
#rnx

[CL 19901490 by Devin Doucette in ue5-main branch]
2022-04-25 09:36:34 -04:00
Zak Middleton
f3f319fbf0 [Backout] - CL19868793.
#fyi Zak.Middleton
Original CL Desc
-----------------------------------------------------------------
#ue5 - LWC: Improve precision of some math functions (FMod / VectorMod) on SSE by using SVML where possible. FMath::Fmod() changed to use standard fmod() function. Fixed ambiguous naming conventions for many functions (inconsistency between InvSqrt, Reciprocal, etc and their estimate functions). Now the default for such functions is to be accurate, and the estimate functions are explicitly named with "Estimate".

Added missing vectorized implementation for VectorPow() for doubles. Fixed some missing VectorSqrt() overrides.

Did a small pass at fixing up some missing functions in UnrealMathFPU so it can pass start tests and HeadlessChaos tests when enabled, though there are a few more that need updates for Niagara (to come soon).

#jira UE-129730
#rb Andrew.Davidson, Dmytro.Vovk
#preflight 6260739e080c6600634ca48b, 625f0f5d5f498a37c9263f29

[CL 19870070 by Zak Middleton in ue5-main branch]
2022-04-22 15:21:17 -04:00
Zak Middleton
2fa28c05d8 #ue5 - LWC: Improve precision of some math functions (FMod / VectorMod) on SSE by using SVML where possible. FMath::Fmod() changed to use standard fmod() function. Fixed ambiguous naming conventions for many functions (inconsistency between InvSqrt, Reciprocal, etc and their estimate functions). Now the default for such functions is to be accurate, and the estimate functions are explicitly named with "Estimate".
Added missing vectorized implementation for VectorPow() for doubles. Fixed some missing VectorSqrt() overrides.

Did a small pass at fixing up some missing functions in UnrealMathFPU so it can pass start tests and HeadlessChaos tests when enabled, though there are a few more that need updates for Niagara (to come soon).

#jira UE-129730
#rb Andrew.Davidson, Dmytro.Vovk
#preflight 6260739e080c6600634ca48b, 625f0f5d5f498a37c9263f29

[CL 19868793 by Zak Middleton in ue5-main branch]
2022-04-22 14:35:14 -04:00
Andriy Tylychko
6dc7e96884 this line got lost in the previous big refactoring, adding it back. a cosmetic change for consistency, as it doesn't affect anything
#preflight trivial

[CL 19810588 by Andriy Tylychko in ue5-main branch]
2022-04-19 12:20:08 -04:00
bob tellez
5aa4f15763 #UE Remove hidden character found by static analysis
[FYI] Jamie.Dale

#ROBOMERGE-OWNER: bob.tellez
#ROBOMERGE-AUTHOR: bob.tellez
#ROBOMERGE-SOURCE: CL 19790591 via CL 19790755 via CL 19790777
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v939-19570697)

[CL 19809472 by bob tellez in ue5-main branch]
2022-04-19 11:28:32 -04:00
Andriy Tylychko
fcdbf6843b Tasks system refactoring and general optimisations:
* tasks store task body by value in place
* pooled task allocation
* FTaskEvent doesn't have a body and is not executed
* basic waiting for a task (w/o timeout) allocates the waiting task on the stack
* optimised internal atomic state and task retraction

#rb francis.hurteau
#preflight https://horde.devtools.epicgames.com/job/625e84b0d412434587e1b740

[CL 19805905 by Andriy Tylychko in ue5-main branch]
2022-04-19 06:03:04 -04:00
Johan Torp
35d9fd41b7 Fix EGuidFormats::Short so that it uses Base64 encoding as the documentation states
Changes semantics of FGuid <-> Short string conversion, which might cause issues with persisted short GUIDs. The Short format is used sparingly and only to create unique strings via FGuid::NewGuid().ToString(EGuidFormats::Short), so I suspect we won't see any fallout from this.

FGuid::AppendString(FAnsiStringBuilderBase&) was totally broken and serialized stack pointers instead of GUID, but noone was using that path
#preflight 624e8b09683a7dd323ced612

[CL 19665698 by Johan Torp in ue5-main branch]
2022-04-07 03:26:43 -04:00
mark lintott
a0ed1e1907 Fix for static analysis warning
#jira UE-145761,UE-147685
#rb trivial
#preflight 624d868dcc0872e96b194a43

[CL 19645775 by mark lintott in ue5-main branch]
2022-04-06 08:32:23 -04:00
Julien StJean
6a91e82188 Added the test for the creation of an unique buffer from an array.
#jira none
#rb Devin.Doucette
#preflight 62474e69927e60e3417a8fe7

[CL 19593857 by Julien StJean in ue5-main branch]
2022-04-01 15:26:31 -04:00