| 179 | } |
| 180 | |
| 181 | uint32_t CalcNumMips(int w, int h, int d) |
| 182 | { |
| 183 | int mipLevels = 1; |
| 184 | |
| 185 | while(w > 1 || h > 1 || d > 1) |
| 186 | { |
| 187 | w = RDCMAX(1, w >> 1); |
| 188 | h = RDCMAX(1, h >> 1); |
| 189 | d = RDCMAX(1, d >> 1); |
| 190 | mipLevels++; |
| 191 | } |
| 192 | |
| 193 | return mipLevels; |
| 194 | } |
| 195 | |
| 196 | byte *AllocAlignedBuffer(uint64_t size, uint64_t alignment) |
| 197 | { |
no test coverage detected