| 184 | } |
| 185 | |
| 186 | std::uint32_t GetMemoryFootprint(const Format format, std::uint32_t numTexels) |
| 187 | { |
| 188 | const auto& formatDesc = GetFormatAttribs(format); |
| 189 | const auto blockSize = formatDesc.blockWidth * formatDesc.blockHeight; |
| 190 | if (blockSize > 0 && numTexels % blockSize == 0) |
| 191 | return ((numTexels / blockSize * formatDesc.bitSize) / 8); |
| 192 | else |
| 193 | return 0; |
| 194 | } |
| 195 | |
| 196 | LLGL_EXPORT std::uint32_t ImageFormatSize(const ImageFormat imageFormat) |
| 197 | { |
no outgoing calls
no test coverage detected