Infinite loop guard

This commit is contained in:
Brad Davis 2018-01-19 11:42:13 -08:00
parent d6f7b23b2d
commit 104dbabee9

View file

@ -49,6 +49,9 @@ static std::atomic<bool> compressGrayscaleTextures { false };
static std::atomic<bool> compressCubeTextures { false };
uint rectifyDimension(const uint& dimension) {
if (dimension == 0) {
return 0;
}
if (dimension < SPARSE_PAGE_SIZE.x) {
uint newSize = SPARSE_PAGE_SIZE.x;
while (dimension <= newSize / 2) {