Integrating github/staging through commit ab87ed9

This commit is contained in:
alexpete
2021-04-09 11:27:37 -07:00
parent ae62a97894
commit 1044dc3da1
1582 changed files with 29374 additions and 519051 deletions
@@ -148,7 +148,6 @@ namespace ImageProcessingAtom
size_t nSlicePitch = (pitch / ePS_Blue);
AZ::u32 src = 0;
AZ::u32 dst = 0;
for (int b = 0; b < ePS_Blue; ++b)
{
for (int g = 0; g < ePS_Green; ++g)
@@ -311,4 +310,4 @@ namespace ImageProcessingAtom
//save color chart data to an image and save as current
m_img = colorChart.GenerateChartImage();
}
}
}
@@ -638,7 +638,6 @@ namespace ImageProcessingAtom
DDS_FILE_DESC desc;
DDS_HEADER_DXT10 exthead;
AZ::IO::SizeType startPos = fileLoadStream.GetCurPos();
fileLoadStream.Read(sizeof(desc), &desc);
if (desc.dwMagic != FOURCC_DDS || !desc.IsValid())
@@ -119,8 +119,6 @@ namespace ImageProcessingAtom
ImfMath::Box2i dw = header.dataWindow();
width = dw.max.x - dw.min.x + 1;
height = dw.max.y - dw.min.y + 1;
int dx = dw.min.x;
int dy = dw.min.y;
// Create IImageObject
IImageObject* newImage = IImageObject::CreateImage(width, height, 1, format);
@@ -36,7 +36,6 @@ namespace ImageProcessingAtom
}
//convert to format which compatiable our pixel format
QImage::Format format = qimage.format();
if (qimage.format() != QImage::Format_RGBA8888)
{
qimage = qimage.convertToFormat(QImage::Format_RGBA8888);
@@ -193,7 +193,7 @@ namespace ImageProcessingAtom
AZ::Uuid sourceId = source->GetSourceUuid();
QAction* editImportSettingsAction = menu->addAction("Edit Texture Settings...", [sourceId, this]()
menu->addAction("Edit Texture Settings...", [sourceId, this]()
{
OpenSourceTextureFile(sourceId);
});
@@ -205,7 +205,7 @@ namespace ImageProcessingAtom
if (product->GetAssetType() == azrtti_typeid<AZ::RPI::StreamingImageAsset>())
{
AZ::Data::AssetId assetId = product->GetAssetId();
QAction* editImportSettingsAction = menu->addAction("Save as DDS...", [assetId, this]()
menu->addAction("Save as DDS...", [assetId, this]()
{
QString filePath = QFileDialog::getSaveFileName(nullptr, QString("Save to file"), m_lastSavedPath, QString("DDS file (*.dds)"));
if (filePath.isEmpty())
@@ -118,7 +118,6 @@ namespace ImageProcessingAtom
// Build mip chain assets.
// Start from smallest mips so the mip chain asset for the lowest resolutions may contain more high level mips
bool ready = false;
uint32_t lastMip = imageDesc.m_mipLevels;
uint32_t totalSize = 0;
AZStd::vector<Data::Asset<RPI::ImageMipChainAsset>> mipChains;
@@ -1090,7 +1090,6 @@ namespace ImageProcessingAtom
uint32 pitch1, pitch2;
float sumDeltaSqLinear = 0;
AZ::u32 sumPixelCount = 0;
//only process the highest mip
image1->GetImagePointer(0, mem1, pitch1);
@@ -504,8 +504,6 @@ namespace ImageProcessingAtom
const PixelFormatInfo* const pPixelFormatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(format);
DXGI_FORMAT d3dformat = pPixelFormatInfo->d3d10Format;
memset(&header, 0, sizeof(DDS_HEADER_LEGACY));
header.dwSize = sizeof(DDS_HEADER_LEGACY);
@@ -702,7 +700,6 @@ namespace ImageProcessingAtom
{
const MipLevel& level = *m_mips[mip];
AZ::u32 faceBufSize = level.m_pitch * level.m_rowCount / faces;
AZ::u32 start = faceBufSize * face;
saveFileStream.Write(faceBufSize, level.m_pData + faceBufSize * face);
}
}
@@ -342,9 +342,6 @@ namespace ImageProcessingAtom
AZ::Data::Asset<AZ::RPI::StreamingImageAsset> LoadImageAsset(const AZ::Data::AssetId& imageAssetId)
{
RPI::StreamingImageAssetHandler* imageAssetHandler = static_cast<RPI::StreamingImageAssetHandler*>(
Data::AssetManager::Instance().GetHandler(RPI::StreamingImageAsset::RTTI_Type()));
// 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);
@@ -103,6 +103,8 @@ namespace UnitTest
ComponentApplication* GetApplication() override { return nullptr; }
void RegisterComponentDescriptor(const ComponentDescriptor*) override { }
void UnregisterComponentDescriptor(const ComponentDescriptor*) override { }
void RegisterEntityAddedEventHandler(EntityAddedEvent::Handler&) override { }
void RegisterEntityRemovedEventHandler(EntityRemovedEvent::Handler&) override { }
bool AddEntity(Entity*) override { return false; }
bool RemoveEntity(Entity*) override { return false; }
bool DeleteEntity(const EntityId&) override { return false; }