Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "VirtualSubjects/LiveLinkBlueprintVirtualSubject.h"
#endif

#include <limits>

/**
* Declare stats to see what takes up time in LiveLink
Expand Down Expand Up @@ -1667,7 +1668,7 @@ void FLiveLinkClient_Base_DEPRECATED::PushSubjectData(FGuid InSourceGuid, FName
}
for (int32 i = MaxNumberOfProperties; i < NumberOfPropertyNames; ++i)
{
NewData.PropertyValues[i] = INFINITY;
NewData.PropertyValues[i] = std::numeric_limits<float>::infinity();
}
PushSubjectFrameData_AnyThread(SubjectKey, MoveTemp(AnimationStruct));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "Engine/NetSerialization.h"
#include "UnitTestEnvironment.h"
#include <cmath>
#include <limits>

namespace PackedVectorTest
{
Expand Down Expand Up @@ -54,7 +55,7 @@ bool UPackedVectorTest::ExecuteUnitTest()
-180817.42f,
47.11f,
-FMath::Exp2(25.0f), // overflow
INFINITY, // non-finite
std::numeric_limits<float>::infinity(), // non-finite
};

static const float Quantize100_Values[] =
Expand All @@ -63,7 +64,7 @@ bool UPackedVectorTest::ExecuteUnitTest()
+180720.42f,
-19751216.0f,
FMath::Exp2(31.0f),
-INFINITY,
-std::numeric_limits<float>::infinity(),
};

struct TestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "PeakPicker.h"
#include "CoreMinimal.h"
#include "DSP/FloatArrayMath.h"
#include <limits>

namespace Audio
{
Expand All @@ -15,7 +16,7 @@ namespace Audio
Settings.NumPreMean = FMath::Max(1, Settings.NumPreMean);
Settings.NumPostMean = FMath::Max(1, Settings.NumPostMean);
Settings.NumWait = FMath::Max(1, Settings.NumWait);
Settings.MeanDelta = FMath::Clamp(Settings.MeanDelta, 1e-6f, INFINITY);
Settings.MeanDelta = FMath::Clamp(Settings.MeanDelta, 1e-6f, std::numeric_limits<float>::infinity());
}

void FPeakPicker::PickPeaks(TArrayView<const float> InData, TArray<int32>& OutPeakIndices)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class FExportMaterialProxy : public FMaterial, public FMaterialRenderProxy

////////////////
// FMaterialRenderProxy interface.
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type FeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type InFeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
{
if(GetRenderingThreadShaderMap())
{
Expand All @@ -330,7 +330,7 @@ class FExportMaterialProxy : public FMaterial, public FMaterialRenderProxy
else
{
OutFallbackMaterialRenderProxy = UMaterial::GetDefaultMaterial(MD_Surface)->GetRenderProxy();
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, OutFallbackMaterialRenderProxy);
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(InFeatureLevel, OutFallbackMaterialRenderProxy);
}
}

Expand Down Expand Up @@ -627,4 +627,4 @@ class FExportMaterialProxy : public FMaterial, public FMaterialRenderProxy
EMaterialProperty PropertyToCompile;
FGuid Id;
bool bSynchronousCompilation;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ class FExportMaterialProxy : public FMaterial, public FMaterialRenderProxy

////////////////
// FMaterialRenderProxy interface.
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type FeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type InFeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
{
if(GetRenderingThreadShaderMap())
{
Expand All @@ -499,7 +499,7 @@ class FExportMaterialProxy : public FMaterial, public FMaterialRenderProxy
else
{
OutFallbackMaterialRenderProxy = UMaterial::GetDefaultMaterial(MD_Surface)->GetRenderProxy();
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, OutFallbackMaterialRenderProxy);
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(InFeatureLevel, OutFallbackMaterialRenderProxy);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Engine/Source/Editor/MaterialEditor/Private/MaterialEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FMatExpressionPreview : public FMaterial, public FMaterialRenderProxy
////////////////
// FMaterialRenderProxy interface.

virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type FeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type InFeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
{
if(GetRenderingThreadShaderMap())
{
Expand All @@ -111,7 +111,7 @@ class FMatExpressionPreview : public FMaterial, public FMaterialRenderProxy
else
{
OutFallbackMaterialRenderProxy = UMaterial::GetDefaultMaterial(MD_Surface)->GetRenderProxy();
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, OutFallbackMaterialRenderProxy);
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(InFeatureLevel, OutFallbackMaterialRenderProxy);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class FLightmassMaterialProxy : public FMaterial, public FMaterialRenderProxy

////////////////
// FMaterialRenderProxy interface.
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type FeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type InFeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
{
if(GetRenderingThreadShaderMap())
{
Expand All @@ -325,7 +325,7 @@ class FLightmassMaterialProxy : public FMaterial, public FMaterialRenderProxy
else
{
OutFallbackMaterialRenderProxy = UMaterial::GetDefaultMaterial(MD_Surface)->GetRenderProxy();
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, OutFallbackMaterialRenderProxy);
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(InFeatureLevel, OutFallbackMaterialRenderProxy);
}
}

Expand Down
4 changes: 2 additions & 2 deletions Engine/Source/Editor/UnrealEd/Private/PreviewMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class FPreviewMaterial : public FMaterialResource, public FMaterialRenderProxy
virtual bool IsPersistent() const { return false; }

// FMaterialRenderProxy interface
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type FeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
virtual const FMaterial& GetMaterialWithFallback(ERHIFeatureLevel::Type InFeatureLevel, const FMaterialRenderProxy*& OutFallbackMaterialRenderProxy) const override
{
if(GetRenderingThreadShaderMap())
{
Expand All @@ -238,7 +238,7 @@ class FPreviewMaterial : public FMaterialResource, public FMaterialRenderProxy
else
{
OutFallbackMaterialRenderProxy = UMaterial::GetDefaultMaterial(MD_Surface)->GetRenderProxy();
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(FeatureLevel, OutFallbackMaterialRenderProxy);
return OutFallbackMaterialRenderProxy->GetMaterialWithFallback(InFeatureLevel, OutFallbackMaterialRenderProxy);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright Epic Games, Inc. All Rights Reserved.
#include "Voronoi/Voronoi.h"


THIRD_PARTY_INCLUDES_START
#include "voro++/voro++.hh"
THIRD_PARTY_INCLUDES_END

#include <limits>

namespace {

// initialize AABB, ignoring NaNs
Expand Down Expand Up @@ -80,7 +81,7 @@ namespace {

// If points are too far apart, voro++ will ask for unbounded memory to build its grid over space
// TODO: Figure out reasonable bounds / behavior for this case
ensure(BoundingBoxSize.GetMax() < HUGE_VALF);
ensure(BoundingBoxSize.GetMax() < std::numeric_limits<float>::max());


int NumSites = Sites.Num();
Expand Down Expand Up @@ -273,4 +274,4 @@ int32 FVoronoiDiagram::FindCell(const FVector& Pos)
// Voronoi.ComputeAllCells(AllCells);
//}

const float FVoronoiDiagram::DefaultBoundingBoxSlack = .1f;
const float FVoronoiDiagram::DefaultBoundingBoxSlack = .1f;
20 changes: 14 additions & 6 deletions Engine/Source/Runtime/RenderCore/Private/RenderGraphPrivate.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright Epic Games, Inc. All Rights Reserved.

#include "RenderGraphPrivate.h"
#include <limits>
#include <cmath>

#if RDG_ENABLE_DEBUG

Expand Down Expand Up @@ -170,19 +172,25 @@ bool IsDebugAllowedForResource(const TCHAR* ResourceName)

FLinearColor GetClobberColor()
{
switch (GRDGClobberResources)
float x;
switch ((int32_t)GRDGClobberResources)
{
case 1:
return FLinearColor(1000, 1000, 1000, 1000);
x = 1000.0F;
break;
case 2:
return FLinearColor(NAN, NAN, NAN, NAN);
x = std::numeric_limits<float>::quiet_NaN();
break;
case 3:
return FLinearColor(INFINITY, INFINITY, INFINITY, INFINITY);
x = std::numeric_limits<float>::infinity();
break;
case 4:
return FLinearColor(0, 0, 0, 0);
x = 0.0F;
break;
default:
return FLinearColor::Black;
}
return FLinearColor(x, x, x, x);
}

uint32 GetClobberBufferValue()
Expand Down Expand Up @@ -395,4 +403,4 @@ void InitRenderGraph()
CVarRDGDebugResourceFilter->Set(*ResourceFilter);
}
#endif
}
}