| 681 | } |
| 682 | |
| 683 | bool GPUTexture::UploadData(TextureData& data, bool copyData) |
| 684 | { |
| 685 | if (!IsAllocated()) |
| 686 | return true; |
| 687 | if (data.Width != Width() || data.Height != Height() || data.Depth != Depth() || data.GetArraySize() != ArraySize() || data.Format != Format()) |
| 688 | return true; |
| 689 | for (int32 arrayIndex = 0; arrayIndex < ArraySize(); arrayIndex++) |
| 690 | { |
| 691 | for (int32 mipLevel = 0; mipLevel < MipLevels(); mipLevel++) |
| 692 | { |
| 693 | TextureMipData* mip = data.GetData(arrayIndex, mipLevel); |
| 694 | UploadMipMapAsync(mip->Data, mipLevel, mip->RowPitch, mip->DepthPitch, copyData); |
| 695 | } |
| 696 | } |
| 697 | return false; |
| 698 | } |
| 699 | |
| 700 | class TextureDownloadDataTask : public ThreadPoolTask |
| 701 | { |
nothing calls this directly
no test coverage detected