p150
            let _level_base = level_prime_base;
            if (tex.immutable) {
                _level_base = Math.min(_level_base, MIPS-1);
            }
            const level_base = _level_base;

            for (let _level_prime_max of range(level_prime_base-1, MIPS+2)) { // `q` in GLES
                if (_level_prime_max < 0) continue;
                if (_level_prime_max == MIPS+1) {
                    _level_prime_max = 10000; // This is the default, after all!
                }
            