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

Function ktxTexture2_calcPostInflationLevelAlignment

lib/texture2.c:1755–1770  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1753 * @return The required alignment for levels.
1754 */
1755ktx_uint32_t
1756ktxTexture2_calcPostInflationLevelAlignment(ktxTexture2* This)
1757{
1758 ktx_uint32_t alignment;
1759
1760 // Should actually work for none supercompressed but don't want to
1761 // encourage use of it.
1762 assert(This->supercompressionScheme != KTX_SS_NONE && This->supercompressionScheme != KTX_SS_BASIS_LZ);
1763
1764 if (This->vkFormat != VK_FORMAT_UNDEFINED)
1765 alignment = lcm4(This->_protected->_formatSize.blockSizeInBits / 8);
1766 else
1767 alignment = 16;
1768
1769 return alignment;
1770}
1771
1772
1773/**

Calls 2

assertFunction · 0.85
lcm4Function · 0.70

Tested by

no test coverage detected