Integrating latest 47acbe8

This commit is contained in:
alexpete
2021-03-25 13:57:57 -07:00
parent 448c549698
commit 75dc720198
10312 changed files with 2711566 additions and 671451 deletions
@@ -189,7 +189,9 @@ namespace ImageProcessingAtom
// Add all the mip chain assets as dependencies except the tail mip chain since its embedded in the StreamingImageAsset
if (it->Get() != mipChains.begin()->Get())
{
product.m_dependencies.push_back(AssetBuilderSDK::ProductDependency(it->GetId(), 0));
// Use PreLoad for mipchain assets for now.
// [GFX TODO] [ATOM-14467] Remove unnecessary code in StreamingImage::OnAssetReloaded when runtime switching dependency load behavior is supported
product.m_dependencies.push_back(AssetBuilderSDK::ProductDependency(it->GetId(), AZ::Data::ProductDependencyInfo::CreateFlags(AZ::Data::AssetLoadBehavior::PreLoad)));
}
}
@@ -40,9 +40,6 @@
#define MinSizeToSplit 1 << 5
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#if defined(TOOLS_SUPPORT_XENIA)
#include AZ_RESTRICTED_FILE_EXPLICIT(ImageProcess, Xenia)
#endif
#if defined(TOOLS_SUPPORT_JASPER)
#include AZ_RESTRICTED_FILE_EXPLICIT(ImageProcess, Jasper)
#endif
@@ -32,9 +32,9 @@ namespace ImageProcessingAtom
~CImageObject();
//virtual functions from IImageObject
IImageObject* AllocateImage(EPixelFormat pixelFormat, uint32_t maxMipCount = (std::numeric_limits<uint32>::max)()) const override;
IImageObject* AllocateImage(uint32_t maxMipCount = (std::numeric_limits<uint32>::max)()) const override;
IImageObject* Clone(uint32_t maxMipCount = (std::numeric_limits<uint32>::max)()) const override;
IImageObject* AllocateImage(EPixelFormat pixelFormat, uint32_t maxMipCount = (std::numeric_limits<uint32_t>::max)()) const override;
IImageObject* AllocateImage(uint32_t maxMipCount = (std::numeric_limits<uint32_t>::max)()) const override;
IImageObject* Clone(uint32_t maxMipCount = (std::numeric_limits<uint32_t>::max)()) const override;
EPixelFormat GetPixelFormat() const override;
AZ::u32 GetPixelCount(AZ::u32 mip) const override;
AZ::u32 GetWidth(AZ::u32 mip) const override;
@@ -345,18 +345,11 @@ namespace ImageProcessingAtom
RPI::StreamingImageAssetHandler* imageAssetHandler = static_cast<RPI::StreamingImageAssetHandler*>(
Data::AssetManager::Instance().GetHandler(RPI::StreamingImageAsset::RTTI_Type()));
// Enable load mipchain assets
bool savedLoadMipEnabled = imageAssetHandler->GetLoadMipChainsEnabled();
imageAssetHandler->SetLoadMipChainsEnabled(true);
// Blocking loading streaming image asset with its mipchain assets
AZ::Data::Asset<AZ::RPI::StreamingImageAsset> imageAsset = AZ::Data::AssetManager::Instance().GetAsset<AZ::RPI::StreamingImageAsset>(imageAssetId, AZ::Data::AssetLoadBehavior::PreLoad);
imageAsset.BlockUntilLoadComplete();
// Recover the load option
imageAssetHandler->SetLoadMipChainsEnabled(savedLoadMipEnabled);
return imageAsset;
}