| 76 | const uint32_t INVALID_LOD = std::numeric_limits<uint32_t>::max(); |
| 77 | |
| 78 | void CreateDescription( const ImageIO::HostBitmap& bitmap, uint32_t lod, Tr2BitmapDimensions& desc ) |
| 79 | { |
| 80 | uint32_t mipCount = bitmap.GetTrueMipCount(); |
| 81 | uint32_t mip = std::min( lod, mipCount - 1 ); |
| 82 | desc = Tr2BitmapDimensions( |
| 83 | bitmap.GetType(), |
| 84 | bitmap.GetFormat(), |
| 85 | bitmap.GetMipWidth( mip ), |
| 86 | bitmap.GetMipHeight( mip ), |
| 87 | bitmap.GetMipDepth( mip ), |
| 88 | mipCount - mip, |
| 89 | bitmap.GetArraySize() ); |
| 90 | } |
| 91 | |
| 92 | void CreateDescription( const ImageIO::HostBitmap& bitmap, uint32_t lod, Tr2BitmapDimensions& desc, std::vector<Tr2SubresourceData>& initialData ) |
| 93 | { |
no test coverage detected