| 31 | static const u32 kPalette8BytesRequired = 256 * sizeof( NativePf8888 ); |
| 32 | |
| 33 | static u32 GetTextureBlockWidth( u32 dimension, ETextureFormat texture_format ) |
| 34 | { |
| 35 | DAEDALUS_ASSERT( GetNextPowerOf2( dimension ) == dimension, "This is not a power of 2" ); |
| 36 | |
| 37 | // Ensure that the pitch is at least 16 bytes |
| 38 | while( CalcBytesRequired( dimension, texture_format ) < 16 ) |
| 39 | { |
| 40 | dimension *= 2; |
| 41 | } |
| 42 | |
| 43 | return dimension; |
| 44 | } |
| 45 | |
| 46 | static inline u32 CorrectDimension( u32 dimension ) |
| 47 | { |
no test coverage detected