mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-11-13 03:25:33 +00:00
Fixed compressed image block size.
This commit is contained in:
@@ -1637,11 +1637,12 @@ namespace bgfx
|
||||
uint8_t numMips = imageContainer.m_numMips;
|
||||
const uint32_t startLod = bx::uint32_min(_skip, numMips-1);
|
||||
numMips -= startLod;
|
||||
const uint32_t textureWidth = bx::uint32_max(1, imageContainer.m_width >>startLod);
|
||||
const uint32_t textureHeight = bx::uint32_max(1, imageContainer.m_height>>startLod);
|
||||
const ImageBlockInfo& blockInfo = getBlockInfo(TextureFormat::Enum(imageContainer.m_format) );
|
||||
const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod);
|
||||
const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod);
|
||||
|
||||
m_requestedFormat = (uint8_t)imageContainer.m_format;
|
||||
m_textureFormat = (uint8_t)imageContainer.m_format;
|
||||
m_requestedFormat = imageContainer.m_format;
|
||||
m_textureFormat = imageContainer.m_format;
|
||||
|
||||
const TextureFormatInfo& tfi = s_textureFormat[m_requestedFormat];
|
||||
const bool convert = D3DFMT_UNKNOWN == tfi.m_fmt;
|
||||
|
||||
Reference in New Issue
Block a user