Merge remote-tracking branch 'origin/master' into 1.11

This commit is contained in:
Wojtek Figat
2025-06-16 22:46:17 +02:00
44 changed files with 720 additions and 173 deletions

View File

@@ -656,6 +656,23 @@ GPUTask* GPUTexture::UploadMipMapAsync(const BytesContainer& data, int32 mipInde
return task;
}
bool GPUTexture::UploadData(TextureData& data, bool copyData)
{
if (!IsAllocated())
return true;
if (data.Width != Width() || data.Height != Height() || data.Depth != Depth() || data.GetArraySize() != ArraySize() || data.Format != Format())
return true;
for (int32 arrayIndex = 0; arrayIndex < ArraySize(); arrayIndex++)
{
for (int32 mipLevel = 0; mipLevel < MipLevels(); mipLevel++)
{
TextureMipData* mip = data.GetData(arrayIndex, mipLevel);
UploadMipMapAsync(mip->Data, mipLevel, mip->RowPitch, mip->DepthPitch, copyData);
}
}
return false;
}
class TextureDownloadDataTask : public ThreadPoolTask
{
private: