From 751575ffb492203ae716e390f544f68728dbeba1 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 6 Nov 2024 17:00:06 +1100 Subject: [PATCH 01/36] Get the plugin working in UE 5.5 Preview. --- .../CesiumPointAttenuationVertexFactory.ush | 32 ++- .../Private/CesiumEncodedFeaturesMetadata.cpp | 4 +- .../CesiumEncodedMetadataConversions.cpp | 16 +- .../CesiumEncodedMetadataConversions.h | 6 +- .../Tests/CesiumCameraManager.spec.cpp | 4 +- .../Tests/CesiumFeatureIdAttribute.spec.cpp | 4 +- .../Private/Tests/CesiumFeatureIdSet.spec.cpp | 4 +- .../Tests/CesiumFeatureIdTexture.spec.cpp | 4 +- .../Private/Tests/CesiumGeoreference.spec.cpp | 4 +- .../Private/Tests/CesiumGlobeAnchor.spec.cpp | 4 +- ...umMetadataPickingBlueprintLibrary.spec.cpp | 4 +- .../Tests/CesiumMetadataValue.spec.cpp | 4 +- .../Tests/CesiumOriginShiftComponent.spec.cpp | 4 +- .../Tests/CesiumPrimitiveFeatures.spec.cpp | 4 +- .../Tests/CesiumPropertyArray.spec.cpp | 4 +- .../Tests/CesiumPropertyTable.spec.cpp | 4 +- .../CesiumPropertyTableProperty.spec.cpp | 200 +++++++++--------- .../Tests/CesiumPropertyTexture.spec.cpp | 4 +- .../CesiumPropertyTextureProperty.spec.cpp | 4 +- .../Tests/CesiumTextureUtility.spec.cpp | 2 +- .../Private/Tests/GeoTransforms.spec.cpp | 4 +- .../Tests/GlobeAwareDefaultPawn.spec.cpp | 4 +- .../Tests/SampleHeightMostDetailed.spec.cpp | 4 +- .../Private/Tests/SubLevels.spec.cpp | 4 +- .../Tests/UnrealAssetAccessor.spec.cpp | 6 +- .../Tests/UnrealMetadataConversions.spec.cpp | 4 +- .../Private/UnrealAssetAccessor.cpp | 10 +- .../Public/UnrealAssetAccessor.h | 2 +- extern/CMakeLists.txt | 2 +- extern/cesium-native | 2 +- extern/vcpkg-overlays/ms-gsl/portfile.cmake | 73 +++++++ .../vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt | 36 ++++ extern/vcpkg-overlays/ms-gsl/vcpkg.json | 18 ++ 33 files changed, 332 insertions(+), 153 deletions(-) create mode 100644 extern/vcpkg-overlays/ms-gsl/portfile.cmake create mode 100644 extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt create mode 100644 extern/vcpkg-overlays/ms-gsl/vcpkg.json diff --git a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush index 6574e9c04..7ec41bed4 100644 --- a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush +++ b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush @@ -40,7 +40,7 @@ struct FVertexFactoryInput #endif }; -/** +/** * Per-vertex inputs. Used by passes with a trimmed down position-only shader. */ struct FPositionOnlyVertexFactoryInput @@ -54,7 +54,7 @@ struct FPositionOnlyVertexFactoryInput #endif }; -/** +/** * Per-vertex inputs. Used by passes with a trimmed down position-and-normal-only shader. */ struct FPositionAndNormalOnlyVertexFactoryInput @@ -83,7 +83,7 @@ struct FVertexFactoryIntermediates half TangentToWorldSign; half4 Color; - + /** Cached primitive and instance data */ FSceneDataIntermediates SceneData; }; @@ -119,7 +119,7 @@ half3x3 CalculateTangentToLocal(uint PointIndex, out float TangentSign) { half3 TangentInputX = PackedTangentsBuffer[2 * PointIndex + 0].xyz; half4 TangentInputZ = PackedTangentsBuffer[2 * PointIndex + 1].xyzw; - + half3 TangentX = TangentBias(TangentInputX); half4 TangentZ = TangentBias(TangentInputZ); @@ -127,7 +127,7 @@ half3x3 CalculateTangentToLocal(uint PointIndex, out float TangentSign) // Derive the binormal by getting the cross product of the normal and tangent half3 TangentY = cross(TangentZ.xyz, TangentX) * TangentZ.w; - + // Recalculate TangentX off of the other two vectors // This corrects quantization errors since TangentX was passed in as a quantized vertex input half3x3 Result; @@ -158,7 +158,7 @@ FVertexFactoryIntermediates GetVertexFactoryIntermediates(FVertexFactoryInput In { FVertexFactoryIntermediates Intermediates = (FVertexFactoryIntermediates)0; Intermediates.SceneData = VF_GPUSCENE_GET_INTERMEDIATES(Input); - + uint PointIndex = Input.VertexId / 4; uint CornerIndex = Input.VertexId - (PointIndex * 4); @@ -213,19 +213,19 @@ FVertexFactoryInterpolantsVSToPS VertexFactoryGetInterpolantsVSToPS( Interpolants.TangentToWorld0 = float4(Intermediates.TangentToWorld[0], 0); Interpolants.TangentToWorld2 = float4(Intermediates.TangentToWorld[2], Intermediates.TangentToWorldSign); Interpolants.Color = Intermediates.Color; - + #if NUM_TEX_COORD_INTERPOLATORS float2 CustomizedUVs[NUM_TEX_COORD_INTERPOLATORS]; GetMaterialCustomizedUVs(VertexParameters, CustomizedUVs); GetCustomInterpolators(VertexParameters, CustomizedUVs); - + UNROLL for (int CoordinateIndex = 0; CoordinateIndex < NUM_TEX_COORD_INTERPOLATORS; CoordinateIndex++) { SetUV(Interpolants, CoordinateIndex, CustomizedUVs[CoordinateIndex]); } #endif - + #if INSTANCED_STEREO Interpolants.EyeIndex = 0; #endif @@ -336,7 +336,7 @@ FMaterialVertexParameters GetMaterialVertexParameters( half3x3 TangentToLocal) { FMaterialVertexParameters Result = (FMaterialVertexParameters)0; - + Result.SceneData = Intermediates.SceneData; Result.WorldPosition = WorldPosition; Result.TangentToWorld = Intermediates.TangentToWorld; @@ -357,6 +357,16 @@ FMaterialVertexParameters GetMaterialVertexParameters( return Result; } +FMaterialVertexParameters GetMaterialVertexParameters( + FVertexFactoryInput Input, + FVertexFactoryIntermediates Intermediates, + float3 WorldPosition, + half3x3 TangentToLocal, + bool noIdeaWhatThisIs) +{ + return GetMaterialVertexParameters(Input, Intermediates, WorldPosition, TangentToLocal); +} + FMaterialPixelParameters GetMaterialPixelParameters(FVertexFactoryInterpolantsVSToPS Interpolants, float4 SvPosition) { FMaterialPixelParameters Result = MakeInitializedMaterialPixelParameters(); @@ -439,7 +449,7 @@ FVertexFactoryRayTracingInterpolants VertexFactoryInterpolate( float bInterp) { FVertexFactoryRayTracingInterpolants O; - + INTERPOLATE_MEMBER(InterpolantsVSToPS.TangentToWorld0.xyz); INTERPOLATE_MEMBER(InterpolantsVSToPS.TangentToWorld2); diff --git a/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.cpp b/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.cpp index 9528d8734..6c18d36d8 100644 --- a/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.cpp +++ b/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.cpp @@ -524,13 +524,13 @@ EncodedPropertyTable encodePropertyTableAnyThreadPart( CesiumEncodedMetadataParseColorFromString::encode( *pDescription, property, - gsl::span(pImage->pixelData), + std::span(pImage->pixelData), encodedFormat.bytesPerChannel * encodedFormat.channels); } else /* info.Conversion == ECesiumEncodedMetadataConversion::Coerce */ { CesiumEncodedMetadataCoerce::encode( *pDescription, property, - gsl::span(pImage->pixelData), + std::span(pImage->pixelData), encodedFormat.bytesPerChannel * encodedFormat.channels); } diff --git a/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.cpp b/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.cpp index 3384878a2..7ac5a7b4b 100644 --- a/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.cpp +++ b/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.cpp @@ -135,7 +135,7 @@ template void coerceAndEncodeArrays( const FCesiumPropertyTablePropertyDescription& propertyDescription, const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { int64 propertySize = UCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize(property); @@ -180,7 +180,7 @@ void coerceAndEncodeArrays( template void coerceAndEncodeScalars( const FCesiumPropertyTableProperty& property, - const gsl::span& textureData) { + const std::span& textureData) { int64 propertySize = UCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize(property); if (textureData.size() < propertySize * sizeof(T)) { @@ -208,7 +208,7 @@ void coerceAndEncodeScalars( template void coerceAndEncodeVec2s( const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { int64 propertySize = UCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize(property); @@ -254,7 +254,7 @@ void coerceAndEncodeVec2s( template void coerceAndEncodeVec3s( const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { int64 propertySize = UCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize(property); @@ -298,7 +298,7 @@ void coerceAndEncodeVec3s( template void coerceAndEncodeVec4s( const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { int64 propertySize = UCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize(property); @@ -383,7 +383,7 @@ bool CesiumEncodedMetadataCoerce::canEncode( void CesiumEncodedMetadataCoerce::encode( const FCesiumPropertyTablePropertyDescription& propertyDescription, const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { if (propertyDescription.PropertyDetails.bIsArray) { if (propertyDescription.EncodingDetails.ComponentType == @@ -497,7 +497,7 @@ glm::u8vec3 getRgbColorFromString(const FString& rgbString) { template void parseAndEncodeColors( const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { int64 propertySize = UCesiumPropertyTablePropertyBlueprintLibrary::GetPropertySize(property); @@ -555,7 +555,7 @@ bool CesiumEncodedMetadataParseColorFromString::canEncode( void CesiumEncodedMetadataParseColorFromString::encode( const FCesiumPropertyTablePropertyDescription& propertyDescription, const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize) { if (propertyDescription.EncodingDetails.ComponentType == ECesiumEncodedMetadataComponentType::Uint8) { diff --git a/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.h b/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.h index 09ad5fb60..d3ed133e6 100644 --- a/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.h +++ b/Source/CesiumRuntime/Private/CesiumEncodedMetadataConversions.h @@ -3,7 +3,7 @@ #pragma once #include "HAL/Platform.h" -#include +#include enum class ECesiumMetadataType : uint8; enum class ECesiumEncodedMetadataType : uint8; @@ -80,7 +80,7 @@ struct CesiumEncodedMetadataCoerce { static void encode( const FCesiumPropertyTablePropertyDescription& propertyDescription, const FCesiumPropertyTableProperty& property, - const gsl::span& pTextureData, + const std::span& pTextureData, size_t pixelSize); }; @@ -113,6 +113,6 @@ struct CesiumEncodedMetadataParseColorFromString { static void encode( const FCesiumPropertyTablePropertyDescription& propertyDescription, const FCesiumPropertyTableProperty& property, - const gsl::span& textureData, + const std::span& textureData, size_t pixelSize); }; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumCameraManager.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumCameraManager.spec.cpp index f1372ef20..a852d540c 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumCameraManager.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumCameraManager.spec.cpp @@ -8,7 +8,9 @@ BEGIN_DEFINE_SPEC( FCesiumCameraManagerSpec, "Cesium.Unit.CameraManager", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) END_DEFINE_SPEC(FCesiumCameraManagerSpec) diff --git a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdAttribute.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdAttribute.spec.cpp index 4cb47a251..0abfb1ca8 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdAttribute.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdAttribute.spec.cpp @@ -8,7 +8,9 @@ BEGIN_DEFINE_SPEC( FCesiumFeatureIdAttributeSpec, "Cesium.Unit.FeatureIdAttribute", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) CesiumGltf::Model model; CesiumGltf::MeshPrimitive* pPrimitive; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdSet.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdSet.spec.cpp index 881fe1d0c..7da2be043 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdSet.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdSet.spec.cpp @@ -10,7 +10,9 @@ BEGIN_DEFINE_SPEC( FCesiumFeatureIdSetSpec, "Cesium.Unit.FeatureIdSet", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) CesiumGltf::Model model; CesiumGltf::MeshPrimitive* pPrimitive; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp index 370dd3688..982d475a6 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumFeatureIdTexture.spec.cpp @@ -11,7 +11,9 @@ BEGIN_DEFINE_SPEC( FCesiumFeatureIdTextureSpec, "Cesium.Unit.FeatureIdTexture", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) CesiumGltf::Model model; CesiumGltf::MeshPrimitive* pPrimitive; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumGeoreference.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumGeoreference.spec.cpp index 779b24cb0..754b26e42 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumGeoreference.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumGeoreference.spec.cpp @@ -13,7 +13,9 @@ using namespace CesiumUtility; BEGIN_DEFINE_SPEC( FCesiumGeoreferenceSpec, "Cesium.Unit.Georeference", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) TObjectPtr pGeoreferenceNullIsland; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumGlobeAnchor.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumGlobeAnchor.spec.cpp index 6d51c2ddd..897ab41fb 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumGlobeAnchor.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumGlobeAnchor.spec.cpp @@ -9,7 +9,9 @@ BEGIN_DEFINE_SPEC( FCesiumGlobeAnchorSpec, "Cesium.Unit.GlobeAnchor", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) TObjectPtr pActor; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumMetadataPickingBlueprintLibrary.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumMetadataPickingBlueprintLibrary.spec.cpp index ff8c52312..099c59381 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumMetadataPickingBlueprintLibrary.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumMetadataPickingBlueprintLibrary.spec.cpp @@ -13,7 +13,9 @@ BEGIN_DEFINE_SPEC( FCesiumMetadataPickingSpec, "Cesium.Unit.MetadataPicking", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) CesiumGltf::Model model; CesiumGltf::MeshPrimitive* pPrimitive; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumMetadataValue.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumMetadataValue.spec.cpp index 49858c73e..be829c7e3 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumMetadataValue.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumMetadataValue.spec.cpp @@ -9,7 +9,9 @@ BEGIN_DEFINE_SPEC( FCesiumMetadataValueSpec, "Cesium.Unit.MetadataValue", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) END_DEFINE_SPEC(FCesiumMetadataValueSpec) diff --git a/Source/CesiumRuntime/Private/Tests/CesiumOriginShiftComponent.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumOriginShiftComponent.spec.cpp index e9a2d1efd..1b6e4be11 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumOriginShiftComponent.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumOriginShiftComponent.spec.cpp @@ -18,7 +18,9 @@ BEGIN_DEFINE_SPEC( FCesiumOriginShiftComponentSpec, "Cesium.Unit.OriginShiftComponent", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) TObjectPtr pWorld; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPrimitiveFeatures.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPrimitiveFeatures.spec.cpp index 63fac56c6..7dd21d9f1 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPrimitiveFeatures.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPrimitiveFeatures.spec.cpp @@ -8,7 +8,9 @@ BEGIN_DEFINE_SPEC( FCesiumPrimitiveFeaturesSpec, "Cesium.Unit.PrimitiveFeatures", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) CesiumGltf::Model model; CesiumGltf::MeshPrimitive* pPrimitive; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyArray.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyArray.spec.cpp index 6eae0eb5d..1c5e51b02 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyArray.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyArray.spec.cpp @@ -7,7 +7,9 @@ BEGIN_DEFINE_SPEC( FCesiumPropertyArraySpec, "Cesium.Unit.PropertyArray", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) END_DEFINE_SPEC(FCesiumPropertyArraySpec) diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTable.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTable.spec.cpp index 6f3a89394..c1cf7cc34 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTable.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTable.spec.cpp @@ -10,7 +10,9 @@ BEGIN_DEFINE_SPEC( FCesiumPropertyTableSpec, "Cesium.Unit.PropertyTable", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) CesiumGltf::Model model; CesiumGltf::ExtensionModelExtStructuralMetadata* pExtension; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp index 1ed3f52b4..66a1d1435 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp @@ -11,7 +11,9 @@ using namespace CesiumGltf; BEGIN_DEFINE_SPEC( FCesiumPropertyTablePropertySpec, "Cesium.Unit.PropertyTableProperty", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) END_DEFINE_SPEC(FCesiumPropertyTablePropertySpec) @@ -96,7 +98,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( @@ -177,7 +179,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( @@ -239,9 +241,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(), + std::span(data.data(), data.size()), + std::span(), + std::span(), PropertyComponentType::None, PropertyComponentType::None); @@ -305,11 +307,11 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span( + std::span(data.data(), data.size()), + std::span( offsetsData.data(), offsetsData.size()), - gsl::span(), + std::span(), PropertyComponentType::Uint16, PropertyComponentType::None); @@ -382,7 +384,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( @@ -497,7 +499,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( @@ -693,7 +695,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(8), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -729,7 +731,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(8), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -786,9 +788,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(offsetsData.data(), offsetsData.size()), + std::span(data.data(), data.size()), + std::span(), + std::span(offsetsData.data(), offsetsData.size()), PropertyComponentType::None, PropertyComponentType::Uint32); @@ -844,7 +846,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -880,7 +882,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -917,7 +919,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -961,7 +963,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1023,7 +1025,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1063,7 +1065,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1106,7 +1108,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1150,7 +1152,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1216,7 +1218,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1256,7 +1258,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1297,7 +1299,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1341,7 +1343,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1405,7 +1407,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1441,7 +1443,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1482,7 +1484,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1531,7 +1533,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1585,7 +1587,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1625,7 +1627,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1663,7 +1665,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1720,9 +1722,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(offsetsData.data(), offsetsData.size()), + std::span(data.data(), data.size()), + std::span(), + std::span(offsetsData.data(), offsetsData.size()), PropertyComponentType::None, PropertyComponentType::Uint8); FCesiumPropertyTableProperty property(propertyView); @@ -1771,7 +1773,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1829,7 +1831,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1874,7 +1876,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1915,7 +1917,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -1965,7 +1967,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2030,7 +2032,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2075,7 +2077,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2117,7 +2119,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2175,9 +2177,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(offsetsData.data(), offsetsData.size()), + std::span(data.data(), data.size()), + std::span(), + std::span(offsetsData.data(), offsetsData.size()), PropertyComponentType::None, PropertyComponentType::Uint8); FCesiumPropertyTableProperty property(propertyView); @@ -2229,7 +2231,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2291,7 +2293,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2336,7 +2338,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2378,7 +2380,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2433,7 +2435,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2498,7 +2500,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2543,7 +2545,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2585,7 +2587,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2640,7 +2642,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2702,7 +2704,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2747,7 +2749,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2789,7 +2791,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2851,9 +2853,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(offsetsData.data(), offsetsData.size()), + std::span(data.data(), data.size()), + std::span(), + std::span(offsetsData.data(), offsetsData.size()), PropertyComponentType::None, PropertyComponentType::Uint8); FCesiumPropertyTableProperty property(propertyView); @@ -2905,7 +2907,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -2967,7 +2969,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3012,7 +3014,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3058,7 +3060,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3125,9 +3127,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(offsetsData.data(), offsetsData.size()), + std::span(data.data(), data.size()), + std::span(), + std::span(offsetsData.data(), offsetsData.size()), PropertyComponentType::None, PropertyComponentType::Uint8); FCesiumPropertyTableProperty property(propertyView); @@ -3179,7 +3181,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3252,7 +3254,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3308,7 +3310,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3371,7 +3373,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3424,7 +3426,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3474,7 +3476,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3537,7 +3539,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -3588,7 +3590,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "PropertyTablePropertyStatus", @@ -3652,9 +3654,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(), + std::span(data.data(), data.size()), + std::span(), + std::span(), PropertyComponentType::None, PropertyComponentType::None); FCesiumPropertyTableProperty property(propertyView); @@ -3710,9 +3712,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(), + std::span(data.data(), data.size()), + std::span(), + std::span(), PropertyComponentType::None, PropertyComponentType::None); FCesiumPropertyTableProperty property(propertyView); @@ -3778,11 +3780,11 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span( + std::span(data.data(), data.size()), + std::span( offsetsData.data(), offsetsData.size()), - gsl::span(), + std::span(), PropertyComponentType::Uint16, PropertyComponentType::None); FCesiumPropertyTableProperty property(propertyView); @@ -3854,9 +3856,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(), + std::span(data.data(), data.size()), + std::span(), + std::span(), PropertyComponentType::None, PropertyComponentType::None); FCesiumPropertyTableProperty property(propertyView); @@ -3942,9 +3944,9 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, size, - gsl::span(data.data(), data.size()), - gsl::span(), - gsl::span(), + std::span(data.data(), data.size()), + std::span(), + std::span(), PropertyComponentType::None, PropertyComponentType::None); FCesiumPropertyTableProperty property(propertyView); @@ -4045,7 +4047,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -4087,7 +4089,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -4137,7 +4139,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -4184,7 +4186,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", @@ -4242,7 +4244,7 @@ void FCesiumPropertyTablePropertySpec::Define() { propertyTableProperty, classProperty, static_cast(values.size()), - gsl::span(data.data(), data.size())); + std::span(data.data(), data.size())); FCesiumPropertyTableProperty property(propertyView); TestEqual( "status", diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp index 512597a5a..c88059739 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp @@ -12,7 +12,9 @@ BEGIN_DEFINE_SPEC( FCesiumPropertyTextureSpec, "Cesium.Unit.PropertyTexture", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) Model model; MeshPrimitive* pPrimitive; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp index 8229b5ef8..073446de0 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp @@ -9,7 +9,9 @@ BEGIN_DEFINE_SPEC( FCesiumPropertyTexturePropertySpec, "Cesium.Unit.PropertyTextureProperty", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) const std::vector texCoords{ FVector2D(0, 0), diff --git a/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp index 764efa69d..fea05be2a 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumTextureUtility.spec.cpp @@ -15,7 +15,7 @@ using namespace CesiumUtility; BEGIN_DEFINE_SPEC( CesiumTextureUtilitySpec, "Cesium.Unit.CesiumTextureUtility", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | EAutomationTestFlags::ProductFilter | EAutomationTestFlags::NonNullRHI) std::vector originalPixels; std::vector originalMipPixels; diff --git a/Source/CesiumRuntime/Private/Tests/GeoTransforms.spec.cpp b/Source/CesiumRuntime/Private/Tests/GeoTransforms.spec.cpp index 2ab9e6f9d..117f0b018 100644 --- a/Source/CesiumRuntime/Private/Tests/GeoTransforms.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/GeoTransforms.spec.cpp @@ -11,7 +11,9 @@ using namespace CesiumUtility; BEGIN_DEFINE_SPEC( FGeoTransformsSpec, "Cesium.Unit.GeoTransforms", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) END_DEFINE_SPEC(FGeoTransformsSpec) diff --git a/Source/CesiumRuntime/Private/Tests/GlobeAwareDefaultPawn.spec.cpp b/Source/CesiumRuntime/Private/Tests/GlobeAwareDefaultPawn.spec.cpp index fbe751339..84098476d 100644 --- a/Source/CesiumRuntime/Private/Tests/GlobeAwareDefaultPawn.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/GlobeAwareDefaultPawn.spec.cpp @@ -17,7 +17,9 @@ BEGIN_DEFINE_SPEC( FGlobeAwareDefaultPawnSpec, "Cesium.Unit.GlobeAwareDefaultPawn", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) FDelegateHandle subscriptionPostPIEStarted; diff --git a/Source/CesiumRuntime/Private/Tests/SampleHeightMostDetailed.spec.cpp b/Source/CesiumRuntime/Private/Tests/SampleHeightMostDetailed.spec.cpp index 6f766faff..479e63beb 100644 --- a/Source/CesiumRuntime/Private/Tests/SampleHeightMostDetailed.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/SampleHeightMostDetailed.spec.cpp @@ -10,7 +10,9 @@ BEGIN_DEFINE_SPEC( FSampleHeightMostDetailedSpec, "Cesium.Unit.SampleHeightMostDetailed", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) TObjectPtr pTileset; diff --git a/Source/CesiumRuntime/Private/Tests/SubLevels.spec.cpp b/Source/CesiumRuntime/Private/Tests/SubLevels.spec.cpp index 3cd88dca3..383c17b19 100644 --- a/Source/CesiumRuntime/Private/Tests/SubLevels.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/SubLevels.spec.cpp @@ -18,7 +18,9 @@ BEGIN_DEFINE_SPEC( FSubLevelsSpec, "Cesium.Unit.SubLevels", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) TObjectPtr pWorld; diff --git a/Source/CesiumRuntime/Private/Tests/UnrealAssetAccessor.spec.cpp b/Source/CesiumRuntime/Private/Tests/UnrealAssetAccessor.spec.cpp index 23ad0b24d..48f9e46fa 100644 --- a/Source/CesiumRuntime/Private/Tests/UnrealAssetAccessor.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/UnrealAssetAccessor.spec.cpp @@ -12,7 +12,9 @@ BEGIN_DEFINE_SPEC( FUnrealAssetAccessorSpec, "Cesium.Unit.UnrealAssetAccessor", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) FString Filename; @@ -31,7 +33,7 @@ void TestAccessorRequest(const FString& Uri, const std::string& expectedData) { if (!Response) return; - gsl::span data = Response->data(); + std::span data = Response->data(); TestEqual("data length", data.size(), expectedData.size()); std::string s( reinterpret_cast(data.data()), diff --git a/Source/CesiumRuntime/Private/Tests/UnrealMetadataConversions.spec.cpp b/Source/CesiumRuntime/Private/Tests/UnrealMetadataConversions.spec.cpp index f4c9e9af0..f4e81ea48 100644 --- a/Source/CesiumRuntime/Private/Tests/UnrealMetadataConversions.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/UnrealMetadataConversions.spec.cpp @@ -9,7 +9,9 @@ BEGIN_DEFINE_SPEC( FUnrealMetadataConversionsSpec, "Cesium.Unit.MetadataConversions", - EAutomationTestFlags::ApplicationContextMask | + EAutomationTestFlags::EditorContext | EAutomationTestFlags::ClientContext | + EAutomationTestFlags::ServerContext | + EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) END_DEFINE_SPEC(FUnrealMetadataConversionsSpec) diff --git a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp index d26da1e2b..6ede3bb33 100644 --- a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp +++ b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp @@ -59,9 +59,9 @@ class UnrealAssetResponse : public CesiumAsync::IAssetResponse { return this->_headers; } - virtual gsl::span data() const override { + virtual std::span data() const override { const TArray& content = this->_pResponse->GetContent(); - return gsl::span( + return std::span( reinterpret_cast(content.GetData()), content.Num()); } @@ -235,7 +235,7 @@ UnrealAssetAccessor::request( const std::string& verb, const std::string& url, const std::vector& headers, - const gsl::span& contentPayload) { + const std::span& contentPayload) { const FString& userAgent = this->_userAgent; const TMap& cesiumRequestHeaders = @@ -319,8 +319,8 @@ class UnrealFileAssetRequestResponse : public CesiumAsync::IAssetRequest, virtual std::string contentType() const override { return std::string(); } - virtual gsl::span data() const override { - return gsl::span( + virtual std::span data() const override { + return std::span( reinterpret_cast(this->_data.GetData()), size_t(this->_data.Num())); } diff --git a/Source/CesiumRuntime/Public/UnrealAssetAccessor.h b/Source/CesiumRuntime/Public/UnrealAssetAccessor.h index 0a76c3fe6..01095bcf9 100644 --- a/Source/CesiumRuntime/Public/UnrealAssetAccessor.h +++ b/Source/CesiumRuntime/Public/UnrealAssetAccessor.h @@ -26,7 +26,7 @@ class CESIUMRUNTIME_API UnrealAssetAccessor const std::string& verb, const std::string& url, const std::vector& headers, - const gsl::span& contentPayload) override; + const std::span& contentPayload) override; virtual void tick() noexcept override; diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 5fce667b1..1491053b9 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -12,7 +12,7 @@ endif() if (NOT UNREAL_ENGINE_ROOT) # On Windows, try to use the default UE 5.2 location - set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.2") + set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.5") if (WIN32 AND EXISTS "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}") set(UNREAL_ENGINE_ROOT "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}") else() diff --git a/extern/cesium-native b/extern/cesium-native index b164fc915..9c616411b 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit b164fc915ffd9080e0d3f7c3f72076b1e65090ed +Subproject commit 9c616411bad8dadbc07b718e54f0ec4f0fe21f2a diff --git a/extern/vcpkg-overlays/ms-gsl/portfile.cmake b/extern/vcpkg-overlays/ms-gsl/portfile.cmake new file mode 100644 index 000000000..36c674662 --- /dev/null +++ b/extern/vcpkg-overlays/ms-gsl/portfile.cmake @@ -0,0 +1,73 @@ +if (NOT DEFINED ENV{UNREAL_ENGINE_ROOT}) + message(FATAL_ERROR "The environment variable `UNREAL_ENGINE_ROOT` must be defined.") +endif() + +message(STATUS "Using Unreal Engine installation at $ENV{UNREAL_ENGINE_ROOT}") + +# UE 5.5 is the first version of UE to include GSL, and it only has a single version of it. This logic may need to +# change if a future UE version includes multiple copies of GSL. +set(GSL_VERSIONS_DIR "$ENV{UNREAL_ENGINE_ROOT}/Engine/Source/ThirdParty/GuidelinesSupportLibrary") +file(GLOB GSL_POSSIBLE_ROOT_DIRS LIST_DIRECTORIES true "${GSL_VERSIONS_DIR}/*") + +# Find the subdirectories, each of which should represent a GSL version. +set(GSL_VERSION_DIRS "") +foreach(GSL_POSSIBLE_ROOT_DIR IN LISTS GSL_POSSIBLE_ROOT_DIRS) + if(IS_DIRECTORY "${GSL_POSSIBLE_ROOT_DIR}") + list(APPEND GSL_VERSION_DIRS "${GSL_POSSIBLE_ROOT_DIR}") + endif() +endforeach() + +# There should be either zero versions (UE 5.2-5.4) or one version (UE 5.5). +# Otherwise we don't know what to do. +list(LENGTH GSL_VERSION_DIRS GSL_VERSION_DIRS_LENGTH) +if(GSL_VERSION_DIRS_LENGTH EQUAL 0) + # Use the standard GSL from vcpkg + + #header-only library with an install target + vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Microsoft/GSL + REF a3534567187d2edc428efd3f13466ff75fe5805c + SHA512 5bd6aad37fee3b56a2ee2fed10d6ef02fdcf37a1f40b3fb1bbec8146a573e235169b315405d010ab75175674ed82658c8202f40b128a849c5250b4a1b8b0a1b3 + HEAD_REF main + ) + + vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + -DGSL_TEST=OFF + ) + + vcpkg_cmake_install() + + vcpkg_cmake_config_fixup( + PACKAGE_NAME Microsoft.GSL + CONFIG_PATH share/cmake/Microsoft.GSL + ) + + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") + + # Handle copyright + file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +elseif(NOT GSL_VERSION_DIRS_LENGTH EQUAL 1) + message(FATAL_ERROR "Could not deduce the GSL root directory because there is not exactly one directory matching `${GSL_VERSIONS_DIR}/*`.") +else() + # Use Unreal Engine's copy of GSL + list(GET GSL_VERSION_DIRS 0 GSL_ROOT_DIR) + + set(SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/ue55") + message("***** ${SOURCE_PATH}") + + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DUNREAL_GSL=${GSL_ROOT_DIR}" + ) + + vcpkg_cmake_install() + + vcpkg_cmake_config_fixup( + PACKAGE_NAME Microsoft.GSL + CONFIG_PATH share/cmake/Microsoft.GSL + ) +endif() diff --git a/extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt b/extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt new file mode 100644 index 000000000..0e8476e83 --- /dev/null +++ b/extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt @@ -0,0 +1,36 @@ +cmake_minimum_required(VERSION 3.14...3.16) + +project(GSL VERSION 4.1.0 LANGUAGES CXX) + +add_library(GSL INTERFACE) +add_library(Microsoft.GSL::GSL ALIAS GSL) + +# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html +string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL) + +option(GSL_INSTALL "Generate and install GSL target" ${PROJECT_IS_TOP_LEVEL}) + +# The implementation generally assumes a platform that implements C++14 support +target_compile_features(GSL INTERFACE "cxx_std_14") + +# Setup include directory +target_include_directories(GSL INTERFACE "${UNREAL_GSL}/include") + +if (GSL_INSTALL) + include(GNUInstallDirs) + include(CMakePackageConfigHelpers) + + set(export_name "Microsoft.GSLConfig") + set(namespace "Microsoft.GSL::") + set(cmake_files_install_dir ${CMAKE_INSTALL_DATADIR}/cmake/Microsoft.GSL) + + install(TARGETS GSL EXPORT ${export_name} INCLUDES DESTINATION "${UNREAL_GSL}/include") + install(EXPORT ${export_name} NAMESPACE ${namespace} DESTINATION ${cmake_files_install_dir}) + export(TARGETS GSL NAMESPACE ${namespace} FILE ${export_name}.cmake) + + set(gls_config_version "${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake") + + write_basic_package_version_file(${gls_config_version} COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) + + install(FILES ${gls_config_version} DESTINATION ${cmake_files_install_dir}) +endif() diff --git a/extern/vcpkg-overlays/ms-gsl/vcpkg.json b/extern/vcpkg-overlays/ms-gsl/vcpkg.json new file mode 100644 index 000000000..8d70ddbcd --- /dev/null +++ b/extern/vcpkg-overlays/ms-gsl/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "ms-gsl", + "version": "4.0.0", + "port-version": 1, + "description": "Microsoft implementation of the Guidelines Support Library", + "homepage": "https://github.com/Microsoft/GSL", + "license": "MIT", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} From 9adf16d940de6b121b6379e5eb1dae6d5682412c Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 6 Nov 2024 17:11:10 +1100 Subject: [PATCH 02/36] Fix assertion failure when exiting PIE. --- Source/CesiumRuntime/Private/CesiumSunSky.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/CesiumRuntime/Private/CesiumSunSky.cpp b/Source/CesiumRuntime/Private/CesiumSunSky.cpp index 6d24f79c7..4f09410e8 100644 --- a/Source/CesiumRuntime/Private/CesiumSunSky.cpp +++ b/Source/CesiumRuntime/Private/CesiumSunSky.cpp @@ -224,6 +224,8 @@ void ACesiumSunSky::EndPlay(const EEndPlayReason::Type EndPlayReason) { this->_transformUpdatedSubscription); this->_transformUpdatedSubscription.Reset(); } + + Super::EndPlay(EndPlayReason); } void ACesiumSunSky::Serialize(FArchive& Ar) { From 816e6278009eeb9a04d0085238f0967a4faba34d Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 6 Nov 2024 20:33:51 +1100 Subject: [PATCH 03/36] Remove now-unused ms-gsl overlay port. --- extern/vcpkg-overlays/ms-gsl/portfile.cmake | 73 ------------------- .../vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt | 36 --------- extern/vcpkg-overlays/ms-gsl/vcpkg.json | 18 ----- 3 files changed, 127 deletions(-) delete mode 100644 extern/vcpkg-overlays/ms-gsl/portfile.cmake delete mode 100644 extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt delete mode 100644 extern/vcpkg-overlays/ms-gsl/vcpkg.json diff --git a/extern/vcpkg-overlays/ms-gsl/portfile.cmake b/extern/vcpkg-overlays/ms-gsl/portfile.cmake deleted file mode 100644 index 36c674662..000000000 --- a/extern/vcpkg-overlays/ms-gsl/portfile.cmake +++ /dev/null @@ -1,73 +0,0 @@ -if (NOT DEFINED ENV{UNREAL_ENGINE_ROOT}) - message(FATAL_ERROR "The environment variable `UNREAL_ENGINE_ROOT` must be defined.") -endif() - -message(STATUS "Using Unreal Engine installation at $ENV{UNREAL_ENGINE_ROOT}") - -# UE 5.5 is the first version of UE to include GSL, and it only has a single version of it. This logic may need to -# change if a future UE version includes multiple copies of GSL. -set(GSL_VERSIONS_DIR "$ENV{UNREAL_ENGINE_ROOT}/Engine/Source/ThirdParty/GuidelinesSupportLibrary") -file(GLOB GSL_POSSIBLE_ROOT_DIRS LIST_DIRECTORIES true "${GSL_VERSIONS_DIR}/*") - -# Find the subdirectories, each of which should represent a GSL version. -set(GSL_VERSION_DIRS "") -foreach(GSL_POSSIBLE_ROOT_DIR IN LISTS GSL_POSSIBLE_ROOT_DIRS) - if(IS_DIRECTORY "${GSL_POSSIBLE_ROOT_DIR}") - list(APPEND GSL_VERSION_DIRS "${GSL_POSSIBLE_ROOT_DIR}") - endif() -endforeach() - -# There should be either zero versions (UE 5.2-5.4) or one version (UE 5.5). -# Otherwise we don't know what to do. -list(LENGTH GSL_VERSION_DIRS GSL_VERSION_DIRS_LENGTH) -if(GSL_VERSION_DIRS_LENGTH EQUAL 0) - # Use the standard GSL from vcpkg - - #header-only library with an install target - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO Microsoft/GSL - REF a3534567187d2edc428efd3f13466ff75fe5805c - SHA512 5bd6aad37fee3b56a2ee2fed10d6ef02fdcf37a1f40b3fb1bbec8146a573e235169b315405d010ab75175674ed82658c8202f40b128a849c5250b4a1b8b0a1b3 - HEAD_REF main - ) - - vcpkg_cmake_configure( - SOURCE_PATH ${SOURCE_PATH} - OPTIONS - -DGSL_TEST=OFF - ) - - vcpkg_cmake_install() - - vcpkg_cmake_config_fixup( - PACKAGE_NAME Microsoft.GSL - CONFIG_PATH share/cmake/Microsoft.GSL - ) - - file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug") - - # Handle copyright - file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -elseif(NOT GSL_VERSION_DIRS_LENGTH EQUAL 1) - message(FATAL_ERROR "Could not deduce the GSL root directory because there is not exactly one directory matching `${GSL_VERSIONS_DIR}/*`.") -else() - # Use Unreal Engine's copy of GSL - list(GET GSL_VERSION_DIRS 0 GSL_ROOT_DIR) - - set(SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/ue55") - message("***** ${SOURCE_PATH}") - - vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - OPTIONS - "-DUNREAL_GSL=${GSL_ROOT_DIR}" - ) - - vcpkg_cmake_install() - - vcpkg_cmake_config_fixup( - PACKAGE_NAME Microsoft.GSL - CONFIG_PATH share/cmake/Microsoft.GSL - ) -endif() diff --git a/extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt b/extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt deleted file mode 100644 index 0e8476e83..000000000 --- a/extern/vcpkg-overlays/ms-gsl/ue55/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -cmake_minimum_required(VERSION 3.14...3.16) - -project(GSL VERSION 4.1.0 LANGUAGES CXX) - -add_library(GSL INTERFACE) -add_library(Microsoft.GSL::GSL ALIAS GSL) - -# https://cmake.org/cmake/help/latest/variable/PROJECT_IS_TOP_LEVEL.html -string(COMPARE EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} PROJECT_IS_TOP_LEVEL) - -option(GSL_INSTALL "Generate and install GSL target" ${PROJECT_IS_TOP_LEVEL}) - -# The implementation generally assumes a platform that implements C++14 support -target_compile_features(GSL INTERFACE "cxx_std_14") - -# Setup include directory -target_include_directories(GSL INTERFACE "${UNREAL_GSL}/include") - -if (GSL_INSTALL) - include(GNUInstallDirs) - include(CMakePackageConfigHelpers) - - set(export_name "Microsoft.GSLConfig") - set(namespace "Microsoft.GSL::") - set(cmake_files_install_dir ${CMAKE_INSTALL_DATADIR}/cmake/Microsoft.GSL) - - install(TARGETS GSL EXPORT ${export_name} INCLUDES DESTINATION "${UNREAL_GSL}/include") - install(EXPORT ${export_name} NAMESPACE ${namespace} DESTINATION ${cmake_files_install_dir}) - export(TARGETS GSL NAMESPACE ${namespace} FILE ${export_name}.cmake) - - set(gls_config_version "${CMAKE_CURRENT_BINARY_DIR}/Microsoft.GSLConfigVersion.cmake") - - write_basic_package_version_file(${gls_config_version} COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) - - install(FILES ${gls_config_version} DESTINATION ${cmake_files_install_dir}) -endif() diff --git a/extern/vcpkg-overlays/ms-gsl/vcpkg.json b/extern/vcpkg-overlays/ms-gsl/vcpkg.json deleted file mode 100644 index 8d70ddbcd..000000000 --- a/extern/vcpkg-overlays/ms-gsl/vcpkg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "ms-gsl", - "version": "4.0.0", - "port-version": 1, - "description": "Microsoft implementation of the Guidelines Support Library", - "homepage": "https://github.com/Microsoft/GSL", - "license": "MIT", - "dependencies": [ - { - "name": "vcpkg-cmake", - "host": true - }, - { - "name": "vcpkg-cmake-config", - "host": true - } - ] -} From 72b364dad8a1ddcddf95bad61f5e3b2dcf993a85 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 6 Nov 2024 20:34:16 +1100 Subject: [PATCH 04/36] Restore the default UE installation to 5.2 (instead of 5.5). --- extern/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 1491053b9..5fce667b1 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -12,7 +12,7 @@ endif() if (NOT UNREAL_ENGINE_ROOT) # On Windows, try to use the default UE 5.2 location - set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.5") + set(WINDOWS_DEFAULT_UNREAL_INSTALLATION "C:/Program Files/Epic Games/UE_5.2") if (WIN32 AND EXISTS "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}") set(UNREAL_ENGINE_ROOT "${WINDOWS_DEFAULT_UNREAL_INSTALLATION}") else() From d34a4d9c6571cc7ff518062bcad8b951c7abf17e Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 6 Nov 2024 21:05:04 +1100 Subject: [PATCH 05/36] Add stock abseil port. --- extern/vcpkg-overlays/abseil/portfile.cmake | 53 +++++++++++++++++++++ extern/vcpkg-overlays/abseil/vcpkg.json | 26 ++++++++++ 2 files changed, 79 insertions(+) create mode 100644 extern/vcpkg-overlays/abseil/portfile.cmake create mode 100644 extern/vcpkg-overlays/abseil/vcpkg.json diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake new file mode 100644 index 000000000..057bf7ea3 --- /dev/null +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -0,0 +1,53 @@ +if(NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO abseil/abseil-cpp + REF "${VERSION}" + SHA512 bd2cca8f007f2eee66f51c95a979371622b850ceb2ce3608d00ba826f7c494a1da0fba3c1427728f2c173fe50d59b701da35c2c9fdad2752a5a49746b1c8ef31 + HEAD_REF master +) + +# With ABSL_PROPAGATE_CXX_STD=ON abseil automatically detect if it is being +# compiled with C++14 or C++17, and modifies the installed `absl/base/options.h` +# header accordingly. This works even if CMAKE_CXX_STANDARD is not set. Abseil +# uses the compiler default behavior to update `absl/base/options.h` as needed. +set(ABSL_USE_CXX17_OPTION "") +if("cxx17" IN_LIST FEATURES) + set(ABSL_USE_CXX17_OPTION "-DCMAKE_CXX_STANDARD=17") +endif() + +set(ABSL_STATIC_RUNTIME_OPTION "") +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") + set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DABSL_PROPAGATE_CXX_STD=ON + ${ABSL_USE_CXX17_OPTION} + ${ABSL_STATIC_RUNTIME_OPTION} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl) +vcpkg_fixup_pkgconfig() + +vcpkg_copy_pdbs() +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/include/absl/copts" + "${CURRENT_PACKAGES_DIR}/include/absl/strings/testdata" + "${CURRENT_PACKAGES_DIR}/include/absl/time/internal/cctz/testdata" +) + +if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "defined(ABSL_CONSUME_DLL)" "1") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h" "defined(ABSL_CONSUME_DLL)" "1") +endif() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/extern/vcpkg-overlays/abseil/vcpkg.json b/extern/vcpkg-overlays/abseil/vcpkg.json new file mode 100644 index 000000000..1b8bccfba --- /dev/null +++ b/extern/vcpkg-overlays/abseil/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "abseil", + "version": "20240722.0", + "description": [ + "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", + "In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", + "Abseil is not meant to be a competitor to the standard library; we've just found that many of these utilities serve a purpose within our code base, and we now want to provide those resources to the C++ community as a whole." + ], + "homepage": "https://github.com/abseil/abseil-cpp", + "license": "Apache-2.0", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "cxx17": { + "description": "Enable compiler C++17." + } + } +} From 76e73faf06ade431204476900e7c2caab4a00cbf Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 6 Nov 2024 21:40:48 +1100 Subject: [PATCH 06/36] Customize Abseil to fix Android build. --- extern/vcpkg-overlays/abseil/portfile.cmake | 12 +++++++++++- extern/vcpkg-overlays/abseil/vcpkg.json | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake index 057bf7ea3..02df116ea 100644 --- a/extern/vcpkg-overlays/abseil/portfile.cmake +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -5,7 +5,7 @@ endif() vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO abseil/abseil-cpp - REF "${VERSION}" + REF "20240722.0" SHA512 bd2cca8f007f2eee66f51c95a979371622b850ceb2ce3608d00ba826f7c494a1da0fba3c1427728f2c173fe50d59b701da35c2c9fdad2752a5a49746b1c8ef31 HEAD_REF master ) @@ -50,4 +50,14 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h" "defined(ABSL_CONSUME_DLL)" "1") endif() +# Don't let our customized version of Abseil pose as the real thing. +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0") + +# Apply this patch to fix C++20 build with Android NDK r25 +# https://github.com/abseil/abseil-cpp/pull/1728 +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/time/time.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/strings/cord.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") + vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/extern/vcpkg-overlays/abseil/vcpkg.json b/extern/vcpkg-overlays/abseil/vcpkg.json index 1b8bccfba..93c750579 100644 --- a/extern/vcpkg-overlays/abseil/vcpkg.json +++ b/extern/vcpkg-overlays/abseil/vcpkg.json @@ -1,6 +1,6 @@ { "name": "abseil", - "version": "20240722.0", + "version": "20240722.0-cesium-for-unreal", "description": [ "Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.", "In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.", From e2411f7c95aa23ec490be856b53443069da2ee71 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 7 Nov 2024 09:19:36 +1100 Subject: [PATCH 07/36] Fix non-Android errors. This is a bit dodgy, because our modified Abseil is now pretending to be the real deal. But I haven't worked out how to fix that without introducing linker errors yet. --- Source/CesiumRuntime/Private/Tests/CesiumTestHelpers.h | 4 ++-- extern/vcpkg-overlays/abseil/portfile.cmake | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/CesiumRuntime/Private/Tests/CesiumTestHelpers.h b/Source/CesiumRuntime/Private/Tests/CesiumTestHelpers.h index f6595478d..932eebd6d 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumTestHelpers.h +++ b/Source/CesiumRuntime/Private/Tests/CesiumTestHelpers.h @@ -193,9 +193,9 @@ template T* findInPlay(T* pEditorObject) { if (!pPlayOwner) return nullptr; return getComponentWithTag(pPlayOwner, getUniqueTag(pEditorObject)); + } else { + return nullptr; } - - return nullptr; } /// diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake index 02df116ea..77896d463 100644 --- a/extern/vcpkg-overlays/abseil/portfile.cmake +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -51,9 +51,9 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") endif() # Don't let our customized version of Abseil pose as the real thing. -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0") +# vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal") +# vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722") +# vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0") # Apply this patch to fix C++20 build with Android NDK r25 # https://github.com/abseil/abseil-cpp/pull/1728 From eabc089d888fa9963f0c80930c6944fa077ddd94 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 7 Nov 2024 15:05:31 +1100 Subject: [PATCH 08/36] Add stock STB. --- extern/vcpkg-overlays/stb/FindStb.cmake | 29 +++++++++++++++++++ extern/vcpkg-overlays/stb/portfile.cmake | 16 ++++++++++ extern/vcpkg-overlays/stb/usage | 4 +++ .../stb/vcpkg-cmake-wrapper.cmake | 6 ++++ extern/vcpkg-overlays/stb/vcpkg.json | 8 +++++ 5 files changed, 63 insertions(+) create mode 100644 extern/vcpkg-overlays/stb/FindStb.cmake create mode 100644 extern/vcpkg-overlays/stb/portfile.cmake create mode 100644 extern/vcpkg-overlays/stb/usage create mode 100644 extern/vcpkg-overlays/stb/vcpkg-cmake-wrapper.cmake create mode 100644 extern/vcpkg-overlays/stb/vcpkg.json diff --git a/extern/vcpkg-overlays/stb/FindStb.cmake b/extern/vcpkg-overlays/stb/FindStb.cmake new file mode 100644 index 000000000..4ffa8b1ff --- /dev/null +++ b/extern/vcpkg-overlays/stb/FindStb.cmake @@ -0,0 +1,29 @@ +# Distributed under the OSI-approved BSD 3-Clause License. + +#.rst: +# FindStb +# ------------ +# +# Find the Stb include headers. +# +# Result Variables +# ^^^^^^^^^^^^^^^^ +# +# This module defines the following variables: +# +# ``Stb_FOUND`` +# True if Stb library found +# +# ``Stb_INCLUDE_DIR`` +# Location of Stb headers +# + +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) +include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake) + +if(NOT Stb_INCLUDE_DIR) + find_path(Stb_INCLUDE_DIR NAMES stb_image.h PATHS ${Stb_DIR} PATH_SUFFIXES include) +endif() + +find_package_handle_standard_args(Stb DEFAULT_MSG Stb_INCLUDE_DIR) +mark_as_advanced(Stb_INCLUDE_DIR) diff --git a/extern/vcpkg-overlays/stb/portfile.cmake b/extern/vcpkg-overlays/stb/portfile.cmake new file mode 100644 index 000000000..f449804f7 --- /dev/null +++ b/extern/vcpkg-overlays/stb/portfile.cmake @@ -0,0 +1,16 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO nothings/stb + REF f75e8d1cad7d90d72ef7a4661f1b994ef78b4e31 # committed on 2024-07-29 + SHA512 4a733aefb816a366c999663e3d482144616721b26c321ee5dd0dce611a34050b6aef97d46bd2c4f8a9631d83b097491a7ce88607fd9493d880aaa94567a68cce + HEAD_REF master +) + +file(GLOB HEADER_FILES "${SOURCE_PATH}/*.h" "${SOURCE_PATH}/stb_vorbis.c") +file(COPY ${HEADER_FILES} DESTINATION "${CURRENT_PACKAGES_DIR}/include") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/FindStb.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/extern/vcpkg-overlays/stb/usage b/extern/vcpkg-overlays/stb/usage new file mode 100644 index 000000000..ac75766bf --- /dev/null +++ b/extern/vcpkg-overlays/stb/usage @@ -0,0 +1,4 @@ +The package stb provides CMake targets: + + find_package(Stb REQUIRED) + target_include_directories(main PRIVATE ${Stb_INCLUDE_DIR}) \ No newline at end of file diff --git a/extern/vcpkg-overlays/stb/vcpkg-cmake-wrapper.cmake b/extern/vcpkg-overlays/stb/vcpkg-cmake-wrapper.cmake new file mode 100644 index 000000000..e787d29f0 --- /dev/null +++ b/extern/vcpkg-overlays/stb/vcpkg-cmake-wrapper.cmake @@ -0,0 +1,6 @@ +set(STB_PREV_MODULE_PATH ${CMAKE_MODULE_PATH}) +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) + +_find_package(${ARGS}) + +set(CMAKE_MODULE_PATH ${STB_PREV_MODULE_PATH}) diff --git a/extern/vcpkg-overlays/stb/vcpkg.json b/extern/vcpkg-overlays/stb/vcpkg.json new file mode 100644 index 000000000..07b7d65b1 --- /dev/null +++ b/extern/vcpkg-overlays/stb/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "stb", + "version-date": "2024-07-29", + "port-version": 1, + "description": "public domain header-only libraries", + "homepage": "https://github.com/nothings/stb", + "license": "MIT OR CC-PDDC" +} From 00db408c6df84d2a5291b8e95490d8c4077b9d45 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 7 Nov 2024 15:09:50 +1100 Subject: [PATCH 09/36] Modify STB to avoid conflict with UE 5.4. --- extern/vcpkg-overlays/stb/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extern/vcpkg-overlays/stb/portfile.cmake b/extern/vcpkg-overlays/stb/portfile.cmake index f449804f7..5f3935029 100644 --- a/extern/vcpkg-overlays/stb/portfile.cmake +++ b/extern/vcpkg-overlays/stb/portfile.cmake @@ -14,3 +14,6 @@ file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION " file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") + +# Even when told to create static symbols, STB creates two symbols globally, which breaks packaging in UE 5.4. Fix that. +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/stb_image_resize2.h" "STBIR__SIMDI_CONST(stbir__s" "STBIRDEF STBIR__SIMDI_CONST(stbir__s") From ec0ae3d472d677e3404546adc97eb19158c18960 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 7 Nov 2024 15:34:32 +1100 Subject: [PATCH 10/36] Switch from Xcode 14.3.1 to 15.4. Because GitHub [rolled out / is rolling out] an update to the macos-14 image that removes 14.3.1. I have to admit I'm a little fuzzy on the implications of switching to 15.4 with regard to OS support and the changes of successful linking with binaries produced by older versions. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9fa8a2a0..d5626c8b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,7 +84,7 @@ jobs: unreal-engine-zip: "s3://cesium-unreal-engine/UE_52_macOS.zip" unreal-program-name: "UE_5.2" upload-package-base-name: "CesiumForUnreal-52-apple" - xcode-version: "14.3.1" + xcode-version: "15.4" Combine52: runs-on: ubuntu-latest needs: [Windows52, Linux52, Android52, Apple52] @@ -202,7 +202,7 @@ jobs: unreal-engine-zip: "s3://cesium-unreal-engine/5.3.0/UE_53_macOS.zip" unreal-program-name: "UE_5.3" upload-package-base-name: "CesiumForUnreal-53-apple" - xcode-version: "14.3.1" + xcode-version: "15.4" Combine53: runs-on: ubuntu-latest needs: [Windows53, Android53, Linux53, Apple53] @@ -320,7 +320,7 @@ jobs: unreal-engine-zip: "s3://cesium-unreal-engine/5.4.0/UE_54_macOS.zip" unreal-program-name: "UE_5.4" upload-package-base-name: "CesiumForUnreal-54-apple" - xcode-version: "14.3.1" + xcode-version: "15.4" Combine54: runs-on: ubuntu-latest needs: [Windows54, Android54, Linux54, Apple54] From 490d37603d988928c8c5505c3b1a0feaae36686e Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 7 Nov 2024 15:39:12 +1100 Subject: [PATCH 11/36] Don't delete the xcode we're trying to use. --- .github/workflows/buildApple.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildApple.yml b/.github/workflows/buildApple.yml index 482e5e240..b092e8792 100644 --- a/.github/workflows/buildApple.yml +++ b/.github/workflows/buildApple.yml @@ -31,6 +31,8 @@ jobs: ls /Applications brew uninstall google-chrome sudo rm -rf /Users/runner/Library/Android + sudo rm -rf /Applications/Xcode_14.3.app + sudo rm -rf /Applications/Xcode_14.3.1.app sudo rm -rf /Applications/Xcode_15.0.1.app sudo rm -rf /Applications/Xcode_15.0.app sudo rm -rf /Applications/Xcode_15.1.0.app @@ -39,8 +41,8 @@ jobs: sudo rm -rf /Applications/Xcode_15.2.app sudo rm -rf /Applications/Xcode_15.3.0.app sudo rm -rf /Applications/Xcode_15.3.app - sudo rm -rf /Applications/Xcode_15.4.0.app - sudo rm -rf /Applications/Xcode_15.4.app + #sudo rm -rf /Applications/Xcode_15.4.0.app + #sudo rm -rf /Applications/Xcode_15.4.app sudo rm -rf /Applications/Xcode_16.0.0.app sudo rm -rf /Applications/Xcode_16.0.app sudo rm -rf /Applications/Xcode_16.1.0.app From 7c818e72acf9c098f756d7d7d5e9a0722590d252 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 11 Nov 2024 08:59:57 +1100 Subject: [PATCH 12/36] More hammering abseil into line. --- extern/vcpkg-overlays/abseil/portfile.cmake | 27 ++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake index 77896d463..69dd88581 100644 --- a/extern/vcpkg-overlays/abseil/portfile.cmake +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -28,11 +28,26 @@ vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE OPTIONS - -DABSL_PROPAGATE_CXX_STD=ON + -DABSL_PROPAGATE_CXX_STD=OFF ${ABSL_USE_CXX17_OPTION} ${ABSL_STATIC_RUNTIME_OPTION} ) +# Don't let our customized version of Abseil pose as the real thing. +vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ANY 2" "ABSL_OPTION_USE_STD_ANY 0") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_OPTIONAL 2" "ABSL_OPTION_USE_STD_OPTIONAL 0") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_STRING_VIEW 2" "ABSL_OPTION_USE_STD_STRING_VIEW 0") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_VARIANT 2" "ABSL_OPTION_USE_STD_VARIANT 0") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ORDERING 2" "ABSL_OPTION_USE_STD_ORDERING 0") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722") +vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0") + +# Apply this patch to fix C++20 build with Android NDK r25 +# https://github.com/abseil/abseil-cpp/pull/1728 +vcpkg_replace_string("${SOURCE_PATH}/absl/time/time.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") +vcpkg_replace_string("${SOURCE_PATH}/absl/strings/cord.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") + vcpkg_cmake_install() vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl) vcpkg_fixup_pkgconfig() @@ -50,14 +65,4 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/internal/thread_identity.h" "defined(ABSL_CONSUME_DLL)" "1") endif() -# Don't let our customized version of Abseil pose as the real thing. -# vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal") -# vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_VERSION 20240722" "//#define ABSL_LTS_RELEASE_VERSION 20240722") -# vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/base/config.h" "#define ABSL_LTS_RELEASE_PATCH_LEVEL 0" "//#define ABSL_LTS_RELEASE_PATCH_LEVEL 0") - -# Apply this patch to fix C++20 build with Android NDK r25 -# https://github.com/abseil/abseil-cpp/pull/1728 -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/time/time.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") -vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/absl/strings/cord.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") - vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") From eb1cf9349d4a0e2e14c047d76a220ffc03b1e677 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 09:59:15 +1100 Subject: [PATCH 13/36] Add UE 5.5 to CI. --- .github/workflows/build.yml | 118 ++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5626c8b3..f92377b1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -384,3 +384,121 @@ jobs: test-package-base-name: "CesiumForUnreal-54" visual-studio-version: "2022" visual-studio-components: "Microsoft.VisualStudio.Component.VC.14.34.17.4.x86.x64,Microsoft.VisualStudio.Component.Windows10SDK.18362" + Windows55: + uses: ./.github/workflows/buildWindows.yml + secrets: inherit + with: + runner-label: "windows-2022" + unreal-engine-version: "5.5.0" + unreal-engine-zip: "s3://cesium-unreal-engine/5.5.0/UE_5.5.zip" + unreal-program-name: "UE_5.5" + upload-package-base-name: "CesiumForUnreal-55-windows" + # These are specified in the Unreal Engine release notes under "IDE Version the Build farm compiles against" + # and using them ensures we're compiling our plugin in the exact same way that Unreal Engine itself is compiled. + cmake-generator: "Visual Studio 17 2022" + cmake-toolchain: "version=14.38" + cmake-platform: "x64,version=10.0.22621.0" + visual-studio-version: "2022" + visual-studio-components: "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64,Microsoft.VisualStudio.Component.Windows11SDK.22621" + TestWindows55: + needs: [Windows55] + uses: ./.github/workflows/testWindows.yml + secrets: inherit + with: + runner-label: windows-2022 + unreal-engine-zip: "s3://cesium-unreal-engine/5.5.0/UE_5.5.zip" + unreal-program-name: "UE_5.5" + test-package-base-name: "CesiumForUnreal-55-windows" + Android55: + uses: ./.github/workflows/buildAndroid.yml + secrets: inherit + with: + runner-label: windows-2022 + unreal-engine-version: "5.5.0" + unreal-engine-zip: "s3://cesium-unreal-engine/5.5.0/UE_5.5.zip" + unreal-program-name: "UE_5.5" + upload-package-base-name: "CesiumForUnreal-55-android" + android-ndk-version: "r25b" + Linux55: + uses: ./.github/workflows/buildLinux.yml + secrets: inherit + with: + runner-label: ubuntu-22.04 + unreal-engine-version: "5.5.0" + unreal-engine-zip: "s3://cesium-unreal-engine/5.5.0/Linux_Unreal_Engine_5.5.0.zip" + unreal-program-name: "UE_5.5" + upload-package-base-name: "CesiumForUnreal-55-linux" + clang-version: "v23_clang-18.1.0-rockylinux8" + Apple55: + uses: ./.github/workflows/buildApple.yml + secrets: inherit + with: + runner-label: macos-14 + unreal-engine-version: "5.5.0" + unreal-engine-zip: "s3://cesium-unreal-engine/5.5.0/UE_55_macOS.zip" + unreal-program-name: "UE_5.5" + upload-package-base-name: "CesiumForUnreal-55-apple" + xcode-version: "15.4" + Combine55: + runs-on: ubuntu-latest + needs: [Windows55, Android55, Linux55, Apple55] + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Set environment variables + run: | + export CESIUM_UNREAL_VERSION=$GITHUB_REF_NAME + export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-55-${CESIUM_UNREAL_VERSION}" + export BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME="CesiumForUnreal-55-SourceOnly-${CESIUM_UNREAL_VERSION}" + # Make these available to subsequent steps + echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV + echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV + echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV + - name: Download Apple build + uses: actions/download-artifact@v4 + with: + name: CesiumForUnreal-55-apple-${{ env.CESIUM_UNREAL_VERSION}} + path: combine + - name: Download Android build + uses: actions/download-artifact@v4 + with: + name: CesiumForUnreal-55-android-${{ env.CESIUM_UNREAL_VERSION}} + path: combine + - name: Download Linux build + uses: actions/download-artifact@v4 + with: + name: CesiumForUnreal-55-linux-${{ env.CESIUM_UNREAL_VERSION}} + path: combine + - name: Download Windows build + uses: actions/download-artifact@v4 + with: + name: CesiumForUnreal-55-windows-${{ env.CESIUM_UNREAL_VERSION}} + path: combine + - name: Publish combined package artifact + if: ${{ success() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}} + path: combine + - name: Publish combined package artifact for the Unreal Marketplace + if: ${{ success() }} + uses: actions/upload-artifact@v4 + with: + name: ${{ env.BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME}} + path: | + combine + # These are built by Epic, and including them seems to confuse their process. + !combine/CesiumForUnreal/Binaries/**/* + !combine/CesiumForUnreal/Intermediate/**/* + TestPackage55: + needs: [Combine55] + uses: ./.github/workflows/testPackageOnWindows.yml + secrets: inherit + with: + runner-label: windows-2022 + unreal-engine-zip: "s3://cesium-unreal-engine/5.5.0/UE_5.5.zip" + unreal-program-name: "UE_5.5" + unreal-engine-association: "5.5" + test-package-base-name: "CesiumForUnreal-55" + visual-studio-version: "2022" + visual-studio-components: "Microsoft.VisualStudio.Component.VC.14.38.17.8.x86.x64,Microsoft.VisualStudio.Component.Windows11SDK.22621" From 01a61bd4c57cd9a6ecd0ddb2df7ae39ea1bd273b Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 10:12:10 +1100 Subject: [PATCH 14/36] Explicitly specify C++14 when building Abseil. --- extern/vcpkg-overlays/abseil/portfile.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake index 69dd88581..e76d964a4 100644 --- a/extern/vcpkg-overlays/abseil/portfile.cmake +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -29,6 +29,7 @@ vcpkg_cmake_configure( DISABLE_PARALLEL_CONFIGURE OPTIONS -DABSL_PROPAGATE_CXX_STD=OFF + -DCMAKE_CXX_STANDARD=14 ${ABSL_USE_CXX17_OPTION} ${ABSL_STATIC_RUNTIME_OPTION} ) From 01742baf7b3043dcfa6f999170867997788d9b2d Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 11:02:57 +1100 Subject: [PATCH 15/36] Use correct MSVC version for UE version. --- .../vcpkg-overlays/triplets/x64-windows-unreal.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake b/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake index 90455d171..47c6df42b 100644 --- a/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake +++ b/extern/vcpkg-overlays/triplets/x64-windows-unreal.cmake @@ -30,5 +30,17 @@ list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DCMAKE_C_FLAGS_DEBUG:STRING=/MD /Z7 # When building official binaries on CI, use a very specific MSVC toolset version (which must be installed). # When building locally, use the default. if(DEFINED ENV{CI}) + # Toolset version should be 14.38 on UE 5.5+, 14.34 on prior versions. set(VCPKG_PLATFORM_TOOLSET_VERSION "14.34") + + set(UNREAL_ENGINE_BUILD_VERSION_FILENAME "$ENV{UNREAL_ENGINE_ROOT}/Engine/Build/Build.version") + if(EXISTS "${UNREAL_ENGINE_BUILD_VERSION_FILENAME}") + file(READ "${UNREAL_ENGINE_BUILD_VERSION_FILENAME}" UNREAL_ENGINE_BUILD_VERSION) + string(JSON UNREAL_MAJOR_VERSION GET "${UNREAL_ENGINE_BUILD_VERSION}" "MajorVersion") + string(JSON UNREAL_MINOR_VERSION GET "${UNREAL_ENGINE_BUILD_VERSION}" "MinorVersion") + if("${UNREAL_MAJOR_VERSION}" GREATER "5" OR "${UNREAL_MINOR_VERSION}" GREATER_EQUAL "5") + # This is UE 5.5+, so use MSVC 14.38. + set(VCPKG_PLATFORM_TOOLSET_VERSION "14.38") + endif() + endif() endif() From 10f2b09fdd5e7ed0af5044a0c182729727def107 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 15:21:36 +1100 Subject: [PATCH 16/36] Fix more occurrences of "using namespace CesiumGltf". --- .../Private/Tests/CesiumPropertyTableProperty.spec.cpp | 4 ++-- .../Private/Tests/CesiumPropertyTexture.spec.cpp | 10 ++++++---- .../Tests/CesiumPropertyTextureProperty.spec.cpp | 2 ++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp index 66a1d1435..e158006f3 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTableProperty.spec.cpp @@ -6,8 +6,6 @@ #include "Misc/AutomationTest.h" #include -using namespace CesiumGltf; - BEGIN_DEFINE_SPEC( FCesiumPropertyTablePropertySpec, "Cesium.Unit.PropertyTableProperty", @@ -18,6 +16,8 @@ BEGIN_DEFINE_SPEC( END_DEFINE_SPEC(FCesiumPropertyTablePropertySpec) void FCesiumPropertyTablePropertySpec::Define() { + using namespace CesiumGltf; + Describe("Constructor", [this]() { It("constructs invalid instance by default", [this]() { FCesiumPropertyTableProperty property; diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp index c88059739..623959fbe 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTexture.spec.cpp @@ -16,10 +16,10 @@ BEGIN_DEFINE_SPEC( EAutomationTestFlags::ServerContext | EAutomationTestFlags::CommandletContext | EAutomationTestFlags::ProductFilter) -Model model; -MeshPrimitive* pPrimitive; -ExtensionModelExtStructuralMetadata* pExtension; -PropertyTexture* pPropertyTexture; +CesiumGltf::Model model; +CesiumGltf::MeshPrimitive* pPrimitive; +CesiumGltf::ExtensionModelExtStructuralMetadata* pExtension; +CesiumGltf::PropertyTexture* pPropertyTexture; TObjectPtr pModelComponent; TObjectPtr pPrimitiveComponent; @@ -31,6 +31,8 @@ const std::vector texCoords{ END_DEFINE_SPEC(FCesiumPropertyTextureSpec) void FCesiumPropertyTextureSpec::Define() { + using namespace CesiumGltf; + BeforeEach([this]() { model = Model(); pExtension = &model.addExtension(); diff --git a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp index 073446de0..0c23881d2 100644 --- a/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp +++ b/Source/CesiumRuntime/Private/Tests/CesiumPropertyTextureProperty.spec.cpp @@ -21,6 +21,8 @@ const std::vector texCoords{ END_DEFINE_SPEC(FCesiumPropertyTexturePropertySpec) void FCesiumPropertyTexturePropertySpec::Define() { + using namespace CesiumGltf; + Describe("Constructor", [this]() { It("constructs invalid instance by default", [this]() { FCesiumPropertyTextureProperty property; From 8c1a88f70b5b1e5c49d32de8e529fe5c412b8ef1 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 15:21:54 +1100 Subject: [PATCH 17/36] Copy BuildConfiguration.xml to another location on macOS. Because it doesn't seem to be picked up from the original spot anymore in UE 5.5. --- .github/workflows/buildApple.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buildApple.yml b/.github/workflows/buildApple.yml index b092e8792..bf33ce5d0 100644 --- a/.github/workflows/buildApple.yml +++ b/.github/workflows/buildApple.yml @@ -129,6 +129,8 @@ jobs: # - We limit parallel actions because our builds use a lot more memory than UBT thinks they will. # - We set the source code control Provider to None so UBT includes all files in the unity build. printf '\n\n \n 2\n \n None\n\n' > ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml + mkdir -p ~/.config/Unreal\ Engine/UnrealBuildTool + cp ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml ~/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - name: Build plugin for macOS and iOS run: | sed -i '' 's/\"EngineVersion\": \"5.2.0\"/\"EngineVersion\": \"${{ inputs.unreal-engine-version }}\"/g' CesiumForUnreal.uplugin From 541739c915baf3c34ee43bb7c7fa52e6fe4b651a Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 16:00:13 +1100 Subject: [PATCH 18/36] Fix build configuration script (macOS). --- .github/workflows/buildApple.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildApple.yml b/.github/workflows/buildApple.yml index bf33ce5d0..34ac6597b 100644 --- a/.github/workflows/buildApple.yml +++ b/.github/workflows/buildApple.yml @@ -25,6 +25,14 @@ jobs: build: runs-on: ${{ inputs.runner-label }} steps: + - name: Customize BuildConfiguration.xml + run: | + mkdir -p ~/.config/Unreal\ Engine/UnrealBuildTool + # - We limit parallel actions because our builds use a lot more memory than UBT thinks they will. + # - We set the source code control Provider to None so UBT includes all files in the unity build. + printf '\n\n \n 2\n \n None\n\n' > ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml + mkdir -p ~/Unreal\ Engine/UnrealBuildTool + cp ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml ~/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - name: Make some more disk space run: | df -h @@ -123,14 +131,6 @@ jobs: - name: Remove extern directory run: | rm -rf extern - - name: Customize BuildConfiguration.xml - run: | - mkdir -p ~/.config/Unreal\ Engine/UnrealBuildTool - # - We limit parallel actions because our builds use a lot more memory than UBT thinks they will. - # - We set the source code control Provider to None so UBT includes all files in the unity build. - printf '\n\n \n 2\n \n None\n\n' > ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - mkdir -p ~/.config/Unreal\ Engine/UnrealBuildTool - cp ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml ~/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - name: Build plugin for macOS and iOS run: | sed -i '' 's/\"EngineVersion\": \"5.2.0\"/\"EngineVersion\": \"${{ inputs.unreal-engine-version }}\"/g' CesiumForUnreal.uplugin From 029b28ef2d02e17b67151b62c613f08cdd9a012d Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 17:49:52 +1100 Subject: [PATCH 19/36] Some exploration to free up disk space on Linux CI. --- .github/workflows/buildLinux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/buildLinux.yml b/.github/workflows/buildLinux.yml index 11a83db52..2ce702300 100644 --- a/.github/workflows/buildLinux.yml +++ b/.github/workflows/buildLinux.yml @@ -34,6 +34,8 @@ jobs: sudo swapon --show cat /proc/meminfo apt list --installed + sudo dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n + sudo snap list - name: Removed unneeded packages to gain disk space run: | sudo apt update From 967b65bcfbed5d7281df57a1b99e79041e1020bf Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 17:59:00 +1100 Subject: [PATCH 20/36] Remove more packages. --- .github/workflows/buildLinux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildLinux.yml b/.github/workflows/buildLinux.yml index 2ce702300..9ddea5628 100644 --- a/.github/workflows/buildLinux.yml +++ b/.github/workflows/buildLinux.yml @@ -39,7 +39,7 @@ jobs: - name: Removed unneeded packages to gain disk space run: | sudo apt update - sudo apt remove google-chrome-stable clang-13 clang-14 clang-15 llvm-13-dev llvm-13-linker-tools llvm-13-runtime llvm-13-tools llvm-13 llvm-14-dev llvm-14-linker-tools llvm-14-runtime llvm-14-tools llvm-14 llvm-15-dev llvm-15-linker-tools llvm-15-runtime llvm-15-tools llvm-15 x11-common xserver-common aspnetcore-runtime-6.0 aspnetcore-runtime-7.0 aspnetcore-runtime-8.0 aspnetcore-targeting-pack-6.0 aspnetcore-targeting-pack-7.0 aspnetcore-targeting-pack-8.0 docker-ce-cli docker-ce dotnet-apphost-pack-6.0 dotnet-apphost-pack-7.0 dotnet-apphost-pack-8.0 dotnet-host dotnet-hostfxr-6.0 dotnet-hostfxr-7.0 dotnet-hostfxr-8.0 dotnet-runtime-6.0 dotnet-runtime-7.0 dotnet-runtime-8.0 dotnet-runtime-deps-6.0 dotnet-runtime-deps-7.0 dotnet-runtime-deps-8.0 dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 dotnet-targeting-pack-6.0 dotnet-targeting-pack-7.0 dotnet-targeting-pack-8.0 eatmydata emacsen-common firebird3.0-common-doc firebird3.0-common firefox kubectl mercurial-common mercurial microsoft-edge-stable mssql-tools mysql-client-8.0 mysql-client-core-8.0 mysql-client mysql-common mysql-server-8.0 php8.1 postgresql-14 + sudo apt remove google-chrome-stable clang-13 clang-14 clang-15 llvm-13-dev llvm-13-linker-tools llvm-13-runtime llvm-13-tools llvm-13 llvm-14-dev llvm-14-linker-tools llvm-14-runtime llvm-14-tools llvm-14 llvm-15-dev llvm-15-linker-tools llvm-15-runtime llvm-15-tools llvm-15 x11-common xserver-common aspnetcore-runtime-6.0 aspnetcore-runtime-7.0 aspnetcore-runtime-8.0 aspnetcore-targeting-pack-6.0 aspnetcore-targeting-pack-7.0 aspnetcore-targeting-pack-8.0 docker-ce-cli docker-ce dotnet-apphost-pack-6.0 dotnet-apphost-pack-7.0 dotnet-apphost-pack-8.0 dotnet-host dotnet-hostfxr-6.0 dotnet-hostfxr-7.0 dotnet-hostfxr-8.0 dotnet-runtime-6.0 dotnet-runtime-7.0 dotnet-runtime-8.0 dotnet-runtime-deps-6.0 dotnet-runtime-deps-7.0 dotnet-runtime-deps-8.0 dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 dotnet-targeting-pack-6.0 dotnet-targeting-pack-7.0 dotnet-targeting-pack-8.0 eatmydata emacsen-common firebird3.0-common-doc firebird3.0-common firefox kubectl mercurial-common mercurial microsoft-edge-stable mssql-tools mysql-client-8.0 mysql-client-core-8.0 mysql-client mysql-common mysql-server-8.0 php8.1 postgresql-14 azure-cli microsoft-edge-stable google-cloud-cli temurin-21-jdk temurin-17-jdk temurin-11-jdk temurin-8-jdk powershell google-cloud-cli-anthoscli mysql-server-core-8.0 containerd.io libllvm15 libllvm14 libllvm13 mono-devel libclang-common-15-dev libclang-common-14-dev libclang-common-13-dev df -h - name: Create some space to work in /mnt run: | From ca6e385bf85fe481be630f39ad6a26e56cd23b22 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 18:41:44 +1100 Subject: [PATCH 21/36] Write BuildConfiguration.xml to new UE 5.5 on macOS location. It seems to have changed from `~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml` to `~/Documents/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml`, even though this isn't mentioned in the release notes. I had to step through UnrealBuildTool in the debugger on a Mac to determine this. --- .github/workflows/buildApple.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildApple.yml b/.github/workflows/buildApple.yml index 34ac6597b..1890506bb 100644 --- a/.github/workflows/buildApple.yml +++ b/.github/workflows/buildApple.yml @@ -31,8 +31,9 @@ jobs: # - We limit parallel actions because our builds use a lot more memory than UBT thinks they will. # - We set the source code control Provider to None so UBT includes all files in the unity build. printf '\n\n \n 2\n \n None\n\n' > ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - mkdir -p ~/Unreal\ Engine/UnrealBuildTool - cp ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml ~/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml + # In UE 5.5, UBT apparently loads from ~/Documents instead of ~/.config + mkdir -p ~/Documents/Unreal\ Engine/UnrealBuildTool + cp ~/.config/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml ~/Documents/Unreal\ Engine/UnrealBuildTool/BuildConfiguration.xml - name: Make some more disk space run: | df -h From 1cec942218faece2c771372b54ec765557eb64e5 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 13 Nov 2024 19:15:27 +1100 Subject: [PATCH 22/36] Fix Abseil linker errors in Debug builds. --- extern/vcpkg-overlays/abseil/portfile.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake index e76d964a4..83f393dce 100644 --- a/extern/vcpkg-overlays/abseil/portfile.cmake +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -24,6 +24,9 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_CRT_LINKAGE STREQUAL "static") set(ABSL_STATIC_RUNTIME_OPTION "-DABSL_MSVC_STATIC_RUNTIME=ON") endif() +# Don't let Abseil clobber our CMAKE_MSVC_RUNTIME_LIBRARY choice. +vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")" "#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")") + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" DISABLE_PARALLEL_CONFIGURE From bb5bf370bb3d9f7fe7c11127076fc20cf2814387 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 15 Nov 2024 18:15:06 +1100 Subject: [PATCH 23/36] Fix SampleHeightMostDetailed test failures on UE 5.5. In UE 5.5, `GetCameras` does not find any cameras when running the tests headless. As a result, we were never calling `updateView`, and so the height samples never completed. --- Source/CesiumRuntime/Private/Cesium3DTileset.cpp | 3 --- extern/cesium-native | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 26b8b2d14..f52edbb20 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -2164,9 +2164,6 @@ void ACesium3DTileset::Tick(float DeltaTime) { updateTilesetOptionsFromProperties(); std::vector cameras = this->GetCameras(); - if (cameras.empty()) { - return; - } glm::dmat4 ueTilesetToUeWorld = VecMath::createMatrix4D(this->GetActorTransform().ToMatrixWithScale()); diff --git a/extern/cesium-native b/extern/cesium-native index bc9165659..651d3b4d4 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit bc9165659fde43a28aedb943af54bdc644040d96 +Subproject commit 651d3b4d4309343f9fca725393777752c8ba98c5 From 40230a29b7119032ca8d7f61e6cf08b729241d68 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Sat, 16 Nov 2024 20:56:00 +1100 Subject: [PATCH 24/36] Fix crash with hardware ray tracing enabled. --- .../CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.h | 1 + Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 6 ++++++ Source/CesiumRuntime/Public/CesiumCommon.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.h b/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.h index 0bb838505..45f3ece2b 100644 --- a/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.h +++ b/Source/CesiumRuntime/Private/CesiumEncodedFeaturesMetadata.h @@ -11,6 +11,7 @@ #include "Templates/SharedPointer.h" #include "Templates/UniquePtr.h" #include +#include #include struct FCesiumFeatureIdSet; diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index b2781a59a..758059658 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -1715,6 +1715,12 @@ static void loadPrimitive( LODResources.bHasReversedIndices = false; LODResources.bHasReversedDepthOnlyIndices = false; +#if ENGINE_VERSION_5_5_OR_HIGHER + // UE 5.5 requires that we do this in order to avoid a crash when ray tracing + // is enabled. + RenderData->InitializeRayTracingRepresentationFromRenderingLODs(); +#endif + primitiveResult.meshIndex = options.pMeshOptions->meshIndex; primitiveResult.primitiveIndex = options.primitiveIndex; primitiveResult.RenderData = std::move(RenderData); diff --git a/Source/CesiumRuntime/Public/CesiumCommon.h b/Source/CesiumRuntime/Public/CesiumCommon.h index 633570315..17901acb2 100644 --- a/Source/CesiumRuntime/Public/CesiumCommon.h +++ b/Source/CesiumRuntime/Public/CesiumCommon.h @@ -4,6 +4,8 @@ #include "Runtime/Launch/Resources/Version.h" +#define ENGINE_VERSION_5_5_OR_HIGHER \ + (ENGINE_MAJOR_VERSION > 5 || ENGINE_MINOR_VERSION >= 5) #define ENGINE_VERSION_5_4_OR_HIGHER \ (ENGINE_MAJOR_VERSION > 5 || ENGINE_MINOR_VERSION >= 4) #define ENGINE_VERSION_5_3_OR_HIGHER \ From 1c73dd5c02b67fa9067041f46b07273fb0db7734 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 20 Nov 2024 21:05:54 +1100 Subject: [PATCH 25/36] Fix undefined behavior in raster overlays by updating Native. Also add an assertion to check for the problem. --- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 4 ++++ extern/cesium-native | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index b2781a59a..a5e094c96 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -3387,6 +3387,10 @@ void UCesiumGltfComponent::AttachRasterTile( EMaterialParameterAssociation::LayerParameter, i), translationAndScale); + check( + textureCoordinateID >= 0 && + textureCoordinateID < + primData.overlayTextureCoordinateIDToUVIndex.size()); pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo( "TextureCoordinateIndex", diff --git a/extern/cesium-native b/extern/cesium-native index fd22a9c80..7b731787d 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit fd22a9c80f47f5750ee39e64a727aac4ea6a62f5 +Subproject commit 7b731787dae3411a46b74ebdcf7e26f92b0e68a7 From 1b1571fdbbcd69412ddab32263bd6fc4e29218bb Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 20 Nov 2024 21:34:58 +1100 Subject: [PATCH 26/36] Update cesium-native. --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 7b731787d..2ba26683e 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 7b731787dae3411a46b74ebdcf7e26f92b0e68a7 +Subproject commit 2ba26683e63cb99e54010ea685d6244c986624d1 From 027a8dc7506092f1ccc7cca08a64b7e350c9670c Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 21 Nov 2024 06:59:51 +1100 Subject: [PATCH 27/36] Adjust for changes in cesium-native. --- Source/CesiumRuntime/Private/CesiumBingMapsRasterOverlay.cpp | 1 - .../Private/CesiumWebMapTileServiceRasterOverlay.cpp | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/CesiumRuntime/Private/CesiumBingMapsRasterOverlay.cpp b/Source/CesiumRuntime/Private/CesiumBingMapsRasterOverlay.cpp index a538e8c69..bcc7c0046 100644 --- a/Source/CesiumRuntime/Private/CesiumBingMapsRasterOverlay.cpp +++ b/Source/CesiumRuntime/Private/CesiumBingMapsRasterOverlay.cpp @@ -43,6 +43,5 @@ UCesiumBingMapsRasterOverlay::CreateOverlay( TCHAR_TO_UTF8(*this->BingMapsKey), mapStyle, "", - CesiumGeospatial::Ellipsoid::WGS84, options); } diff --git a/Source/CesiumRuntime/Private/CesiumWebMapTileServiceRasterOverlay.cpp b/Source/CesiumRuntime/Private/CesiumWebMapTileServiceRasterOverlay.cpp index bd9a63fed..ecefeca4c 100644 --- a/Source/CesiumRuntime/Private/CesiumWebMapTileServiceRasterOverlay.cpp +++ b/Source/CesiumRuntime/Private/CesiumWebMapTileServiceRasterOverlay.cpp @@ -57,8 +57,7 @@ UCesiumWebMapTileServiceRasterOverlay::CreateOverlay( wmtsOptions.tileWidth = this->TileWidth; wmtsOptions.tileHeight = this->TileHeight; - const CesiumGeospatial::Ellipsoid& ellipsoid = - options.ellipsoid.value_or(CesiumGeospatial::Ellipsoid::WGS84); + const CesiumGeospatial::Ellipsoid& ellipsoid = options.ellipsoid; if (this->Projection == ECesiumWebMapTileServiceRasterOverlayProjection::Geographic) { From c5a09573e258675b90e9caa8542737ffec7710b0 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 21 Nov 2024 07:05:12 +1100 Subject: [PATCH 28/36] Update cesium-native. --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 2ba26683e..970ab2414 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 2ba26683e63cb99e54010ea685d6244c986624d1 +Subproject commit 970ab241464c90fd1009dd4521cd77ea1d69b22d From ad4de7d2dc9f64db013accdf20a0b609703e17ab Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 21 Nov 2024 20:57:34 +1100 Subject: [PATCH 29/36] Update CHANGES.md. --- CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 760195366..f3f8b5d62 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,8 +2,11 @@ ### ? - 2024-12-02 +This is the last release of Cesium for Unreal that will support Unreal Engine v5.2. Future versions will require Unreal Engine v5.3+. + ##### Additions :tada: +- Added support for Unreal Engine 5.5. - Added a "From Ellipsoid" option to `Cesium3DTileset` to generate a tileset by tesselating the surface of the ellipsoid, producing a simple globe tileset without terrain features. ##### Fixes :wrench: From 3a205ce753c54f8b24fe64565679dad3e1b9feff Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 21 Nov 2024 21:13:27 +1100 Subject: [PATCH 30/36] Update cesium-native. --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index a52b11448..cd2128ddc 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit a52b11448cb72c3c17e6fe591f74fbcb8e9daa9c +Subproject commit cd2128ddc0fe35504b21c95dc5ac7ea2fb7eb691 From 4e128663e2f719b44d6fbe42cfc30536d8521505 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Fri, 22 Nov 2024 13:52:58 -0500 Subject: [PATCH 31/36] Add define to point cloud vertex factory --- .../CesiumPointAttenuationVertexFactory.ush | 42 +++++++++++++++++-- .../CesiumPointAttenuationVertexFactory.cpp | 9 ++++ .../CesiumPointAttenuationVertexFactory.h | 4 ++ 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush index 7ec41bed4..0d639b6ff 100644 --- a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush +++ b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush @@ -4,6 +4,10 @@ CesiumPointAttenuationVertexFactory.ush: point attenuation vertex factory shader code. =============================================================================*/ +#ifndef ENGINE_VERSION_5_5_OR_HIGHER +#define ENGINE_VERSION_5_5_OR_HIGHER 0 +#endif + #include "/Engine/Private/Common.ush" #include "/Engine/Private/VertexFactoryCommon.ush" @@ -253,6 +257,13 @@ float4 VertexFactoryGetWorldPosition(FPositionAndNormalOnlyVertexFactoryInput In return GetWorldPosition(Input.VertexId); } +// local position relative to instance +float3 VertexFactoryGetInstanceSpacePosition(FVertexFactoryInput Input, FVertexFactoryIntermediates Intermediates) +{ + // No support for instancing, so instance == primitive + return Intermediates.Position; +} + float3 VertexFactoryGetWorldNormal(FPositionAndNormalOnlyVertexFactoryInput Input) { float3 PointNormal = GetPointNormal(Input.VertexId); @@ -275,6 +286,13 @@ float4 VertexFactoryGetPreviousWorldPosition(FVertexFactoryInput Input, FVertexF #endif } +// local position relative to instance +float3 VertexFactoryGetPreviousInstanceSpacePosition(FVertexFactoryInput Input, FVertexFactoryIntermediates Intermediates) +{ + // No support for instancing, so instance == primitive + return Intermediates.Position; +} + float4 ApplyAttenuation(float4 WorldPosition, uint CornerIndex) { // These offsets generate the quad like so: // 1 --- 2 @@ -333,9 +351,23 @@ FMaterialVertexParameters GetMaterialVertexParameters( FVertexFactoryInput Input, FVertexFactoryIntermediates Intermediates, float3 WorldPosition, - half3x3 TangentToLocal) -{ + half3x3 TangentToLocal, + bool bIsPreviousFrame = false) +{ +#if ENGINE_VERSION_5_5_OR_HIGHER + FMaterialVertexParameters Result = MakeInitializedMaterialVertexParameters(); + if (bIsPreviousFrame) + { + Result.PositionInstanceSpace = VertexFactoryGetPreviousInstanceSpacePosition(Input, Intermediates); + } + else + { + Result.PositionInstanceSpace = VertexFactoryGetInstanceSpacePosition(Input, Intermediates); + } + Result.PositionPrimitiveSpace = Result.PositionInstanceSpace; // No support for instancing, so instance == primitive +#else FMaterialVertexParameters Result = (FMaterialVertexParameters)0; +#endif Result.SceneData = Intermediates.SceneData; Result.WorldPosition = WorldPosition; @@ -353,7 +385,9 @@ FMaterialVertexParameters GetMaterialVertexParameters( Result.TexCoords[CoordinateIndex] = TexCoordBuffer[NumTexCoords * Intermediates.PointIndex + ClampedCoordinateIndex]; } #endif - + + Result.LWCData = MakeMaterialLWCData(Result); + return Result; } @@ -362,7 +396,7 @@ FMaterialVertexParameters GetMaterialVertexParameters( FVertexFactoryIntermediates Intermediates, float3 WorldPosition, half3x3 TangentToLocal, - bool noIdeaWhatThisIs) + bool bIsPreviousFrame = false) { return GetMaterialVertexParameters(Input, Intermediates, WorldPosition, TangentToLocal); } diff --git a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp index dcf34fcbc..f62abe9f3 100644 --- a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp +++ b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp @@ -171,6 +171,15 @@ bool FCesiumPointAttenuationVertexFactory::ShouldCompilePermutation( Parameters.MaterialParameters.bIsSpecialEngineMaterial; } +void FCesiumPointAttenuationVertexFactory::ModifyCompilationEnvironment( + const FVertexFactoryShaderPermutationParameters& Parameters, + FShaderCompilerEnvironment& OutEnvironment) { + FLocalVertexFactory::ModifyCompilationEnvironment(Parameters, OutEnvironment); +#if ENGINE_VERSION_5_5_OR_HIGHER + OutEnvironment.SetDefine(TEXT("ENGINE_VERSION_5_5_OR_HIGHER"), TEXT("1")); +#endif +} + void FCesiumPointAttenuationVertexFactory::INIT_RHI_SIGNATURE { FVertexDeclarationElementList Elements; Elements.Add(AccessStreamComponent( diff --git a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h index 2afe0cab6..0b09a7900 100644 --- a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h +++ b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.h @@ -70,6 +70,10 @@ class FCesiumPointAttenuationVertexFactory : public FLocalVertexFactory { static bool ShouldCompilePermutation( const FVertexFactoryShaderPermutationParameters& Parameters); + static void ModifyCompilationEnvironment( + const FVertexFactoryShaderPermutationParameters& Parameters, + FShaderCompilerEnvironment& OutEnvironment); + private: virtual void INIT_RHI_SIGNATURE override; virtual void ReleaseRHI() override; From ab1a5bfa75d0a1c61893a41b9c3e18d3b31f4903 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Fri, 22 Nov 2024 16:41:07 -0500 Subject: [PATCH 32/36] Remove extra define in shader, update cesium-native --- .../Private/CesiumPointAttenuationVertexFactory.ush | 10 ---------- extern/cesium-native | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush index 0d639b6ff..57ed480d5 100644 --- a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush +++ b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush @@ -391,16 +391,6 @@ FMaterialVertexParameters GetMaterialVertexParameters( return Result; } -FMaterialVertexParameters GetMaterialVertexParameters( - FVertexFactoryInput Input, - FVertexFactoryIntermediates Intermediates, - float3 WorldPosition, - half3x3 TangentToLocal, - bool bIsPreviousFrame = false) -{ - return GetMaterialVertexParameters(Input, Intermediates, WorldPosition, TangentToLocal); -} - FMaterialPixelParameters GetMaterialPixelParameters(FVertexFactoryInterpolantsVSToPS Interpolants, float4 SvPosition) { FMaterialPixelParameters Result = MakeInitializedMaterialPixelParameters(); diff --git a/extern/cesium-native b/extern/cesium-native index cd2128ddc..3b4363bcc 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit cd2128ddc0fe35504b21c95dc5ac7ea2fb7eb691 +Subproject commit 3b4363bcceb8d9bdfebfb29620f25fc2238cfe1b From ecb5f2b01579189dabc2f7b646f70a16f103dcca Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Mon, 25 Nov 2024 11:34:47 -0500 Subject: [PATCH 33/36] Add ifdef for UE 5.4 in point cloud shader --- Shaders/Private/CesiumPointAttenuationVertexFactory.ush | 8 +++++++- .../Private/CesiumPointAttenuationVertexFactory.cpp | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush index 57ed480d5..6746ed36c 100644 --- a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush +++ b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush @@ -4,6 +4,10 @@ CesiumPointAttenuationVertexFactory.ush: point attenuation vertex factory shader code. =============================================================================*/ +#ifndef ENGINE_VERSION_5_4_OR_HIGHER +#define ENGINE_VERSION_5_5_OR_HIGHER 0 +#endif + #ifndef ENGINE_VERSION_5_5_OR_HIGHER #define ENGINE_VERSION_5_5_OR_HIGHER 0 #endif @@ -385,8 +389,10 @@ FMaterialVertexParameters GetMaterialVertexParameters( Result.TexCoords[CoordinateIndex] = TexCoordBuffer[NumTexCoords * Intermediates.PointIndex + ClampedCoordinateIndex]; } #endif - + +#if ENGINE_VERSION_5_4_OR_HIGHER Result.LWCData = MakeMaterialLWCData(Result); +#endif return Result; } diff --git a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp index f62abe9f3..3e887424d 100644 --- a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp +++ b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp @@ -175,6 +175,10 @@ void FCesiumPointAttenuationVertexFactory::ModifyCompilationEnvironment( const FVertexFactoryShaderPermutationParameters& Parameters, FShaderCompilerEnvironment& OutEnvironment) { FLocalVertexFactory::ModifyCompilationEnvironment(Parameters, OutEnvironment); +#if ENGINE_VERSION_5_4_OR_HIGHER + OutEnvironment.SetDefine(TEXT("ENGINE_VERSION_5_4_OR_HIGHER"), TEXT("1")); +#endif + #if ENGINE_VERSION_5_5_OR_HIGHER OutEnvironment.SetDefine(TEXT("ENGINE_VERSION_5_5_OR_HIGHER"), TEXT("1")); #endif From 6c3fbb0edf316b42bed78b6b03b53ef3fe9630d4 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Mon, 25 Nov 2024 11:42:52 -0500 Subject: [PATCH 34/36] Fix typo --- Shaders/Private/CesiumPointAttenuationVertexFactory.ush | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush index 6746ed36c..c48406820 100644 --- a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush +++ b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush @@ -5,7 +5,7 @@ =============================================================================*/ #ifndef ENGINE_VERSION_5_4_OR_HIGHER -#define ENGINE_VERSION_5_5_OR_HIGHER 0 +#define ENGINE_VERSION_5_4_OR_HIGHER 0 #endif #ifndef ENGINE_VERSION_5_5_OR_HIGHER From 6a44c2fdf9a63edbb12a175aedbccad3a26cec55 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Mon, 25 Nov 2024 17:45:39 -0500 Subject: [PATCH 35/36] Use cesium-native main, update abseil portfile --- extern/cesium-native | 2 +- extern/vcpkg-overlays/abseil/portfile.cmake | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/extern/cesium-native b/extern/cesium-native index 3b4363bcc..5d24df6c4 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 3b4363bcceb8d9bdfebfb29620f25fc2238cfe1b +Subproject commit 5d24df6c493808e40c656deea6f85fb6ccff368e diff --git a/extern/vcpkg-overlays/abseil/portfile.cmake b/extern/vcpkg-overlays/abseil/portfile.cmake index 83f393dce..69ec1f7bb 100644 --- a/extern/vcpkg-overlays/abseil/portfile.cmake +++ b/extern/vcpkg-overlays/abseil/portfile.cmake @@ -27,16 +27,6 @@ endif() # Don't let Abseil clobber our CMAKE_MSVC_RUNTIME_LIBRARY choice. vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")" "#set(CMAKE_MSVC_RUNTIME_LIBRARY \"MultiThreaded$<$:Debug>DLL\")") -vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" - DISABLE_PARALLEL_CONFIGURE - OPTIONS - -DABSL_PROPAGATE_CXX_STD=OFF - -DCMAKE_CXX_STANDARD=14 - ${ABSL_USE_CXX17_OPTION} - ${ABSL_STATIC_RUNTIME_OPTION} -) - # Don't let our customized version of Abseil pose as the real thing. vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722" "ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20240722_cesium_for_unreal") vcpkg_replace_string("${SOURCE_PATH}/absl/base/options.h" "ABSL_OPTION_USE_STD_ANY 2" "ABSL_OPTION_USE_STD_ANY 0") @@ -52,6 +42,16 @@ vcpkg_replace_string("${SOURCE_PATH}/absl/base/config.h" "#define ABSL_LTS_RELEA vcpkg_replace_string("${SOURCE_PATH}/absl/time/time.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") vcpkg_replace_string("${SOURCE_PATH}/absl/strings/cord.h" "__cpp_impl_three_way_comparison" "__cpp_lib_three_way_comparison") +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + OPTIONS + -DABSL_PROPAGATE_CXX_STD=OFF + -DCMAKE_CXX_STANDARD=14 + ${ABSL_USE_CXX17_OPTION} + ${ABSL_STATIC_RUNTIME_OPTION} +) + vcpkg_cmake_install() vcpkg_cmake_config_fixup(PACKAGE_NAME absl CONFIG_PATH lib/cmake/absl) vcpkg_fixup_pkgconfig() From dbe14b0979d55172ad6aa3983e87eb5aab517f5e Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Mon, 25 Nov 2024 17:55:19 -0500 Subject: [PATCH 36/36] Use correct cesium-native commit --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 5d24df6c4..b34a8047d 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 5d24df6c493808e40c656deea6f85fb6ccff368e +Subproject commit b34a8047d11c2cacac662732e7655f04b50ae20b