git.s-ol.nu ~forks/DiligentTools / f7d7f74
Replaced Align with AlignUp assiduous a month ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
206206 }
207207
208208 auto ScanlineSize = TIFFScanlineSize(TiffFile);
209 m_Desc.RowStride = Align(static_cast<Uint32>(ScanlineSize), 4u);
209 m_Desc.RowStride = AlignUp(static_cast<Uint32>(ScanlineSize), 4u);
210210 m_pData->Resize(size_t{m_Desc.Height} * size_t{m_Desc.RowStride});
211211 auto* pDataPtr = reinterpret_cast<Uint8*>(m_pData->GetDataPtr());
212212 for (Uint32 row = 0; row < m_Desc.Height; row++, pDataPtr += m_Desc.RowStride)
270270 {
271271 SubresData[mip + layer * TexDesc.MipLevels] =
272272 TextureSubResData{pData, MipInfo.RowSize, MipInfo.DepthSliceSize};
273 pData += Align(MipInfo.MipSize, 4u);
273 pData += AlignUp(MipInfo.MipSize, 4u);
274274 }
275275 }
276276 VERIFY(pData - reinterpret_cast<const Uint8*>(pKTXData) == static_cast<ptrdiff_t>(DataSize), "Unexpected data size");