[D3D12] Untile whole mip tail to make alignment assumptions later, other mip fixes
This commit is contained in:
@@ -63,19 +63,6 @@ bool GetPackedMipOffset(uint32_t width, uint32_t height, uint32_t depth,
|
||||
TextureFormat format, uint32_t mip, uint32_t& x_blocks,
|
||||
uint32_t& y_blocks, uint32_t& z_blocks);
|
||||
|
||||
// Calculates the index of the smallest mip (1x1x1 for unpacked or min(w,h)<=16
|
||||
// packed mips) for a texture. For non-3D textures, set the depth to 1.
|
||||
inline uint32_t GetSmallestMipLevel(uint32_t width, uint32_t height,
|
||||
uint32_t depth, bool packed_mips) {
|
||||
uint32_t size = std::max(width, height);
|
||||
size = std::max(size, depth);
|
||||
uint32_t smallest_mip = xe::log2_ceil(size);
|
||||
if (packed_mips) {
|
||||
smallest_mip = std::min(smallest_mip, GetPackedMipLevel(width, height));
|
||||
}
|
||||
return smallest_mip;
|
||||
}
|
||||
|
||||
// Returns the total size of memory the texture uses starting from its base and
|
||||
// mip addresses, in bytes (both are optional).
|
||||
void GetTextureTotalSize(Dimension dimension, uint32_t width, uint32_t height,
|
||||
|
||||
Reference in New Issue
Block a user