[Vulkan] Make image views cover all mips

Align texture dimensions to 1 block minimum (for uploading mips)
This commit is contained in:
Dr. Chat
2018-05-03 14:15:36 -05:00
parent c9d4cfe6d0
commit f885b89a03
3 changed files with 25 additions and 4 deletions

View File

@@ -318,6 +318,9 @@ struct TextureInfo {
// Get the memory location of a mip. offset_x and offset_y are in blocks.
static uint32_t GetMipLocation(const TextureInfo& src, uint32_t mip,
uint32_t* offset_x, uint32_t* offset_y);
// Get the byte size of a MIP when stored linearly.
static uint32_t GetMipLinearSize(const TextureInfo& src, uint32_t mip);
static bool GetPackedTileOffset(uint32_t width, uint32_t height,
const FormatInfo* format_info,
uint32_t* out_offset_x,