Преглед на файлове

Various Fixes to ASV (#506)

* Replace deprecated cmake pal functions

- Replaced two instances of ly_get_list_relative_pal_filename with
  o3de_pal_dir in CMakeLists.txt files.

Signed-off-by: amzn-phist <[email protected]>

* Fix some compile errors from recent Uuid changes

- Before you could implicitly construct a Uuid from nullptr, but no
  longer.
- Replaced a few places where nullptr was being passed where a Uuid& was
  expected.
- Minor: Fixed spelling of a type.

Signed-off-by: amzn-phist <[email protected]>

Signed-off-by: amzn-phist <[email protected]>
amzn-phist преди 2 години
родител
ревизия
8ee3be6ca1

+ 1 - 1
Gem/Code/CMakeLists.txt

@@ -6,7 +6,7 @@
 #
 #
 
-ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}")
 
 ly_add_target(
     NAME AtomSampleViewer.Lib.Static STATIC

+ 1 - 1
Gem/Code/Source/BakedShaderVariantExampleComponent.cpp

@@ -75,7 +75,7 @@ namespace AtomSampleViewer
 
         Data::AssetId modelAssetId;
         Data::AssetCatalogRequestBus::BroadcastResult(
-            modelAssetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, Products::ModelFilePath, nullptr, false);
+            modelAssetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, Products::ModelFilePath, AZ::Uuid::CreateNull(), false);
         AZ_Assert(modelAssetId.IsValid(), "Failed to get model asset id: %s", Products::ModelFilePath);
         m_modelAsset.Create(modelAssetId);
 

+ 2 - 2
Gem/Code/Source/MaterialHotReloadTestComponent.cpp

@@ -164,7 +164,7 @@ namespace AtomSampleViewer
         ScriptRunnerRequestBus::Broadcast(&ScriptRunnerRequests::PauseScriptWithTimeout, LongTimeout);
 
         Data::AssetId modelAssetId;
-        Data::AssetCatalogRequestBus::BroadcastResult(modelAssetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, Products::ModelFilePath, nullptr, false);
+        Data::AssetCatalogRequestBus::BroadcastResult(modelAssetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, Products::ModelFilePath, AZ::Uuid::CreateNull(), false);
         AZ_Assert(modelAssetId.IsValid(), "Failed to get model asset id: %s", Products::ModelFilePath);
         m_modelAsset.Create(modelAssetId);
 
@@ -290,7 +290,7 @@ namespace AtomSampleViewer
     Data::AssetId MaterialHotReloadTestComponent::GetAssetId(const char* productFilePath)
     {
         Data::AssetId assetId;
-        Data::AssetCatalogRequestBus::BroadcastResult(assetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, productFilePath, nullptr, false);
+        Data::AssetCatalogRequestBus::BroadcastResult(assetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, productFilePath, AZ::Uuid::CreateNull(), false);
         return assetId;
     }
 

+ 1 - 1
Gem/Code/Source/MultiSceneExampleComponent.cpp

@@ -312,7 +312,7 @@ namespace AtomSampleViewer
 
         // Release the probe
         m_reflectionProbeFeatureProcessor->RemoveReflectionProbe(m_reflectionProbeHandle);
-        m_reflectionProbeHandle = nullptr;
+        m_reflectionProbeHandle = {};
 
         // Release all meshes
         for (auto& shaderBallMeshHandle : m_shaderBallMeshHandles)

+ 2 - 2
Gem/Code/Source/MultiSceneExampleComponent.h

@@ -39,7 +39,7 @@ namespace AtomSampleViewer
         using PointLightHandle = AZ::Render::PointLightFeatureProcessorInterface::LightHandle;
         using DiskLightHandle = AZ::Render::DiskLightFeatureProcessorInterface::LightHandle;
         using DirectionalLightHandle = AZ::Render::DirectionalLightFeatureProcessorInterface::LightHandle;
-        using ReflectinoProbeHandle = AZ::Render::ReflectionProbeHandle;
+        using ReflectionProbeHandle = AZ::Render::ReflectionProbeHandle;
 
         static constexpr uint32_t ShaderBallCount = 12u;
 
@@ -93,7 +93,7 @@ namespace AtomSampleViewer
         PointLightHandle m_pointLightHandle;
         DiskLightHandle m_diskLightHandle;
         DirectionalLightHandle m_directionalLightHandle;
-        ReflectinoProbeHandle m_reflectionProbeHandle;
+        ReflectionProbeHandle m_reflectionProbeHandle;
 
         MultiSceneExampleComponent* m_parent = nullptr;
         const AZ::Vector3 m_cameraOffset{ 0.0f, -4.0f, 2.0f };

+ 1 - 2
Standalone/CMakeLists.txt

@@ -6,8 +6,7 @@
 #
 #
 
-
-ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME})
+o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}")
 
 include(${pal_dir}/atomsampleviewer_traits_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)