[Vulkan] Handle MIPs with non-power-of-two dimensions

This commit is contained in:
Dr. Chat
2018-05-03 17:54:09 -05:00
parent 04748b4a0d
commit f45cd398ef
3 changed files with 29 additions and 14 deletions

View File

@@ -318,6 +318,8 @@ 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);
static uint32_t GetMipSize(const TextureInfo& src, uint32_t mip);
// Get the byte size of a MIP when stored linearly.
static uint32_t GetMipLinearSize(const TextureInfo& src, uint32_t mip);