You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Added VectorMaskBits math tests
#jira none #rb none #ROBOMERGE-SOURCE: CL 16608487 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559) [CL 16608494 by dmytro vovk in ue5-release-engine-test branch]
This commit is contained in:
@@ -1795,6 +1795,17 @@ bool RunDoubleVectorTest()
|
||||
V1 = MakeVectorRegister(1.0, 3.0, 5.0, 7.0);
|
||||
LogTest<double>(TEXT("VectorDeinterleave"), TestVectorsEqual(V2, V0) && TestVectorsEqual(V3, V1));
|
||||
|
||||
// VectorMaskBits
|
||||
V0 = MakeVectorRegister(1.0, 2.0, 3.0, 4.0);
|
||||
uint32 MaskBits = VectorMaskBits(V0);
|
||||
LogTest<double>(TEXT("VectorMaskBits"), MaskBits == 0);
|
||||
V0 = MakeVectorRegister(-1.0, -2.0, -3.0, -4.0);
|
||||
MaskBits = VectorMaskBits(V0);
|
||||
LogTest<double>(TEXT("VectorMaskBits"), MaskBits == 0xf);
|
||||
V0 = MakeVectorRegister(-1.0, 2.0, -3.0, 4.0);
|
||||
MaskBits = VectorMaskBits(V0);
|
||||
LogTest<double>(TEXT("VectorMaskBits"), MaskBits == 5);
|
||||
|
||||
|
||||
// NaN / Inf tests
|
||||
// Using a union as we need to do a bitwise cast of 0xFFFFFFFF into a float.
|
||||
@@ -2326,6 +2337,18 @@ bool FVectorRegisterAbstractionTest::RunTest(const FString& Parameters)
|
||||
V3 = VectorFloor(V0);
|
||||
LogTest<float>(TEXT("VectorFloor"), TestVectorsEqual(V2, V3));
|
||||
|
||||
// VectorMaskBits
|
||||
V0 = MakeVectorRegister(1.0f, 2.0f, 3.0f, 4.0f);
|
||||
uint32 MaskBits = VectorMaskBits(V0);
|
||||
LogTest<float>(TEXT("VectorMaskBits"), MaskBits == 0);
|
||||
V0 = MakeVectorRegister(-1.0f, -2.0f, -3.0f, -4.0f);
|
||||
MaskBits = VectorMaskBits(V0);
|
||||
LogTest<float>(TEXT("VectorMaskBits"), MaskBits == 0xf);
|
||||
V0 = MakeVectorRegister(-1.0f, 2.0f, -3.0f, 4.0f);
|
||||
MaskBits = VectorMaskBits(V0);
|
||||
LogTest<float>(TEXT("VectorMaskBits"), MaskBits == 5);
|
||||
|
||||
|
||||
FMatrix44f M0, M1, M2, M3; // LWC_TODO: Need double version tests!
|
||||
FVector3f Eye, LookAt, Up;
|
||||
// Create Look at Matrix
|
||||
|
||||
Reference in New Issue
Block a user