mirror of
https://github.com/lubosz/overte.git
synced 2025-04-25 01:03:59 +02:00
Infinite loop guard
This commit is contained in:
parent
d6f7b23b2d
commit
104dbabee9
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue