| 77 | } |
| 78 | |
| 79 | static inline uint32_t BaseCoordFromMip(uint32_t coord, const uint32_t mip, const uint32_t dim) |
| 80 | { |
| 81 | const uint32_t mipDim = (dim >> mip) > 0 ? (dim >> mip) : 1; |
| 82 | |
| 83 | // reverse of the above conversion |
| 84 | |
| 85 | const float coordf = float(coord) / float(mipDim); |
| 86 | |
| 87 | return uint32_t(dim * (coordf + 1e-6f)); |
| 88 | } |
| 89 | |
| 90 | static Descriptor MakeDescriptor(ResourceId res, Subresource sub = Subresource()) |
| 91 | { |
no outgoing calls
no test coverage detected