| 119 | } |
| 120 | |
| 121 | CMP_INT CMP_API CMP_CalcMaxMipLevel(CMP_INT nHeight, CMP_INT nWidth, CMP_BOOL bForGPU) |
| 122 | { |
| 123 | CMP_INT MaxMipLevel = 1; |
| 124 | while (MaxMipLevel < MAX_MIPLEVEL_SUPPORTED && (nWidth > 1 || nHeight > 1)) |
| 125 | { |
| 126 | nWidth = CMP_MAX(nWidth >> 1, 1); |
| 127 | nHeight = CMP_MAX(nHeight >> 1, 1); |
| 128 | if (bForGPU) |
| 129 | { |
| 130 | if ((nWidth % 4) || (nHeight % 4)) |
| 131 | break; |
| 132 | } |
| 133 | MaxMipLevel++; |
| 134 | } |
| 135 | |
| 136 | return MaxMipLevel; |
| 137 | } |
| 138 | |
| 139 | CMP_ERROR CMP_API CMP_CreateCompressMipSet(CMP_MipSet* pMipSetCMP, CMP_MipSet* pMipSetSRC) |
| 140 | { |
no outgoing calls