MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / ktxTexture2_calcRequiredLevelAlignment

Function ktxTexture2_calcRequiredLevelAlignment

lib/texture2.c:1735–1744  ·  view source on GitHub ↗

* @memberof ktxTexture2 @private * @~English * @brief Return the required alignment for levels of this texture. * * @param[in] This pointer to the ktxTexture2 object of interest. * * @return The required alignment for levels. */

Source from the content-addressed store, hash-verified

1733 * @return The required alignment for levels.
1734 */
1735 ktx_uint32_t
1736 ktxTexture2_calcRequiredLevelAlignment(ktxTexture2* This)
1737 {
1738 ktx_uint32_t alignment;
1739 if (This->supercompressionScheme != KTX_SS_NONE)
1740 alignment = 1;
1741 else
1742 alignment = lcm4(This->_protected->_formatSize.blockSizeInBits / 8);
1743 return alignment;
1744 }
1745
1746/**
1747 * @memberof ktxTexture2 @private

Callers 2

ktxTexture2_constructFunction · 0.85

Calls 1

lcm4Function · 0.70

Tested by

no test coverage detected