From 1a8b9cbdd3910c9adfd8e43f9d470aef1c0cfd7d Mon Sep 17 00:00:00 2001 From: Canvas Date: Thu, 13 Jul 2023 13:46:53 +0800 Subject: [PATCH 01/26] fix cache mode spine animation playback issue. (#15691) * fixed cache mode spine animation playback issue. * remove unused code. * fix code formatting. * fix code formatting. * fix editor changing animation node position doesn't refresh rendering when enable batch. * add spine error id 7511 'Invalid input'. & fix deprecated to engineInternal. & change _uuid to uuid. * remove invalid code & fix error map code format. & replace any to interface. * fix setSkin invalidation on cached mode. * remove unneeded descriptions. * fix frame = 1 to length - 1. * fix code format. * revert update skeleton data on setSkin. --- EngineErrorMap.md | 4 + cocos/spine/skeleton-cache.ts | 234 +++++++++++++++++++++++++++++++--- cocos/spine/skeleton.ts | 169 ++++++++++++++++++++---- 3 files changed, 361 insertions(+), 46 deletions(-) diff --git a/EngineErrorMap.md b/EngineErrorMap.md index 3cdb1f9b086..8d5856b5a24 100644 --- a/EngineErrorMap.md +++ b/EngineErrorMap.md @@ -2911,6 +2911,10 @@ Spine: Animation not found: %s Spine: Animation not found: %s +### 7511 + +Spine: Invalid input! + ### 7600 The context of RenderTexture is invalid. diff --git a/cocos/spine/skeleton-cache.ts b/cocos/spine/skeleton-cache.ts index ba7b25b8bfa..0757b362275 100644 --- a/cocos/spine/skeleton-cache.ts +++ b/cocos/spine/skeleton-cache.ts @@ -45,6 +45,15 @@ class FrameBoneInfo { worldY = 0; } +export interface SkeletonCacheItemInfo { + skeleton: spine.Skeleton; + clipper: spine.SkeletonClipping; + state: spine.AnimationState; + listener: TrackEntryListeners; + curAnimationCache: AnimationCache | null; + animationsCache: { [key: string]: AnimationCache }; +} + class SpineModel { public vCount = 0; public iCount = 0; @@ -69,18 +78,36 @@ export class AnimationCache { protected _state: spine.AnimationState = null!; protected _skeletonData: spine.SkeletonData = null!; protected _skeleton: spine.Skeleton = null!; - protected _frames: AnimationFrame[] = []; + public _privateMode = false; protected _curIndex = -1; protected _isCompleted = false; protected _maxFrameIdex = 0; + protected _frameIdx = -1; + protected _inited = false; + protected _invalid = true; + protected _enableCacheAttachedInfo = false; + protected _skeletonInfo: SkeletonCacheItemInfo | null = null; + protected _animationName: string | null = null; + public isCompleted = false; + public totalTime = 0; + public frames: AnimationFrame[] = []; constructor (data: spine.SkeletonData) { + this._privateMode = false; + this._inited = false; + this._invalid = true; this._instance = new spine.SkeletonInstance(); this._skeletonData = data; this._skeleton = this._instance.initSkeleton(data); this._instance.setUseTint(_useTint); } + public init (skeletonInfo: SkeletonCacheItemInfo, animationName: string) { + this._inited = true; + this._animationName = animationName; + this._skeletonInfo = skeletonInfo; + } + get skeleton () { return this._skeleton; } @@ -97,7 +124,6 @@ export class AnimationCache { animation = element; } }); - //const animation = this._skeletonData.findAnimation(animationName); if (!animation) { warn(`find no animation named ${animationName} !!!`); return; @@ -108,27 +134,31 @@ export class AnimationCache { } public updateToFrame (frameIdx: number) { - if (this._isCompleted) return; - while (this._curIndex < frameIdx) { + if (!this._inited) return; + this.begin(); + if (!this.needToUpdate(frameIdx)) return; + do { + // Solid update frame rate 1/60. + this._frameIdx++; + this.totalTime += FrameTime; this._instance.updateAnimation(FrameTime); - this._curIndex++; const model = this._instance.updateRenderData(); - this.updateRenderData(this._curIndex, model); - if (this._curIndex >= this._maxFrameIdex) { - this._isCompleted = true; + this.updateRenderData(this._frameIdx, model); + if (this._frameIdx >= this._maxFrameIdex) { + this.isCompleted = true; } - } + } while (this.needToUpdate(frameIdx)); } public getFrame (frameIdx: number) { const index = frameIdx % this._maxFrameIdex; - return this._frames[index]; + return this.frames[index]; } public invalidAnimationFrames () { this._curIndex = -1; this._isCompleted = false; - this._frames.length = 0; + this.frames.length = 0; } private updateRenderData (index: number, model: any) { @@ -181,23 +211,171 @@ export class AnimationCache { boneInfo.worldY = bone.worldY; boneInfosArray.push(boneInfo); }); - - this._frames[index] = { + this.frames[index] = { model: modelData, boneInfos: boneInfosArray, }; } + public begin () { + if (!this._invalid) return; + + const skeletonInfo = this._skeletonInfo; + const preAnimationCache = skeletonInfo?.curAnimationCache; + + if (preAnimationCache && preAnimationCache !== this) { + if (this._privateMode) { + // Private cache mode just invalid pre animation frame. + preAnimationCache.invalidAllFrame(); + } else { + // If pre animation not finished, play it to the end. + preAnimationCache.updateToFrame(0); + } + } + const listener = skeletonInfo?.listener; + this._instance.setAnimation(0, this._animationName!, false); + this.bind(listener!); + + // record cur animation cache + skeletonInfo!.curAnimationCache = this; + this._frameIdx = -1; + this.isCompleted = false; + this.totalTime = 0; + this._invalid = false; + } + + public end () { + if (!this.needToUpdate()) { + // clear cur animation cache + this._skeletonInfo!.curAnimationCache = null; + this.frames.length = this._frameIdx + 1; + this.isCompleted = true; + this.unbind(this._skeletonInfo!.listener); + } + } + + public bind (listener: TrackEntryListeners) { + const completeHandle = (entry: spine.TrackEntry) => { + if (entry && entry.animation.name === this._animationName) { + this.isCompleted = true; + } + }; + + listener.complete = completeHandle; + } + + public unbind (listener: TrackEntryListeners) { + (listener as any).complete = null; + } + + protected needToUpdate (toFrameIdx?: number) { + return !this.isCompleted + && this.totalTime < MaxCacheTime + && (toFrameIdx === undefined || this._frameIdx < toFrameIdx); + } + + public isInited () { + return this._inited; + } + + public isInvalid () { + return this._invalid; + } + + public invalidAllFrame () { + this.isCompleted = false; + this._invalid = true; + } + + public enableCacheAttachedInfo () { + if (!this._enableCacheAttachedInfo) { + this._enableCacheAttachedInfo = true; + this.invalidAllFrame(); + } + } + + // Clear texture quote. + public clear () { + this._inited = false; + this.invalidAllFrame(); + } + public destory () { spine.wasmUtil.destroySpineInstance(this._instance); } } class SkeletonCache { + public static readonly FrameTime = FrameTime; public static sharedCache = new SkeletonCache(); + + protected _privateMode: boolean; + protected _skeletonCache: { [key: string]: SkeletonCacheItemInfo }; protected _animationPool: { [key: string]: AnimationCache }; constructor () { + this._privateMode = false; this._animationPool = {}; + this._skeletonCache = {}; + } + + public enablePrivateMode () { + this._privateMode = true; + } + + public clear () { + this._animationPool = {}; + this._skeletonCache = {}; + } + + public invalidAnimationCache (uuid: string) { + const skeletonInfo = this._skeletonCache[uuid]; + const skeleton = skeletonInfo && skeletonInfo.skeleton; + if (!skeleton) return; + + const animationsCache = skeletonInfo.animationsCache; + for (const aniKey in animationsCache) { + const animationCache = animationsCache[aniKey]; + animationCache.invalidAllFrame(); + } + } + + public removeSkeleton (uuid: string) { + const skeletonInfo = this._skeletonCache[uuid]; + if (!skeletonInfo) return; + const animationsCache = skeletonInfo.animationsCache; + for (const aniKey in animationsCache) { + // Clear cache texture, and put cache into pool. + // No need to create TypedArray next time. + const animationCache = animationsCache[aniKey]; + if (!animationCache) continue; + this._animationPool[`${uuid}#${aniKey}`] = animationCache; + animationCache.clear(); + } + + delete this._skeletonCache[uuid]; + } + + public getSkeletonCache (uuid: string, skeletonData: spine.SkeletonData) { + let skeletonInfo = this._skeletonCache[uuid]; + if (!skeletonInfo) { + const skeleton = new spine.Skeleton(skeletonData); + const clipper = new spine.SkeletonClipping(); + const stateData = new spine.AnimationStateData(skeleton.data); + const state = new spine.AnimationState(stateData); + const listener = new TrackEntryListeners(); + + this._skeletonCache[uuid] = skeletonInfo = { + skeleton, + clipper, + state, + listener, + // Cache all kinds of animation frame. + // When skeleton is dispose, clear all animation cache. + animationsCache: {} as any, + curAnimationCache: null, + }; + } + return skeletonInfo; } public getAnimationCache (uuid: string, animationName: string) { @@ -206,14 +384,30 @@ class SkeletonCache { return animCache; } - public initAnimationCache (data: SkeletonData, animationName: string) { - const uuid = data.uuid; - const poolKey = `${uuid}#${animationName}`; + public initAnimationCache (uuid: string, data: SkeletonData, animationName: string) { const spData = data.getRuntimeData(); - const animCache = new AnimationCache(spData!); - this._animationPool[poolKey] = animCache; - animCache.setAnimation(animationName); - return animCache; + if (!spData) return null; + const skeletonInfo = this._skeletonCache[uuid]; + const skeleton = skeletonInfo && skeletonInfo.skeleton; + if (!skeleton) return null; + const animationsCache = skeletonInfo.animationsCache; + let animationCache = animationsCache[animationName]; + if (!animationCache) { + // If cache exist in pool, then just use it. + const poolKey = `${uuid}#${animationName}`; + animationCache = this._animationPool[poolKey]; + if (animationCache) { + delete this._animationPool[poolKey]; + } else { + animationCache = new AnimationCache(spData); + animationCache._privateMode = this._privateMode; + } + animationCache.init(skeletonInfo, animationName); + animationsCache[animationName] = animationCache; + } + animationCache.init(skeletonInfo, animationName); + animationCache.setAnimation(animationName); + return animationCache; } public destroyCachedAnimations (uuid?: string) { diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index f9bfff6cfc8..6039aab94b2 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -27,7 +27,7 @@ import { Material, Texture2D } from '../asset/assets'; import { error, warn } from '../core/platform/debug'; import { Enum, ccenum } from '../core/value-types/enum'; import { Component, Node } from '../scene-graph'; -import { CCBoolean, CCClass, CCFloat, CCObject, Color, Mat4, RecyclePool, js } from '../core'; +import { CCBoolean, CCClass, CCFloat, CCObject, Color, Mat4, RecyclePool, logID, js } from '../core'; import { SkeletonData } from './skeleton-data'; import { Graphics, UIRenderer, UITransform } from '../2d'; import { Batcher2D } from '../2d/renderer/batcher-2d'; @@ -83,6 +83,12 @@ export enum AnimationCacheMode { } ccenum(AnimationCacheMode); +interface AnimationItem { + animationName: string; + loop: boolean; + delay: number; +} + /** * @internal Since v3.7.2, this is an engine private enum, only used in editor. */ @@ -244,6 +250,17 @@ export class Skeleton extends UIRenderer { protected _socketNodes: Map = new Map(); protected _cachedSockets: Map = new Map(); + /** + * @internal + */ + public _startEntry: spine.TrackEntry; + /** + * @internal + */ + public _endEntry: spine.TrackEntry; + // Paused or playing state + protected _paused = false; + // Below properties will effect when cache mode is SHARED_CACHE or PRIVATE_CACHE. // accumulate time protected _accTime = 0; @@ -252,6 +269,13 @@ export class Skeleton extends UIRenderer { // Skeleton cache protected _skeletonCache: SkeletonCache | null = null; protected _animCache: AnimationCache | null = null; + protected _animationQueue: AnimationItem[] = []; + // Head animation info of + protected _headAniInfo: AnimationItem | null = null; + // Is animation complete. + protected _isAniComplete = true; + // Play times + protected _playTimes = 0; /** * @engineInternal */ @@ -270,6 +294,9 @@ export class Skeleton extends UIRenderer { constructor () { super(); this._useVertexOpacity = true; + this._startEntry = { animation: { name: '' }, trackIndex: 0 } as spine.TrackEntry; + this._endEntry = { animation: { name: '' }, trackIndex: 0 } as spine.TrackEntry; + if (!JSB) { this._instance = new spine.SkeletonInstance(); } @@ -659,17 +686,13 @@ export class Skeleton extends UIRenderer { return; } this._textures = skeletonData.textures; - this._runtimeData = skeletonData.getRuntimeData(); if (!this._runtimeData) return; this.setSkeletonData(this._runtimeData); - this._refreshInspector(); if (this.defaultAnimation) this.animation = this.defaultAnimation; if (this.defaultSkin) this.setSkin(this.defaultSkin); - this._updateUseTint(); - this._indexBoneSockets(); this._updateSocketBindings(); this.attachUtil.init(this); @@ -693,6 +716,7 @@ export class Skeleton extends UIRenderer { this._skeletonCache = SkeletonCache.sharedCache; } else if (this._cacheMode === AnimationCacheMode.PRIVATE_CACHE) { this._skeletonCache = new SkeletonCache(); + this._skeletonCache.enablePrivateMode(); } } @@ -700,6 +724,8 @@ export class Skeleton extends UIRenderer { if (this.debugBones || this.debugSlots) { warn('Debug bones or slots is invalid in cached mode'); } + const skeletonInfo = this._skeletonCache!.getSkeletonCache((this.skeletonData as any).uuid, skeletonData); + this._skeleton = skeletonInfo.skeleton; } else { this._skeleton = this._instance.initSkeleton(skeletonData); this._state = this._instance.getAnimationState(); @@ -717,25 +743,39 @@ export class Skeleton extends UIRenderer { * @param loop @en Use loop mode or not. @zh 是否使用循环播放模式。 */ public setAnimation (trackIndex: number, name: string, loop?: boolean): spine.TrackEntry | null { + if (!(typeof name === 'string')) { + logID(7511); + return null; + } + const animation = this._skeleton.data.findAnimation(name); + if (!animation) { + logID(7509, name); + return null; + } let trackEntry: spine.TrackEntry | null = null; if (loop === undefined) loop = true; + this._playTimes = loop ? 0 : 1; if (this.isAnimationCached()) { if (trackIndex !== 0) { warn('Track index can not greater than 0 in cached mode.'); } - this._animationName = name; - if (!this._skeletonCache) return trackEntry; - let cache = this._skeletonCache.getAnimationCache(this._skeletonData!._uuid, this._animationName); + if (!this._skeletonCache) return null; + let cache = this._skeletonCache.getAnimationCache(this._skeletonData!.uuid, name); if (!cache) { - cache = this._skeletonCache.initAnimationCache(this._skeletonData!, this._animationName); + cache = this._skeletonCache.initAnimationCache(this.skeletonData!.uuid, this._skeletonData!, name); } - this._skeleton = cache.skeleton; - if (this._cacheMode === AnimationCacheMode.PRIVATE_CACHE) { - cache.invalidAnimationFrames(); + if (cache) { + this._animationName = name; + this._isAniComplete = false; + this._accTime = 0; + this._playCount = 0; + this._animCache = cache; + if (this._socketNodes.size > 0) { + this._animCache.enableCacheAttachedInfo(); + } + this._animCache.updateToFrame(0); + this._curFrame = this._animCache.frames[0]; } - this._animCache = cache; - this._accTime = 0; - this._playCount = 0; } else { this._animationName = name; trackEntry = this._instance.setAnimation(trackIndex, name, loop); @@ -758,12 +798,15 @@ export class Skeleton extends UIRenderer { public addAnimation (trackIndex: number, name: string, loop: boolean, delay?: number) { delay = delay || 0; if (this.isAnimationCached()) { - warn(`Cached mode not support addAnimation.`); + if (trackIndex !== 0) { + warn('Track index can not greater than 0 in cached mode.'); + } + this._animationQueue.push({ animationName: name, loop, delay }); return null; } else if (this._skeleton) { const animation = this._skeleton.data.findAnimation(name); if (!animation) { - error(`Not find animation named ${name}`); + logID(7510, name); return null; } return this._state?.addAnimationWith(trackIndex, animation, loop, delay); @@ -813,14 +856,13 @@ export class Skeleton extends UIRenderer { * @param skinName @en The name of skin. @zh 皮肤名称。 */ public setSkin (name: string) { - this._skinName = name; if (this.isAnimationCached()) { if (this._animCache) { this._animCache.setSkin(name); + this.invalidAnimationCache(); } - } else { - this._instance.setSkin(name); } + this._instance.setSkin(name); } /** @@ -829,20 +871,81 @@ export class Skeleton extends UIRenderer { * @param dt @en delta time. @zh 时间差。 */ public updateAnimation (dt: number) { + this.markForUpdateRenderData(); if (EDITOR_NOT_IN_PREVIEW) return; if (this.paused) return; dt *= this._timeScale * timeScale; if (this.isAnimationCached()) { - this._accTime += dt; - const frameIdx = Math.floor(this._accTime / CachedFrameTime); - if (this._animCache) { - this._animCache.updateToFrame(frameIdx); - this._curFrame = this._animCache.getFrame(frameIdx); + if (this._isAniComplete) { + if (this._animationQueue.length === 0 && !this._headAniInfo) { + const frameCache = this._animCache; + if (frameCache && frameCache.isInvalid()) { + frameCache.updateToFrame(0); + const frames = frameCache.frames; + this._curFrame = frames[frames.length - 1]; + } + return; + } + if (!this._headAniInfo) { + this._headAniInfo = this._animationQueue.shift()!; + } + this._accTime += dt; + if (this._accTime > this._headAniInfo?.delay) { + const aniInfo = this._headAniInfo; + this._headAniInfo = null; + this.setAnimation(0, aniInfo?.animationName, aniInfo?.loop); + } + return; } + this._updateCache(dt); } else { this._instance.updateAnimation(dt); } - this.markForUpdateRenderData(); + } + + protected _updateCache (dt: number) { + const frameCache = this._animCache!; + if (!frameCache.isInited()) { + return; + } + const frames = frameCache.frames; + const frameTime = SkeletonCache.FrameTime; + + // Animation Start, the event different from dragonbones inner event, + // It has no event object. + if (this._accTime === 0 && this._playCount === 0) { + this._startEntry.animation.name = this._animationName; + if (this._listener && this._listener.start) this._listener.start(this._startEntry); + } + + this._accTime += dt; + let frameIdx = Math.floor(this._accTime / frameTime); + if (!frameCache.isCompleted) { + frameCache.updateToFrame(frameIdx); + } + + if (frameCache.isCompleted && frameIdx >= frames.length) { + this._playCount++; + if (this._playTimes > 0 && this._playCount >= this._playTimes) { + // set frame to end frame. + this._curFrame = frames[frames.length - 1]; + this._accTime = 0; + this._playCount = 0; + this._isAniComplete = true; + this._emitCacheCompleteEvent(); + } + this._accTime = 0; + frameIdx = 0; + this._emitCacheCompleteEvent(); + } + this._curFrame = frames[frameIdx]; + } + + protected _emitCacheCompleteEvent () { + if (!this._listener) return; + this._endEntry.animation.name = this._animationName; + if (this._listener.complete) this._listener.complete(this._endEntry); + if (this._listener.end) this._listener.end(this._endEntry); } /** @@ -1119,6 +1222,20 @@ export class Skeleton extends UIRenderer { } } + /** + * @en + * Invalidates the animation cache, which is then recomputed on each frame. + * @zh + * 使动画缓存失效,之后会在每帧重新计算。 + * @method invalidAnimationCache + */ + public invalidAnimationCache () { + if (!this.isAnimationCached()) return; + if (this._skeletonCache) { + this._skeletonCache.invalidAnimationCache(this._skeletonData!.uuid); + } + } + /** * @en * Finds a bone by name. From 52716440f5ce669b834fb41429e4db3763efc1ee Mon Sep 17 00:00:00 2001 From: Cocos Robot <48829427+cocos-robot@users.noreply.github.com> Date: Thu, 13 Jul 2023 14:19:26 +0800 Subject: [PATCH 02/26] [ci skip][AUTO]: Automated code generating update: a38b541b8130e82f3a6268e093eaaad769bda6cd (#15691) (#15706) Co-authored-by: cocos-robot --- native/cocos/core/builtin/DebugInfos.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/native/cocos/core/builtin/DebugInfos.cpp b/native/cocos/core/builtin/DebugInfos.cpp index 6e4aff0cfd7..bb0597c5234 100644 --- a/native/cocos/core/builtin/DebugInfos.cpp +++ b/native/cocos/core/builtin/DebugInfos.cpp @@ -360,6 +360,7 @@ ccstd::unordered_map debugInfos = { { 7508, "The atlas asset of '%s' is not exists!" }, { 7509, "Spine: Animation not found: %s" }, { 7510, "Spine: Animation not found: %s" }, +{ 7511, "Spine: Invalid input!" }, { 7600, "The context of RenderTexture is invalid." }, { 7601, "cc.RenderTexture._initWithWidthAndHeightForWebGL() : only RGB and RGBA formats are valid for a render texture;" }, { 7602, "Could not attach texture to the framebuffer" }, From 39c57f0dbb001355e0360fc859a378b67019c826 Mon Sep 17 00:00:00 2001 From: qiuguohua Date: Thu, 13 Jul 2023 17:22:32 +0800 Subject: [PATCH 03/26] v3.8 Support openharmony4.0 (#15708) * Fix openharmony platform issues: 1. Fix xmlhttprequest request problems. 2. Repair the problem of not being able to display full screen. * fix: crash on OH 4.0 (#15656) * Openharmony adapted to the new Deveco(3.1 beta2) version * Runtime environment using harmonyos * Modifying configuration content * Modify the usage syntax Restore default values --------- Co-authored-by: PP --- cocos/rendering/index.jsb.ts | 9 +- native/cocos/network/HttpClient.cpp | 6 +- .../openharmony/OpenHarmonyPlatform.cpp | 10 + platforms/native/builtin/index.js | 6 + .../source/platforms/openharmony.ts | 10 +- .../openharmony/entry/build-profile.json5 | 3 +- templates/openharmony/entry/oh-package.json5 | 10 + templates/openharmony/entry/package-lock.json | 5 - templates/openharmony/entry/package.json | 14 - .../src/main/ets/MainAbility/MainAbility.ts | 12 +- .../openharmony/hvigor/hvigor-wrapper.js | 2 + templates/openharmony/hvigorw | 48 + templates/openharmony/hvigorw.bat | 64 + templates/openharmony/oh-package-lock.json5 | 14 + templates/openharmony/oh-package.json5 | 12 + templates/openharmony/package-lock.json | 1212 ----------------- templates/openharmony/package.json | 21 - 17 files changed, 188 insertions(+), 1270 deletions(-) create mode 100644 templates/openharmony/entry/oh-package.json5 delete mode 100644 templates/openharmony/entry/package-lock.json delete mode 100644 templates/openharmony/entry/package.json create mode 100644 templates/openharmony/hvigor/hvigor-wrapper.js create mode 100644 templates/openharmony/hvigorw create mode 100644 templates/openharmony/hvigorw.bat create mode 100644 templates/openharmony/oh-package-lock.json5 create mode 100644 templates/openharmony/oh-package.json5 delete mode 100644 templates/openharmony/package-lock.json delete mode 100644 templates/openharmony/package.json diff --git a/cocos/rendering/index.jsb.ts b/cocos/rendering/index.jsb.ts index 8cf12a96d90..dab209b647a 100644 --- a/cocos/rendering/index.jsb.ts +++ b/cocos/rendering/index.jsb.ts @@ -25,6 +25,7 @@ declare const nr: any; declare const jsb: any; +import { OPEN_HARMONY } from 'internal:constants' import { ccenum, CCString, js } from '../core'; import * as pipeline from './define'; import { ccclass, serializable, editable, type } from '../core/data/class-decorator'; @@ -447,9 +448,11 @@ function proxyArrayAttributeImpl(proto: any, attr: string) { let proxyArrayAttribute = proxyArrayAttributeImpl; -proxyArrayAttribute(RenderFlow.prototype, '_stages'); - -proxyArrayAttribute(RenderPipeline.prototype, '_flows'); +if (!OPEN_HARMONY) { + // WORKAROUND: the proxy array getLength crashed on OH platform + proxyArrayAttribute(RenderFlow.prototype, '_stages'); + proxyArrayAttribute(RenderPipeline.prototype, '_flows'); +} //-------------------- register types -------------------- diff --git a/native/cocos/network/HttpClient.cpp b/native/cocos/network/HttpClient.cpp index 301a9712739..5476f9c79ac 100644 --- a/native/cocos/network/HttpClient.cpp +++ b/native/cocos/network/HttpClient.cpp @@ -167,11 +167,13 @@ static bool configureCURL(HttpClient *client, HttpRequest *request, CURL *handle if (code != CURLE_OK) { return false; } - code = curl_easy_setopt(handle, CURLOPT_TIMEOUT, request->getTimeout()); + // In the openharmony platform, the long type must be used, otherwise there will be an exception. + long timeout = static_cast(request->getTimeout()); + code = curl_easy_setopt(handle, CURLOPT_TIMEOUT, timeout); if (code != CURLE_OK) { return false; } - code = curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, request->getTimeout()); + code = curl_easy_setopt(handle, CURLOPT_CONNECTTIMEOUT, timeout); if (code != CURLE_OK) { return false; } diff --git a/native/cocos/platform/openharmony/OpenHarmonyPlatform.cpp b/native/cocos/platform/openharmony/OpenHarmonyPlatform.cpp index 18b83b8406a..44eb92c9cae 100644 --- a/native/cocos/platform/openharmony/OpenHarmonyPlatform.cpp +++ b/native/cocos/platform/openharmony/OpenHarmonyPlatform.cpp @@ -275,6 +275,16 @@ void OpenHarmonyPlatform::onSurfaceCreated(OH_NativeXComponent* component, void* } void OpenHarmonyPlatform::onSurfaceChanged(OH_NativeXComponent* component, void* window) { + uint64_t width = 0; + uint64_t height = 0; + int32_t ret = OH_NativeXComponent_GetXComponentSize(_component, window, &width, &height); + CC_ASSERT(ret == OH_NATIVEXCOMPONENT_RESULT_SUCCESS); + WindowEvent ev; + ev.windowId = cc::ISystemWindow::mainWindowId; + ev.type = WindowEvent::Type::SIZE_CHANGED; + ev.width = width; + ev.height = height; + events::WindowEvent::broadcast(ev); } void OpenHarmonyPlatform::onSurfaceDestroyed(OH_NativeXComponent* component, void* window) { diff --git a/platforms/native/builtin/index.js b/platforms/native/builtin/index.js index 6083a1c3216..b96429fbbd1 100644 --- a/platforms/native/builtin/index.js +++ b/platforms/native/builtin/index.js @@ -211,6 +211,12 @@ for (const key in jsbWindow) { } } +// In the openharmony platform, XMLHttpRequest is not undefined, but there are problems to using it. +// So the native implementation is forced to be used. +if (window.oh && typeof globalThis.XMLHttpRequest !== 'undefined') { + globalThis.XMLHttpRequest = jsbWindow.XMLHttpRequest; +} + if (typeof globalThis.window === 'undefined') { globalThis.window = globalThis; } diff --git a/scripts/native-pack-tool/source/platforms/openharmony.ts b/scripts/native-pack-tool/source/platforms/openharmony.ts index abfe594c7dc..b7a18fa9d15 100644 --- a/scripts/native-pack-tool/source/platforms/openharmony.ts +++ b/scripts/native-pack-tool/source/platforms/openharmony.ts @@ -6,6 +6,7 @@ import { cchelper, Paths } from "../utils"; import { randomBytes } from "crypto"; import { outputJSONSync } from 'fs-extra'; import * as JSON5 from "json5" +import { writeFileSync } from "fs"; export interface IOrientation { landscapeLeft: boolean; @@ -96,13 +97,10 @@ export class OpenHarmonyPackTool extends NativePackTool { stringJSON.string.find((item: any) => item.name === 'MainAbility_label').value = this.params.projectName; outputJSONSync(stringJSONPath, stringJSON, { spaces: 2 }); - const packageJsonPath = ps.join(ohosProjDir, 'package.json'); - const packageJson = fs.readJSONSync(packageJsonPath); + const packageJsonPath = ps.join(ohosProjDir, 'oh-package.json5'); + const packageJson = this.readJSON5Sync(packageJsonPath); packageJson.name = this.params.projectName; - fs.writeJSONSync(packageJsonPath, packageJson, { - spaces: 4, - }); - + writeFileSync(packageJsonPath, JSON5.stringify(packageJson, null, 4)); return true; } diff --git a/templates/openharmony/entry/build-profile.json5 b/templates/openharmony/entry/build-profile.json5 index 10a6302762e..b9f11c6c0fe 100644 --- a/templates/openharmony/entry/build-profile.json5 +++ b/templates/openharmony/entry/build-profile.json5 @@ -14,7 +14,8 @@ }, "targets": [ { - "name": "default" + "name": "default", + "runtimeOS": "HarmonyOS" }, ] } diff --git a/templates/openharmony/entry/oh-package.json5 b/templates/openharmony/entry/oh-package.json5 new file mode 100644 index 00000000000..74fb9edf167 --- /dev/null +++ b/templates/openharmony/entry/oh-package.json5 @@ -0,0 +1,10 @@ +{ + "license": "", + "devDependencies": {}, + "author": "", + "name": "entry", + "description": "example description", + "main": "", + "version": "1.0.0", + "dependencies": {} +} \ No newline at end of file diff --git a/templates/openharmony/entry/package-lock.json b/templates/openharmony/entry/package-lock.json deleted file mode 100644 index 15bc7145be1..00000000000 --- a/templates/openharmony/entry/package-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "entry", - "version": "1.0.0", - "lockfileVersion": 1 -} diff --git a/templates/openharmony/entry/package.json b/templates/openharmony/entry/package.json deleted file mode 100644 index dba669833f8..00000000000 --- a/templates/openharmony/entry/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "license":"ISC", - "devDependencies":{}, - "name":"entry", - "ohos":{ - "org":"huawei", - "directoryLevel":"module", - "buildTool":"hvigor" - }, - "description":"example description", - "repository":{}, - "version":"1.0.0", - "dependencies":{} -} diff --git a/templates/openharmony/entry/src/main/ets/MainAbility/MainAbility.ts b/templates/openharmony/entry/src/main/ets/MainAbility/MainAbility.ts index 21b553236e0..5f9c7db98b5 100644 --- a/templates/openharmony/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/templates/openharmony/entry/src/main/ets/MainAbility/MainAbility.ts @@ -27,7 +27,7 @@ import nativerender from "libcocos.so"; import { ContextType } from "../common/Constants" import window from '@ohos.window'; import resourceManager from '@ohos.resourceManager'; -import avsession from '@ohos.multimedia.avsession'; +//import avsession from '@ohos.multimedia.avsession'; const nativeContext = nativerender.getContext(ContextType.ENGINE_UTILS); const nativeAppLifecycle = nativerender.getContext(ContextType.APP_LIFECYCLE); @@ -41,11 +41,11 @@ export default class MainAbility extends UIAbility { // TODO(qgh): This is a temporary fix for audio not continuing to play when switching from background to foreground. // The principle of the fix is to allow the app to continue playing audio after switching background, similar to music apps. // After a while it will be killed by the system. - // @ts-ignore - avsession.createAVSession(this.context, tag, 'audio').then(async (session) =>{ - globalThis.avsessionManager = session; - await globalThis.avsessionManager.activate(); - }) + // This will cause a crash on harmonyos. + // avsession.createAVSession(this.context, tag, 'audio').then(async (session) =>{ + // globalThis.avsessionManager = session; + // await globalThis.avsessionManager.activate(); + // }) } onDestroy() { diff --git a/templates/openharmony/hvigor/hvigor-wrapper.js b/templates/openharmony/hvigor/hvigor-wrapper.js new file mode 100644 index 00000000000..994f22987bd --- /dev/null +++ b/templates/openharmony/hvigor/hvigor-wrapper.js @@ -0,0 +1,2 @@ +"use strict";var e=require("fs"),t=require("path"),n=require("os"),r=require("crypto"),u=require("child_process"),o=require("constants"),i=require("stream"),s=require("util"),c=require("assert"),a=require("tty"),l=require("zlib"),f=require("net");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var D=d(e),p=d(t),E=d(n),m=d(r),h=d(u),y=d(o),C=d(i),F=d(s),g=d(c),A=d(a),v=d(l),S=d(f),w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},O={},b={},_={},B=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0}),_.isMac=_.isLinux=_.isWindows=void 0;const P=B(E.default),k="Windows_NT",x="Linux",N="Darwin";_.isWindows=function(){return P.default.type()===k},_.isLinux=function(){return P.default.type()===x},_.isMac=function(){return P.default.type()===N};var I={},T=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),R=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),M=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&T(t,e,n);return R(t,e),t};Object.defineProperty(I,"__esModule",{value:!0}),I.hash=void 0;const L=M(m.default);I.hash=function(e,t="md5"){return L.createHash(t).update(e,"utf-8").digest("hex")},function(e){var t=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var u in e)"default"!==u&&Object.prototype.hasOwnProperty.call(e,u)&&t(r,e,u);return n(r,e),r};Object.defineProperty(e,"__esModule",{value:!0}),e.HVIGOR_BOOT_JS_FILE_PATH=e.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=e.HVIGOR_PROJECT_DEPENDENCIES_HOME=e.HVIGOR_PROJECT_WRAPPER_HOME=e.HVIGOR_PROJECT_NAME=e.HVIGOR_PROJECT_ROOT_DIR=e.HVIGOR_PROJECT_CACHES_HOME=e.HVIGOR_PNPM_STORE_PATH=e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=e.HVIGOR_WRAPPER_TOOLS_HOME=e.HVIGOR_USER_HOME=e.DEFAULT_PACKAGE_JSON=e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME=e.PNPM=e.HVIGOR=e.NPM_TOOL=e.PNPM_TOOL=e.HVIGOR_ENGINE_PACKAGE_NAME=void 0;const u=r(p.default),o=r(E.default),i=_,s=I;e.HVIGOR_ENGINE_PACKAGE_NAME="@ohos/hvigor",e.PNPM_TOOL=(0,i.isWindows)()?"pnpm.cmd":"pnpm",e.NPM_TOOL=(0,i.isWindows)()?"npm.cmd":"npm",e.HVIGOR="hvigor",e.PNPM="pnpm",e.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME="hvigor-config.json5",e.DEFAULT_PACKAGE_JSON="package.json",e.HVIGOR_USER_HOME=u.resolve(o.homedir(),".hvigor"),e.HVIGOR_WRAPPER_TOOLS_HOME=u.resolve(e.HVIGOR_USER_HOME,"wrapper","tools"),e.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH=u.resolve(e.HVIGOR_WRAPPER_TOOLS_HOME,"node_modules",".bin",e.PNPM_TOOL),e.HVIGOR_PNPM_STORE_PATH=u.resolve(e.HVIGOR_USER_HOME,"caches"),e.HVIGOR_PROJECT_CACHES_HOME=u.resolve(e.HVIGOR_USER_HOME,"project_caches"),e.HVIGOR_PROJECT_ROOT_DIR=process.cwd(),e.HVIGOR_PROJECT_NAME=u.basename((0,s.hash)(e.HVIGOR_PROJECT_ROOT_DIR)),e.HVIGOR_PROJECT_WRAPPER_HOME=u.resolve(e.HVIGOR_PROJECT_ROOT_DIR,e.HVIGOR),e.HVIGOR_PROJECT_DEPENDENCIES_HOME=u.resolve(e.HVIGOR_PROJECT_CACHES_HOME,e.HVIGOR_PROJECT_NAME,"workspace"),e.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH=u.resolve(e.HVIGOR_PROJECT_DEPENDENCIES_HOME,e.DEFAULT_PACKAGE_JSON),e.HVIGOR_BOOT_JS_FILE_PATH=u.resolve(e.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js")}(b);var j={},$={};Object.defineProperty($,"__esModule",{value:!0}),$.logInfoPrintConsole=$.logErrorAndExit=void 0,$.logErrorAndExit=function(e){e instanceof Error?console.error(e.message):console.error(e),process.exit(-1)},$.logInfoPrintConsole=function(e){console.log(e)};var H=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),J=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),G=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&H(t,e,n);return J(t,e),t},V=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(j,"__esModule",{value:!0}),j.isFileExists=j.offlinePluginConversion=j.executeCommand=j.getNpmPath=j.hasNpmPackInPaths=void 0;const U=h.default,W=G(p.default),z=b,K=$,q=V(D.default);j.hasNpmPackInPaths=function(e,t){try{return require.resolve(e,{paths:[...t]}),!0}catch(e){return!1}},j.getNpmPath=function(){const e=process.execPath;return W.join(W.dirname(e),z.NPM_TOOL)},j.executeCommand=function(e,t,n){0!==(0,U.spawnSync)(e,t,n).status&&(0,K.logErrorAndExit)(`Error: ${e} ${t} execute failed.See above for details.`)},j.offlinePluginConversion=function(e,t){return t.startsWith("file:")||t.endsWith(".tgz")?W.resolve(e,z.HVIGOR,t.replace("file:","")):t},j.isFileExists=function(e){return q.default.existsSync(e)&&q.default.statSync(e).isFile()},function(e){var t=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var u in e)"default"!==u&&Object.prototype.hasOwnProperty.call(e,u)&&t(r,e,u);return n(r,e),r},u=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.executeInstallPnpm=e.isPnpmAvailable=e.environmentHandler=e.checkNpmConifg=e.PNPM_VERSION=void 0;const o=r(D.default),i=b,s=j,c=r(p.default),a=$,l=h.default,f=u(E.default);e.PNPM_VERSION="7.30.0",e.checkNpmConifg=function(){const e=c.resolve(i.HVIGOR_PROJECT_ROOT_DIR,".npmrc"),t=c.resolve(f.default.homedir(),".npmrc");if((0,s.isFileExists)(e)||(0,s.isFileExists)(t))return;const n=(0,s.getNpmPath)(),r=(0,l.spawnSync)(n,["config","get","prefix"],{cwd:i.HVIGOR_PROJECT_ROOT_DIR});if(0!==r.status||!r.stdout)return void(0,a.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.");const u=c.resolve(`${r.stdout}`.replace(/[\r\n]/gi,""),".npmrc");(0,s.isFileExists)(u)||(0,a.logErrorAndExit)("Error: The hvigor depends on the npmrc file. Configure the npmrc file first.")},e.environmentHandler=function(){process.env["npm_config_update-notifier"]="false"},e.isPnpmAvailable=function(){return!!o.existsSync(i.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH)&&(0,s.hasNpmPackInPaths)("pnpm",[i.HVIGOR_WRAPPER_TOOLS_HOME])},e.executeInstallPnpm=function(){(0,a.logInfoPrintConsole)(`Installing pnpm@${e.PNPM_VERSION}...`);const t=(0,s.getNpmPath)();!function(){const t=c.resolve(i.HVIGOR_WRAPPER_TOOLS_HOME,i.DEFAULT_PACKAGE_JSON);try{o.existsSync(i.HVIGOR_WRAPPER_TOOLS_HOME)||o.mkdirSync(i.HVIGOR_WRAPPER_TOOLS_HOME,{recursive:!0});const n={dependencies:{}};n.dependencies[i.PNPM]=e.PNPM_VERSION,o.writeFileSync(t,JSON.stringify(n))}catch(e){(0,a.logErrorAndExit)(`Error: EPERM: operation not permitted,create ${t} failed.`)}}(),(0,s.executeCommand)(t,["install","pnpm"],{cwd:i.HVIGOR_WRAPPER_TOOLS_HOME,stdio:["inherit","inherit","inherit"],env:process.env}),(0,a.logInfoPrintConsole)("Pnpm install success.")}}(O);var Y={},X={},Z={},Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.Unicode=void 0;class ee{}Q.Unicode=ee,ee.Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,ee.ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ee.ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Object.defineProperty(Z,"__esModule",{value:!0}),Z.JudgeUtil=void 0;const te=Q;Z.JudgeUtil=class{static isIgnoreChar(e){return"string"==typeof e&&("\t"===e||"\v"===e||"\f"===e||" "===e||" "===e||"\ufeff"===e||"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e)}static isSpaceSeparator(e){return"string"==typeof e&&te.Unicode.Space_Separator.test(e)}static isIdStartChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||"$"===e||"_"===e||te.Unicode.ID_Start.test(e))}static isIdContinueChar(e){return"string"==typeof e&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"$"===e||"_"===e||"‌"===e||"‍"===e||te.Unicode.ID_Continue.test(e))}static isDigitWithoutZero(e){return/[1-9]/.test(e)}static isDigit(e){return"string"==typeof e&&/[0-9]/.test(e)}static isHexDigit(e){return"string"==typeof e&&/[0-9A-Fa-f]/.test(e)}};var ne={},re={fromCallback:function(e){return Object.defineProperty((function(...t){if("function"!=typeof t[t.length-1])return new Promise(((n,r)=>{e.call(this,...t,((e,t)=>null!=e?r(e):n(t)))}));e.apply(this,t)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(...t){const n=t[t.length-1];if("function"!=typeof n)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then((e=>n(null,e)),n)}),"name",{value:e.name})}},ue=y.default,oe=process.cwd,ie=null,se=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return ie||(ie=oe.call(process)),ie};try{process.cwd()}catch(e){}if("function"==typeof process.chdir){var ce=process.chdir;process.chdir=function(e){ie=null,ce.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ce)}var ae=function(e){ue.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,ue.O_WRONLY|ue.O_SYMLINK,n,(function(t,u){t?r&&r(t):e.fchmod(u,n,(function(t){e.close(u,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,u=e.openSync(t,ue.O_WRONLY|ue.O_SYMLINK,n),o=!0;try{r=e.fchmodSync(u,n),o=!1}finally{if(o)try{e.closeSync(u)}catch(e){}else e.closeSync(u)}return r}}(e);e.lutimes||function(e){ue.hasOwnProperty("O_SYMLINK")&&e.futimes?(e.lutimes=function(t,n,r,u){e.open(t,ue.O_SYMLINK,(function(t,o){t?u&&u(t):e.futimes(o,n,r,(function(t){e.close(o,(function(e){u&&u(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var u,o=e.openSync(t,ue.O_SYMLINK),i=!0;try{u=e.futimesSync(o,n,r),i=!1}finally{if(i)try{e.closeSync(o)}catch(e){}else e.closeSync(o)}return u}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e);e.chown=r(e.chown),e.fchown=r(e.fchown),e.lchown=r(e.lchown),e.chmod=t(e.chmod),e.fchmod=t(e.fchmod),e.lchmod=t(e.lchmod),e.chownSync=u(e.chownSync),e.fchownSync=u(e.fchownSync),e.lchownSync=u(e.lchownSync),e.chmodSync=n(e.chmodSync),e.fchmodSync=n(e.fchmodSync),e.lchmodSync=n(e.lchmodSync),e.stat=o(e.stat),e.fstat=o(e.fstat),e.lstat=o(e.lstat),e.statSync=i(e.statSync),e.fstatSync=i(e.fstatSync),e.lstatSync=i(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){});e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){});"win32"===se&&(e.rename="function"!=typeof e.rename?e.rename:function(t){function n(n,r,u){var o=Date.now(),i=0;t(n,r,(function s(c){if(c&&("EACCES"===c.code||"EPERM"===c.code||"EBUSY"===c.code)&&Date.now()-o<6e4)return setTimeout((function(){e.stat(r,(function(e,o){e&&"ENOENT"===e.code?t(n,r,s):u(c)}))}),i),void(i<100&&(i+=10));u&&u(c)}))}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.rename));function t(t){return t?function(n,r,u){return t.call(e,n,r,(function(e){s(e)&&(e=null),u&&u.apply(this,arguments)}))}:t}function n(t){return t?function(n,r){try{return t.call(e,n,r)}catch(e){if(!s(e))throw e}}:t}function r(t){return t?function(n,r,u,o){return t.call(e,n,r,u,(function(e){s(e)&&(e=null),o&&o.apply(this,arguments)}))}:t}function u(t){return t?function(n,r,u){try{return t.call(e,n,r,u)}catch(e){if(!s(e))throw e}}:t}function o(t){return t?function(n,r,u){function o(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),u&&u.apply(this,arguments)}return"function"==typeof r&&(u=r,r=null),r?t.call(e,n,r,o):t.call(e,n,o)}:t}function i(t){return t?function(n,r){var u=r?t.call(e,n,r):t.call(e,n);return u&&(u.uid<0&&(u.uid+=4294967296),u.gid<0&&(u.gid+=4294967296)),u}:t}function s(e){return!e||("ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code))}e.read="function"!=typeof e.read?e.read:function(t){function n(n,r,u,o,i,s){var c;if(s&&"function"==typeof s){var a=0;c=function(l,f,d){if(l&&"EAGAIN"===l.code&&a<10)return a++,t.call(e,n,r,u,o,i,c);s.apply(this,arguments)}}return t.call(e,n,r,u,o,i,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n}(e.read),e.readSync="function"!=typeof e.readSync?e.readSync:(c=e.readSync,function(t,n,r,u,o){for(var i=0;;)try{return c.call(e,t,n,r,u,o)}catch(e){if("EAGAIN"===e.code&&i<10){i++;continue}throw e}});var c};var le=C.default.Stream,fe=function(e){return{ReadStream:function t(n,r){if(!(this instanceof t))return new t(n,r);le.call(this);var u=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,r=r||{};for(var o=Object.keys(r),i=0,s=o.length;ithis.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void process.nextTick((function(){u._read()}));e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return u.emit("error",e),void(u.readable=!1);u.fd=t,u.emit("open",t),u._read()}))},WriteStream:function t(n,r){if(!(this instanceof t))return new t(n,r);le.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,r=r||{};for(var u=Object.keys(r),o=0,i=u.length;o= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}};var de=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:De(e)};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t},De=Object.getPrototypeOf||function(e){return e.__proto__};var pe,Ee,me=D.default,he=ae,ye=fe,Ce=de,Fe=F.default;function ge(e,t){Object.defineProperty(e,pe,{get:function(){return t}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(pe=Symbol.for("graceful-fs.queue"),Ee=Symbol.for("graceful-fs.previous")):(pe="___graceful-fs.queue",Ee="___graceful-fs.previous");var Ae=function(){};if(Fe.debuglog?Ae=Fe.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Ae=function(){var e=Fe.format.apply(Fe,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),!me[pe]){var ve=w[pe]||[];ge(me,ve),me.close=function(e){function t(t,n){return e.call(me,t,(function(e){e||_e(),"function"==typeof n&&n.apply(this,arguments)}))}return Object.defineProperty(t,Ee,{value:e}),t}(me.close),me.closeSync=function(e){function t(t){e.apply(me,arguments),_e()}return Object.defineProperty(t,Ee,{value:e}),t}(me.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){Ae(me[pe]),g.default.equal(me[pe].length,0)}))}w[pe]||ge(w,me[pe]);var Se,we=Oe(Ce(me));function Oe(e){he(e),e.gracefulify=Oe,e.createReadStream=function(t,n){return new e.ReadStream(t,n)},e.createWriteStream=function(t,n){return new e.WriteStream(t,n)};var t=e.readFile;e.readFile=function(e,n,r){"function"==typeof n&&(r=n,n=null);return function e(n,r,u,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?"function"==typeof u&&u.apply(this,arguments):be([e,[n,r,u],t,o||Date.now(),Date.now()])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,u){"function"==typeof r&&(u=r,r=null);return function e(t,r,u,o,i){return n(t,r,u,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,r,u,o],n,i||Date.now(),Date.now()])}))}(e,t,r,u)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,u){"function"==typeof n&&(u=n,n=null);return function e(t,n,u,o,i){return r(t,n,u,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,n,u,o],r,i||Date.now(),Date.now()])}))}(e,t,n,u)});var u=e.copyFile;u&&(e.copyFile=function(e,t,n,r){"function"==typeof n&&(r=n,n=0);return function e(t,n,r,o,i){return u(t,n,r,(function(u){!u||"EMFILE"!==u.code&&"ENFILE"!==u.code?"function"==typeof o&&o.apply(this,arguments):be([e,[t,n,r,o],u,i||Date.now(),Date.now()])}))}(e,t,n,r)});var o=e.readdir;e.readdir=function(e,t,n){"function"==typeof t&&(n=t,t=null);var r=i.test(process.version)?function(e,t,n,r){return o(e,u(e,t,n,r))}:function(e,t,n,r){return o(e,t,u(e,t,n,r))};return r(e,t,n);function u(e,t,n,u){return function(o,i){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?(i&&i.sort&&i.sort(),"function"==typeof n&&n.call(this,o,i)):be([r,[e,t,n],o,u||Date.now(),Date.now()])}}};var i=/^v[0-5]\./;if("v0.8"===process.version.substr(0,4)){var s=ye(e);d=s.ReadStream,D=s.WriteStream}var c=e.ReadStream;c&&(d.prototype=Object.create(c.prototype),d.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))});var a=e.WriteStream;a&&(D.prototype=Object.create(a.prototype),D.prototype.open=function(){var e=this;E(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))}),Object.defineProperty(e,"ReadStream",{get:function(){return d},set:function(e){d=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return D},set:function(e){D=e},enumerable:!0,configurable:!0});var l=d;Object.defineProperty(e,"FileReadStream",{get:function(){return l},set:function(e){l=e},enumerable:!0,configurable:!0});var f=D;function d(e,t){return this instanceof d?(c.apply(this,arguments),this):d.apply(Object.create(d.prototype),arguments)}function D(e,t){return this instanceof D?(a.apply(this,arguments),this):D.apply(Object.create(D.prototype),arguments)}Object.defineProperty(e,"FileWriteStream",{get:function(){return f},set:function(e){f=e},enumerable:!0,configurable:!0});var p=e.open;function E(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,u,o){return p(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?"function"==typeof u&&u.apply(this,arguments):be([e,[t,n,r,u],i,o||Date.now(),Date.now()])}))}(e,t,n,r)}return e.open=E,e}function be(e){Ae("ENQUEUE",e[0].name,e[1]),me[pe].push(e),Be()}function _e(){for(var e=Date.now(),t=0;t2&&(me[pe][t][3]=e,me[pe][t][4]=e);Be()}function Be(){if(clearTimeout(Se),Se=void 0,0!==me[pe].length){var e=me[pe].shift(),t=e[0],n=e[1],r=e[2],u=e[3],o=e[4];if(void 0===u)Ae("RETRY",t.name,n),t.apply(null,n);else if(Date.now()-u>=6e4){Ae("TIMEOUT",t.name,n);var i=n.pop();"function"==typeof i&&i.call(null,r)}else{var s=Date.now()-o,c=Math.max(o-u,1);s>=Math.min(1.2*c,100)?(Ae("RETRY",t.name,n),t.apply(null,n.concat([u]))):me[pe].push(e)}void 0===Se&&(Se=setTimeout(Be,0))}}process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!me.__patched&&(we=Oe(me),me.__patched=!0),function(e){const t=re.fromCallback,n=we,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.assign(e,n),r.forEach((r=>{e[r]=t(n[r])})),e.realpath.native=t(n.realpath.native),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.writev&&(e.writev=function(e,t,...r){return"function"==typeof r[r.length-1]?n.writev(e,t,...r):new Promise(((u,o)=>{n.writev(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffers:n})}))}))})}(ne);var Pe={},ke={};const xe=p.default;ke.checkPath=function(e){if("win32"===process.platform){if(/[<>:"|?*]/.test(e.replace(xe.parse(e).root,""))){const t=new Error(`Path contains invalid characters: ${e}`);throw t.code="EINVAL",t}}};const Ne=ne,{checkPath:Ie}=ke,Te=e=>"number"==typeof e?e:{mode:511,...e}.mode;Pe.makeDir=async(e,t)=>(Ie(e),Ne.mkdir(e,{mode:Te(t),recursive:!0})),Pe.makeDirSync=(e,t)=>(Ie(e),Ne.mkdirSync(e,{mode:Te(t),recursive:!0}));const Re=re.fromPromise,{makeDir:Me,makeDirSync:Le}=Pe,je=Re(Me);var $e={mkdirs:je,mkdirsSync:Le,mkdirp:je,mkdirpSync:Le,ensureDir:je,ensureDirSync:Le};const He=re.fromPromise,Je=ne;var Ge={pathExists:He((function(e){return Je.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:Je.existsSync};const Ve=we;var Ue=function(e,t,n,r){Ve.open(e,"r+",((e,u)=>{if(e)return r(e);Ve.futimes(u,t,n,(e=>{Ve.close(u,(t=>{r&&r(e||t)}))}))}))},We=function(e,t,n){const r=Ve.openSync(e,"r+");return Ve.futimesSync(r,t,n),Ve.closeSync(r)};const ze=ne,Ke=p.default,qe=F.default;function Ye(e,t,n){const r=n.dereference?e=>ze.stat(e,{bigint:!0}):e=>ze.lstat(e,{bigint:!0});return Promise.all([r(e),r(t).catch((e=>{if("ENOENT"===e.code)return null;throw e}))]).then((([e,t])=>({srcStat:e,destStat:t})))}function Xe(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function Ze(e,t){const n=Ke.resolve(e).split(Ke.sep).filter((e=>e)),r=Ke.resolve(t).split(Ke.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function Qe(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var et={checkPaths:function(e,t,n,r,u){qe.callbackify(Ye)(e,t,r,((r,o)=>{if(r)return u(r);const{srcStat:i,destStat:s}=o;if(s){if(Xe(i,s)){const r=Ke.basename(e),o=Ke.basename(t);return"move"===n&&r!==o&&r.toLowerCase()===o.toLowerCase()?u(null,{srcStat:i,destStat:s,isChangingCase:!0}):u(new Error("Source and destination must not be the same."))}if(i.isDirectory()&&!s.isDirectory())return u(new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!i.isDirectory()&&s.isDirectory())return u(new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return i.isDirectory()&&Ze(e,t)?u(new Error(Qe(e,t,n))):u(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n,r){const{srcStat:u,destStat:o}=function(e,t,n){let r;const u=n.dereference?e=>ze.statSync(e,{bigint:!0}):e=>ze.lstatSync(e,{bigint:!0}),o=u(e);try{r=u(t)}catch(e){if("ENOENT"===e.code)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:r}}(e,t,r);if(o){if(Xe(u,o)){const r=Ke.basename(e),i=Ke.basename(t);if("move"===n&&r!==i&&r.toLowerCase()===i.toLowerCase())return{srcStat:u,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(u.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!u.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(u.isDirectory()&&Ze(e,t))throw new Error(Qe(e,t,n));return{srcStat:u,destStat:o}},checkParentPaths:function e(t,n,r,u,o){const i=Ke.resolve(Ke.dirname(t)),s=Ke.resolve(Ke.dirname(r));if(s===i||s===Ke.parse(s).root)return o();ze.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):Xe(n,c)?o(new Error(Qe(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=Ke.resolve(Ke.dirname(t)),i=Ke.resolve(Ke.dirname(r));if(i===o||i===Ke.parse(i).root)return;let s;try{s=ze.statSync(i,{bigint:!0})}catch(e){if("ENOENT"===e.code)return;throw e}if(Xe(n,s))throw new Error(Qe(t,r,u));return e(t,n,i,u)},isSrcSubdir:Ze,areIdentical:Xe};const tt=we,nt=p.default,rt=$e.mkdirs,ut=Ge.pathExists,ot=Ue,it=et;function st(e,t,n,r,u){const o=nt.dirname(n);ut(o,((i,s)=>i?u(i):s?at(e,t,n,r,u):void rt(o,(o=>o?u(o):at(e,t,n,r,u)))))}function ct(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function at(e,t,n,r,u){(r.dereference?tt.stat:tt.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){return t?Dt(n,r,u,o):function(e,t,n,r,u){tt.mkdir(n,(o=>{if(o)return u(o);Dt(t,n,r,(t=>t?u(t):dt(n,e,u)))}))}(e.mode,n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();tt.unlink(n,(o=>o?u(o):lt(e,t,n,r,u)))}(e,n,r,u,o):lt(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){tt.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=nt.resolve(process.cwd(),o)),e?void tt.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?tt.symlink(o,n,u):u(t):(r.dereference&&(i=nt.resolve(process.cwd(),i)),it.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&it.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){tt.unlink(t,(r=>r?n(r):tt.symlink(e,t,n)))}(o,n,u)))):tt.symlink(o,n,u))))}(e,t,n,r,u):i.isSocket()?u(new Error(`Cannot copy a socket file: ${t}`)):i.isFIFO()?u(new Error(`Cannot copy a FIFO pipe: ${t}`)):u(new Error(`Unknown file: ${t}`))))}function lt(e,t,n,r,u){tt.copyFile(t,n,(o=>o?u(o):r.preserveTimestamps?function(e,t,n,r){if(function(e){return 0==(128&e)}(e))return function(e,t,n){return dt(e,128|t,n)}(n,e,(u=>u?r(u):ft(e,t,n,r)));return ft(e,t,n,r)}(e.mode,t,n,u):dt(n,e.mode,u)))}function ft(e,t,n,r){!function(e,t,n){tt.stat(e,((e,r)=>e?n(e):ot(t,r.atime,r.mtime,n)))}(t,n,(t=>t?r(t):dt(n,e,r)))}function dt(e,t,n){return tt.chmod(e,t,n)}function Dt(e,t,n,r){tt.readdir(e,((u,o)=>u?r(u):pt(o,e,t,n,r)))}function pt(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=nt.join(n,t),s=nt.join(r,t);it.checkPaths(i,s,"copy",u,((t,c)=>{if(t)return o(t);const{destStat:a}=c;!function(e,t,n,r,u){r.filter?ct(at,e,t,n,r,u):at(e,t,n,r,u)}(a,i,s,u,(t=>t?o(t):pt(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var Et=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),it.checkPaths(e,t,"copy",n,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;it.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?ct(st,s,e,t,n,r):st(s,e,t,n,r)))}))};const mt=we,ht=p.default,yt=$e.mkdirsSync,Ct=We,Ft=et;function gt(e,t,n,r){const u=(r.dereference?mt.statSync:mt.lstatSync)(t);if(u.isDirectory())return function(e,t,n,r,u){return t?St(n,r,u):function(e,t,n,r){return mt.mkdirSync(n),St(t,n,r),vt(n,e)}(e.mode,n,r,u)}(u,e,t,n,r);if(u.isFile()||u.isCharacterDevice()||u.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return mt.unlinkSync(n),At(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):At(e,n,r,u)}(u,e,t,n,r);if(u.isSymbolicLink())return function(e,t,n,r){let u=mt.readlinkSync(t);r.dereference&&(u=ht.resolve(process.cwd(),u));if(e){let e;try{e=mt.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return mt.symlinkSync(u,n);throw e}if(r.dereference&&(e=ht.resolve(process.cwd(),e)),Ft.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(mt.statSync(n).isDirectory()&&Ft.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return mt.unlinkSync(t),mt.symlinkSync(e,t)}(u,n)}return mt.symlinkSync(u,n)}(e,t,n,r);if(u.isSocket())throw new Error(`Cannot copy a socket file: ${t}`);if(u.isFIFO())throw new Error(`Cannot copy a FIFO pipe: ${t}`);throw new Error(`Unknown file: ${t}`)}function At(e,t,n,r){return mt.copyFileSync(t,n),r.preserveTimestamps&&function(e,t,n){(function(e){return 0==(128&e)})(e)&&function(e,t){vt(e,128|t)}(n,e);(function(e,t){const n=mt.statSync(e);Ct(t,n.atime,n.mtime)})(t,n)}(e.mode,t,n),vt(n,e.mode)}function vt(e,t){return mt.chmodSync(e,t)}function St(e,t,n){mt.readdirSync(e).forEach((r=>function(e,t,n,r){const u=ht.join(t,e),o=ht.join(n,e),{destStat:i}=Ft.checkPathsSync(u,o,"copy",r);return function(e,t,n,r){if(!r.filter||r.filter(t,n))return gt(e,t,n,r)}(i,u,o,r)}(r,e,t,n)))}var wt=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=Ft.checkPathsSync(e,t,"copy",n);return Ft.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=ht.dirname(n);mt.existsSync(u)||yt(u);return gt(e,t,n,r)}(u,e,t,n)};var Ot={copy:(0,re.fromCallback)(Et),copySync:wt};const bt=we,_t=p.default,Bt=g.default,Pt="win32"===process.platform;function kt(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||bt[t],e[t+="Sync"]=e[t]||bt[t]})),e.maxBusyTries=e.maxBusyTries||3}function xt(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),Bt(e,"rimraf: missing path"),Bt.strictEqual(typeof e,"string","rimraf: path should be a string"),Bt.strictEqual(typeof n,"function","rimraf: callback function required"),Bt(t,"rimraf: invalid options argument provided"),Bt.strictEqual(typeof t,"object","rimraf: options should be object"),kt(t),Nt(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rNt(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Nt(e,t,n){Bt(e),Bt(t),Bt("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&Pt?It(e,t,r,n):u&&u.isDirectory()?Rt(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return Pt?It(e,t,r,n):Rt(e,t,r,n);if("EISDIR"===r.code)return Rt(e,t,r,n)}return n(r)}))))}function It(e,t,n,r){Bt(e),Bt(t),Bt("function"==typeof r),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?Rt(e,t,n,r):t.unlink(e,r)}))}))}function Tt(e,t,n){let r;Bt(e),Bt(t);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?Lt(e,t,n):t.unlinkSync(e)}function Rt(e,t,n,r){Bt(e),Bt(t),Bt("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){Bt(e),Bt(t),Bt("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{xt(_t.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function Mt(e,t){let n;kt(t=t||{}),Bt(e,"rimraf: missing path"),Bt.strictEqual(typeof e,"string","rimraf: path should be a string"),Bt(t,"rimraf: missing options"),Bt.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&Pt&&Tt(e,t,n)}try{n&&n.isDirectory()?Lt(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return Pt?Tt(e,t,n):Lt(e,t,n);if("EISDIR"!==n.code)throw n;Lt(e,t,n)}}function Lt(e,t,n){Bt(e),Bt(t);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(Bt(e),Bt(t),t.readdirSync(e).forEach((n=>Mt(_t.join(e,n),t))),!Pt){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch{}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var jt=xt;xt.sync=Mt;const $t=we,Ht=re.fromCallback,Jt=jt;var Gt={remove:Ht((function(e,t){if($t.rm)return $t.rm(e,{recursive:!0,force:!0},t);Jt(e,t)})),removeSync:function(e){if($t.rmSync)return $t.rmSync(e,{recursive:!0,force:!0});Jt.sync(e)}};const Vt=re.fromPromise,Ut=ne,Wt=p.default,zt=$e,Kt=Gt,qt=Vt((async function(e){let t;try{t=await Ut.readdir(e)}catch{return zt.mkdirs(e)}return Promise.all(t.map((t=>Kt.remove(Wt.join(e,t)))))}));function Yt(e){let t;try{t=Ut.readdirSync(e)}catch{return zt.mkdirsSync(e)}t.forEach((t=>{t=Wt.join(e,t),Kt.removeSync(t)}))}var Xt={emptyDirSync:Yt,emptydirSync:Yt,emptyDir:qt,emptydir:qt};const Zt=re.fromCallback,Qt=p.default,en=we,tn=$e;var nn={createFile:Zt((function(e,t){function n(){en.writeFile(e,"",(e=>{if(e)return t(e);t()}))}en.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=Qt.dirname(e);en.stat(o,((e,r)=>{if(e)return"ENOENT"===e.code?tn.mkdirs(o,(e=>{if(e)return t(e);n()})):t(e);r.isDirectory()?n():en.readdir(o,(e=>{if(e)return t(e)}))}))}))})),createFileSync:function(e){let t;try{t=en.statSync(e)}catch{}if(t&&t.isFile())return;const n=Qt.dirname(e);try{en.statSync(n).isDirectory()||en.readdirSync(n)}catch(e){if(!e||"ENOENT"!==e.code)throw e;tn.mkdirsSync(n)}en.writeFileSync(e,"")}};const rn=re.fromCallback,un=p.default,on=we,sn=$e,cn=Ge.pathExists,{areIdentical:an}=et;var ln={createLink:rn((function(e,t,n){function r(e,t){on.link(e,t,(e=>{if(e)return n(e);n(null)}))}on.lstat(t,((u,o)=>{on.lstat(e,((u,i)=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);if(o&&an(i,o))return n(null);const s=un.dirname(t);cn(s,((u,o)=>u?n(u):o?r(e,t):void sn.mkdirs(s,(u=>{if(u)return n(u);r(e,t)}))))}))}))})),createLinkSync:function(e,t){let n;try{n=on.lstatSync(t)}catch{}try{const t=on.lstatSync(e);if(n&&an(t,n))return}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const r=un.dirname(t);return on.existsSync(r)||sn.mkdirsSync(r),on.linkSync(e,t)}};const fn=p.default,dn=we,Dn=Ge.pathExists;var pn={symlinkPaths:function(e,t,n){if(fn.isAbsolute(e))return dn.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=fn.dirname(t),u=fn.join(r,e);return Dn(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):dn.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:fn.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(fn.isAbsolute(e)){if(n=dn.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=fn.dirname(t),u=fn.join(r,e);if(n=dn.existsSync(u),n)return{toCwd:u,toDst:e};if(n=dn.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:fn.relative(r,e)}}}};const En=we;var mn={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);En.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=En.lstatSync(e)}catch{return"file"}return n&&n.isDirectory()?"dir":"file"}};const hn=re.fromCallback,yn=p.default,Cn=ne,Fn=$e.mkdirs,gn=$e.mkdirsSync,An=pn.symlinkPaths,vn=pn.symlinkPathsSync,Sn=mn.symlinkType,wn=mn.symlinkTypeSync,On=Ge.pathExists,{areIdentical:bn}=et;function _n(e,t,n,r){An(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,Sn(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=yn.dirname(t);On(o,((n,i)=>n?r(n):i?Cn.symlink(e,t,u,r):void Fn(o,(n=>{if(n)return r(n);Cn.symlink(e,t,u,r)}))))}))}))}var Bn={createSymlink:hn((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Cn.lstat(t,((u,o)=>{!u&&o.isSymbolicLink()?Promise.all([Cn.stat(e),Cn.stat(t)]).then((([u,o])=>{if(bn(u,o))return r(null);_n(e,t,n,r)})):_n(e,t,n,r)}))})),createSymlinkSync:function(e,t,n){let r;try{r=Cn.lstatSync(t)}catch{}if(r&&r.isSymbolicLink()){const n=Cn.statSync(e),r=Cn.statSync(t);if(bn(n,r))return}const u=vn(e,t);e=u.toDst,n=wn(u.toCwd,n);const o=yn.dirname(t);return Cn.existsSync(o)||gn(o),Cn.symlinkSync(e,t,n)}};const{createFile:Pn,createFileSync:kn}=nn,{createLink:xn,createLinkSync:Nn}=ln,{createSymlink:In,createSymlinkSync:Tn}=Bn;var Rn={createFile:Pn,createFileSync:kn,ensureFile:Pn,ensureFileSync:kn,createLink:xn,createLinkSync:Nn,ensureLink:xn,ensureLinkSync:Nn,createSymlink:In,createSymlinkSync:Tn,ensureSymlink:In,ensureSymlinkSync:Tn};var Mn={stringify:function(e,{EOL:t="\n",finalEOL:n=!0,replacer:r=null,spaces:u}={}){const o=n?t:"";return JSON.stringify(e,r,u).replace(/\n/g,t)+o},stripBom:function(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}};let Ln;try{Ln=we}catch(e){Ln=D.default}const jn=re,{stringify:$n,stripBom:Hn}=Mn;const Jn=jn.fromPromise((async function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||Ln,r=!("throws"in t)||t.throws;let u,o=await jn.fromCallback(n.readFile)(e,t);o=Hn(o);try{u=JSON.parse(o,t?t.reviver:null)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}return u}));const Gn=jn.fromPromise((async function(e,t,n={}){const r=n.fs||Ln,u=$n(t,n);await jn.fromCallback(r.writeFile)(e,u,n)}));const Vn={readFile:Jn,readFileSync:function(e,t={}){"string"==typeof t&&(t={encoding:t});const n=t.fs||Ln,r=!("throws"in t)||t.throws;try{let r=n.readFileSync(e,t);return r=Hn(r),JSON.parse(r,t.reviver)}catch(t){if(r)throw t.message=`${e}: ${t.message}`,t;return null}},writeFile:Gn,writeFileSync:function(e,t,n={}){const r=n.fs||Ln,u=$n(t,n);return r.writeFileSync(e,u,n)}};var Un={readJson:Vn.readFile,readJsonSync:Vn.readFileSync,writeJson:Vn.writeFile,writeJsonSync:Vn.writeFileSync};const Wn=re.fromCallback,zn=we,Kn=p.default,qn=$e,Yn=Ge.pathExists;var Xn={outputFile:Wn((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Kn.dirname(e);Yn(u,((o,i)=>o?r(o):i?zn.writeFile(e,t,n,r):void qn.mkdirs(u,(u=>{if(u)return r(u);zn.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Kn.dirname(e);if(zn.existsSync(n))return zn.writeFileSync(e,...t);qn.mkdirsSync(n),zn.writeFileSync(e,...t)}};const{stringify:Zn}=Mn,{outputFile:Qn}=Xn;var er=async function(e,t,n={}){const r=Zn(t,n);await Qn(e,r,n)};const{stringify:tr}=Mn,{outputFileSync:nr}=Xn;var rr=function(e,t,n){const r=tr(t,n);nr(e,r,n)};const ur=re.fromPromise,or=Un;or.outputJson=ur(er),or.outputJsonSync=rr,or.outputJSON=or.outputJson,or.outputJSONSync=or.outputJsonSync,or.writeJSON=or.writeJson,or.writeJSONSync=or.writeJsonSync,or.readJSON=or.readJson,or.readJSONSync=or.readJsonSync;var ir=or;const sr=we,cr=p.default,ar=Ot.copy,lr=Gt.remove,fr=$e.mkdirp,dr=Ge.pathExists,Dr=et;function pr(e,t,n,r,u){return r?Er(e,t,n,u):n?lr(t,(r=>r?u(r):Er(e,t,n,u))):void dr(t,((r,o)=>r?u(r):o?u(new Error("dest already exists.")):Er(e,t,n,u)))}function Er(e,t,n,r){sr.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};ar(e,t,u,(t=>t?r(t):lr(e,r)))}(e,t,n,r):r()))}var mr=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;Dr.checkPaths(e,t,"move",n,((n,o)=>{if(n)return r(n);const{srcStat:i,isChangingCase:s=!1}=o;Dr.checkParentPaths(e,i,t,"move",(n=>n?r(n):function(e){const t=cr.dirname(e);return cr.parse(t).root===t}(t)?pr(e,t,u,s,r):void fr(cr.dirname(t),(n=>n?r(n):pr(e,t,u,s,r)))))}))};const hr=we,yr=p.default,Cr=Ot.copySync,Fr=Gt.removeSync,gr=$e.mkdirpSync,Ar=et;function vr(e,t,n){try{hr.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Cr(e,t,r),Fr(e)}(e,t,n)}}var Sr=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u,isChangingCase:o=!1}=Ar.checkPathsSync(e,t,"move",n);return Ar.checkParentPathsSync(e,u,t,"move"),function(e){const t=yr.dirname(e);return yr.parse(t).root===t}(t)||gr(yr.dirname(t)),function(e,t,n,r){if(r)return vr(e,t,n);if(n)return Fr(t),vr(e,t,n);if(hr.existsSync(t))throw new Error("dest already exists.");return vr(e,t,n)}(e,t,r,o)};var wr,Or,br,_r,Br,Pr={move:(0,re.fromCallback)(mr),moveSync:Sr},kr={...ne,...Ot,...Xt,...Rn,...ir,...$e,...Pr,...Xn,...Ge,...Gt},xr={},Nr={exports:{}},Ir={exports:{}};function Tr(){if(Or)return wr;Or=1;var e=1e3,t=60*e,n=60*t,r=24*n,u=7*r,o=365.25*r;function i(e,t,n,r){var u=t>=1.5*n;return Math.round(e/n)+" "+r+(u?"s":"")}return wr=function(s,c){c=c||{};var a=typeof s;if("string"===a&&s.length>0)return function(i){if((i=String(i)).length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!s)return;var c=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*o;case"weeks":case"week":case"w":return c*u;case"days":case"day":case"d":return c*r;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*t;case"seconds":case"second":case"secs":case"sec":case"s":return c*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(s);if("number"===a&&isFinite(s))return c.long?function(u){var o=Math.abs(u);if(o>=r)return i(u,o,r,"day");if(o>=n)return i(u,o,n,"hour");if(o>=t)return i(u,o,t,"minute");if(o>=e)return i(u,o,e,"second");return u+" ms"}(s):function(u){var o=Math.abs(u);if(o>=r)return Math.round(u/r)+"d";if(o>=n)return Math.round(u/n)+"h";if(o>=t)return Math.round(u/t)+"m";if(o>=e)return Math.round(u/e)+"s";return u+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}function Rr(){if(_r)return br;return _r=1,br=function(e){function t(e){let r,u,o,i=null;function s(...e){if(!s.enabled)return;const n=s,u=Number(new Date),o=u-(r||u);n.diff=o,n.prev=r,n.curr=u,r=u,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,u)=>{if("%%"===r)return"%";i++;const o=t.formatters[u];if("function"==typeof o){const t=e[i];r=o.call(n,t),e.splice(i,1),i--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return s.namespace=e,s.useColors=t.useColors(),s.color=t.selectColor(e),s.extend=n,s.destroy=t.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(u!==t.namespaces&&(u=t.namespaces,o=t.enabled(e)),o),set:e=>{i=e}}),"function"==typeof t.init&&t.init(s),s}function n(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function r(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(r),...t.skips.map(r).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),u=r.length;for(n=0;n{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),u=t.indexOf("--");return-1!==r&&(-1===u||r{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=function(){if($r)return jr;$r=1;const e=E.default,t=A.default,n=Vr(),{env:r}=process;let u;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i(t,o){if(0===u)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(t&&!o&&void 0===u)return 0;const i=u||0;if("dumb"===r.TERM)return i;if("win32"===process.platform){const t=e.release().split(".");return Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in r))||"codeship"===r.CI_NAME?1:i;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if("truecolor"===r.COLORTERM)return 3;if("TERM_PROGRAM"in r){const e=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:i}return n("no-color")||n("no-colors")||n("color=false")||n("color=never")?u=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(u=1),"FORCE_COLOR"in r&&(u="true"===r.FORCE_COLOR?1:"false"===r.FORCE_COLOR?0:0===r.FORCE_COLOR.length?1:Math.min(parseInt(r.FORCE_COLOR,10),3)),jr={supportsColor:function(e){return o(i(e,e&&e.isTTY))},stdout:o(i(!0,t.isatty(1))),stderr:o(i(!0,t.isatty(2)))}}();e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=Rr()(t);const{formatters:u}=e.exports;u.o=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},u.O=function(e){return this.inspectOpts.colors=this.useColors,r.inspect(e,this.inspectOpts)}}(Gr,Gr.exports)),Gr.exports}Jr=Nr,"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?Jr.exports=(Br||(Br=1,function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,u=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(u=r))})),t.splice(u,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Rr()(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(Ir,Ir.exports)),Ir.exports):Jr.exports=Ur();var Wr=function(e){return(e=e||{}).circles?function(e){var t=[],n=[];return e.proto?function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=zr(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o}:function e(u){if("object"!=typeof u||null===u)return u;if(u instanceof Date)return new Date(u);if(Array.isArray(u))return r(u,e);if(u instanceof Map)return new Map(r(Array.from(u),e));if(u instanceof Set)return new Set(r(Array.from(u),e));var o={};for(var i in t.push(u),n.push(o),u)if(!1!==Object.hasOwnProperty.call(u,i)){var s=u[i];if("object"!=typeof s||null===s)o[i]=s;else if(s instanceof Date)o[i]=new Date(s);else if(s instanceof Map)o[i]=new Map(r(Array.from(s),e));else if(s instanceof Set)o[i]=new Set(r(Array.from(s),e));else if(ArrayBuffer.isView(s))o[i]=zr(s);else{var c=t.indexOf(s);o[i]=-1!==c?n[c]:e(s)}}return t.pop(),n.pop(),o};function r(e,r){for(var u=Object.keys(e),o=new Array(u.length),i=0;i!e,Qr=e=>e&&"object"==typeof e&&!Array.isArray(e),eu=(e,t,n)=>{(Array.isArray(t)?t:[t]).forEach((t=>{if(t)throw new Error(`Problem with log4js configuration: (${Kr.inspect(e,{depth:5})}) - ${n}`)}))};var tu={configure:e=>{qr("New configuration to be validated: ",e),eu(e,Zr(Qr(e)),"must be an object."),qr(`Calling pre-processing listeners (${Yr.length})`),Yr.forEach((t=>t(e))),qr("Configuration pre-processing finished."),qr(`Calling configuration listeners (${Xr.length})`),Xr.forEach((t=>t(e))),qr("Configuration finished.")},addListener:e=>{Xr.push(e),qr(`Added listener, now ${Xr.length} listeners`)},addPreProcessingListener:e=>{Yr.push(e),qr(`Added pre-processing listener, now ${Yr.length} listeners`)},throwExceptionIf:eu,anObject:Qr,anInteger:e=>e&&"number"==typeof e&&Number.isInteger(e),validIdentifier:e=>/^[A-Za-z][A-Za-z0-9_]*$/g.test(e),not:Zr},nu={exports:{}};!function(e){function t(e,t){for(var n=e.toString();n.length-1?s:c,l=n(u.getHours()),f=n(u.getMinutes()),d=n(u.getSeconds()),D=t(u.getMilliseconds(),3),p=function(e){var t=Math.abs(e),n=String(Math.floor(t/60)),r=String(t%60);return n=("0"+n).slice(-2),r=("0"+r).slice(-2),0===e?"Z":(e<0?"+":"-")+n+":"+r}(u.getTimezoneOffset());return r.replace(/dd/g,o).replace(/MM/g,i).replace(/y{1,4}/g,a).replace(/hh/g,l).replace(/mm/g,f).replace(/ss/g,d).replace(/SSS/g,D).replace(/O/g,p)}function u(e,t,n,r){e["set"+(r?"":"UTC")+t](n)}e.exports=r,e.exports.asString=r,e.exports.parse=function(t,n,r){if(!t)throw new Error("pattern must be supplied");return function(t,n,r){var o=t.indexOf("O")<0,i=!1,s=[{pattern:/y{1,4}/,regexp:"\\d{1,4}",fn:function(e,t){u(e,"FullYear",t,o)}},{pattern:/MM/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Month",t-1,o),e.getMonth()!==t-1&&(i=!0)}},{pattern:/dd/,regexp:"\\d{1,2}",fn:function(e,t){i&&u(e,"Month",e.getMonth()-1,o),u(e,"Date",t,o)}},{pattern:/hh/,regexp:"\\d{1,2}",fn:function(e,t){u(e,"Hours",t,o)}},{pattern:/mm/,regexp:"\\d\\d",fn:function(e,t){u(e,"Minutes",t,o)}},{pattern:/ss/,regexp:"\\d\\d",fn:function(e,t){u(e,"Seconds",t,o)}},{pattern:/SSS/,regexp:"\\d\\d\\d",fn:function(e,t){u(e,"Milliseconds",t,o)}},{pattern:/O/,regexp:"[+-]\\d{1,2}:?\\d{2}?|Z",fn:function(e,t){t="Z"===t?0:t.replace(":","");var n=Math.abs(t),r=(t>0?-1:1)*(n%100+60*Math.floor(n/100));e.setUTCMinutes(e.getUTCMinutes()+r)}}],c=s.reduce((function(e,t){return t.pattern.test(e.regexp)?(t.index=e.regexp.match(t.pattern).index,e.regexp=e.regexp.replace(t.pattern,"("+t.regexp+")")):t.index=-1,e}),{regexp:t,index:[]}),a=s.filter((function(e){return e.index>-1}));a.sort((function(e,t){return e.index-t.index}));var l=new RegExp(c.regexp).exec(n);if(l){var f=r||e.exports.now();return a.forEach((function(e,t){e.fn(f,l[t+1])})),f}throw new Error("String '"+n+"' could not be parsed as '"+t+"'")}(t,n,r)},e.exports.now=function(){return new Date},e.exports.ISO8601_FORMAT="yyyy-MM-ddThh:mm:ss.SSS",e.exports.ISO8601_WITH_TZ_OFFSET_FORMAT="yyyy-MM-ddThh:mm:ss.SSSO",e.exports.DATETIME_FORMAT="dd MM yyyy hh:mm:ss.SSS",e.exports.ABSOLUTETIME_FORMAT="hh:mm:ss.SSS"}(nu);const ru=nu.exports,uu=E.default,ou=F.default,iu=p.default,su={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[90,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[91,39],yellow:[33,39]};function cu(e){return e?`[${su[e][0]}m`:""}function au(e){return e?`[${su[e][1]}m`:""}function lu(e,t){return n=ou.format("[%s] [%s] %s - ",ru.asString(e.startTime),e.level.toString(),e.categoryName),cu(r=t)+n+au(r);var n,r}function fu(e){return lu(e)+ou.format(...e.data)}function du(e){return lu(e,e.level.colour)+ou.format(...e.data)}function Du(e){return ou.format(...e.data)}function pu(e){return e.data[0]}function Eu(e,t){const n=/%(-?[0-9]+)?(\.?-?[0-9]+)?([[\]cdhmnprzxXyflos%])(\{([^}]+)\})?|([^%]+)/;function r(e){return e&&e.pid?e.pid.toString():process.pid.toString()}e=e||"%r %p %c - %m%n";const u={c:function(e,t){let n=e.categoryName;if(t){const e=parseInt(t,10),r=n.split(".");ee&&(n=r.slice(-e).join(iu.sep))}return n},l:function(e){return e.lineNumber?`${e.lineNumber}`:""},o:function(e){return e.columnNumber?`${e.columnNumber}`:""},s:function(e){return e.callStack||""}};function o(e,t,n){return u[e](t,n)}function i(e,t,n){let r=e;return r=function(e,t){let n;return e?(n=parseInt(e.substr(1),10),n>0?t.slice(0,n):t.slice(n)):t}(t,r),r=function(e,t){let n;if(e)if("-"===e.charAt(0))for(n=parseInt(e.substr(1),10);t.lengthDu,basic:()=>fu,colored:()=>du,coloured:()=>du,pattern:e=>Eu(e&&e.pattern,e&&e.tokens),dummy:()=>pu};var hu={basicLayout:fu,messagePassThroughLayout:Du,patternLayout:Eu,colouredLayout:du,coloredLayout:du,dummyLayout:pu,addLayout(e,t){mu[e]=t},layout:(e,t)=>mu[e]&&mu[e](t)};const yu=tu,Cu=["white","grey","black","blue","cyan","green","magenta","red","yellow"];class Fu{constructor(e,t,n){this.level=e,this.levelStr=t,this.colour=n}toString(){return this.levelStr}static getLevel(e,t){return e?e instanceof Fu?e:(e instanceof Object&&e.levelStr&&(e=e.levelStr),Fu[e.toString().toUpperCase()]||t):t}static addLevels(e){if(e){Object.keys(e).forEach((t=>{const n=t.toUpperCase();Fu[n]=new Fu(e[t].value,n,e[t].colour);const r=Fu.levels.findIndex((e=>e.levelStr===n));r>-1?Fu.levels[r]=Fu[n]:Fu.levels.push(Fu[n])})),Fu.levels.sort(((e,t)=>e.level-t.level))}}isLessThanOrEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level<=e.level}isGreaterThanOrEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level>=e.level}isEqualTo(e){return"string"==typeof e&&(e=Fu.getLevel(e)),this.level===e.level}}Fu.levels=[],Fu.addLevels({ALL:{value:Number.MIN_VALUE,colour:"grey"},TRACE:{value:5e3,colour:"blue"},DEBUG:{value:1e4,colour:"cyan"},INFO:{value:2e4,colour:"green"},WARN:{value:3e4,colour:"yellow"},ERROR:{value:4e4,colour:"red"},FATAL:{value:5e4,colour:"magenta"},MARK:{value:9007199254740992,colour:"grey"},OFF:{value:Number.MAX_VALUE,colour:"grey"}}),yu.addListener((e=>{const t=e.levels;if(t){yu.throwExceptionIf(e,yu.not(yu.anObject(t)),"levels must be an object");Object.keys(t).forEach((n=>{yu.throwExceptionIf(e,yu.not(yu.validIdentifier(n)),`level name "${n}" is not a valid identifier (must start with a letter, only contain A-Z,a-z,0-9,_)`),yu.throwExceptionIf(e,yu.not(yu.anObject(t[n])),`level "${n}" must be an object`),yu.throwExceptionIf(e,yu.not(t[n].value),`level "${n}" must have a 'value' property`),yu.throwExceptionIf(e,yu.not(yu.anInteger(t[n].value)),`level "${n}".value must have an integer value`),yu.throwExceptionIf(e,yu.not(t[n].colour),`level "${n}" must have a 'colour' property`),yu.throwExceptionIf(e,yu.not(Cu.indexOf(t[n].colour)>-1),`level "${n}".colour must be one of ${Cu.join(", ")}`)}))}})),yu.addListener((e=>{Fu.addLevels(e.levels)}));var gu=Fu,Au={exports:{}},vu={};/*! (c) 2020 Andrea Giammarchi */ +const{parse:Su,stringify:wu}=JSON,{keys:Ou}=Object,bu=String,_u="string",Bu={},Pu="object",ku=(e,t)=>t,xu=e=>e instanceof bu?bu(e):e,Nu=(e,t)=>typeof t===_u?new bu(t):t,Iu=(e,t,n,r)=>{const u=[];for(let o=Ou(n),{length:i}=o,s=0;s{const r=bu(t.push(n)-1);return e.set(n,r),r},Ru=(e,t)=>{const n=Su(e,Nu).map(xu),r=n[0],u=t||ku,o=typeof r===Pu&&r?Iu(n,new Set,r,u):r;return u.call({"":o},"",o)};vu.parse=Ru;const Mu=(e,t,n)=>{const r=t&&typeof t===Pu?(e,n)=>""===e||-1Su(Mu(e));vu.fromJSON=e=>Ru(wu(e));const Lu=vu,ju=gu;class $u{constructor(e,t,n,r,u){this.startTime=new Date,this.categoryName=e,this.data=n,this.level=t,this.context=Object.assign({},r),this.pid=process.pid,u&&(this.functionName=u.functionName,this.fileName=u.fileName,this.lineNumber=u.lineNumber,this.columnNumber=u.columnNumber,this.callStack=u.callStack)}serialise(){const e=this.data.map((e=>(e&&e.message&&e.stack&&(e=Object.assign({message:e.message,stack:e.stack},e)),e)));return this.data=e,Lu.stringify(this)}static deserialise(e){let t;try{const n=Lu.parse(e);n.data=n.data.map((e=>{if(e&&e.message&&e.stack){const t=new Error(e);Object.keys(e).forEach((n=>{t[n]=e[n]})),e=t}return e})),t=new $u(n.categoryName,ju.getLevel(n.level.levelStr),n.data,n.context),t.startTime=new Date(n.startTime),t.pid=n.pid,t.cluster=n.cluster}catch(n){t=new $u("log4js",ju.ERROR,["Unable to parse log:",e,"because: ",n])}return t}}var Hu=$u;const Ju=Nr.exports("log4js:clustering"),Gu=Hu,Vu=tu;let Uu=!1,Wu=null;try{Wu=require("cluster")}catch(e){Ju("cluster module not present"),Uu=!0}const zu=[];let Ku=!1,qu="NODE_APP_INSTANCE";const Yu=()=>Ku&&"0"===process.env[qu],Xu=()=>Uu||Wu.isMaster||Yu(),Zu=e=>{zu.forEach((t=>t(e)))},Qu=(e,t)=>{if(Ju("cluster message received from worker ",e,": ",t),e.topic&&e.data&&(t=e,e=void 0),t&&t.topic&&"log4js:message"===t.topic){Ju("received message: ",t.data);const e=Gu.deserialise(t.data);Zu(e)}};Uu||Vu.addListener((e=>{zu.length=0,({pm2:Ku,disableClustering:Uu,pm2InstanceVar:qu="NODE_APP_INSTANCE"}=e),Ju(`clustering disabled ? ${Uu}`),Ju(`cluster.isMaster ? ${Wu&&Wu.isMaster}`),Ju(`pm2 enabled ? ${Ku}`),Ju(`pm2InstanceVar = ${qu}`),Ju(`process.env[${qu}] = ${process.env[qu]}`),Ku&&process.removeListener("message",Qu),Wu&&Wu.removeListener&&Wu.removeListener("message",Qu),Uu||e.disableClustering?Ju("Not listening for cluster messages, because clustering disabled."):Yu()?(Ju("listening for PM2 broadcast messages"),process.on("message",Qu)):Wu.isMaster?(Ju("listening for cluster messages"),Wu.on("message",Qu)):Ju("not listening for messages, because we are not a master process")}));var eo={onlyOnMaster:(e,t)=>Xu()?e():t,isMaster:Xu,send:e=>{Xu()?Zu(e):(Ku||(e.cluster={workerId:Wu.worker.id,worker:process.pid}),process.send({topic:"log4js:message",data:e.serialise()}))},onMessage:e=>{zu.push(e)}},to={};function no(e){if("number"==typeof e&&Number.isInteger(e))return e;const t={K:1024,M:1048576,G:1073741824},n=Object.keys(t),r=e.substr(e.length-1).toLocaleUpperCase(),u=e.substring(0,e.length-1).trim();if(n.indexOf(r)<0||!Number.isInteger(Number(u)))throw Error(`maxLogSize: "${e}" is invalid`);return u*t[r]}function ro(e){return function(e,t){const n=Object.assign({},t);return Object.keys(e).forEach((r=>{n[r]&&(n[r]=e[r](t[r]))})),n}({maxLogSize:no},e)}const uo={file:ro,fileSync:ro};to.modifyConfig=e=>uo[e.type]?uo[e.type](e):e;var oo={};const io=console.log.bind(console);oo.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{io(e(n,t))}}(n,e.timezoneOffset)};var so={};so.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stdout.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var co={};co.configure=function(e,t){let n=t.colouredLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){return n=>{process.stderr.write(`${e(n,t)}\n`)}}(n,e.timezoneOffset)};var ao={};ao.configure=function(e,t,n,r){const u=n(e.appender);return function(e,t,n,r){const u=r.getLevel(e),o=r.getLevel(t,r.FATAL);return e=>{const t=e.level;t.isGreaterThanOrEqualTo(u)&&t.isLessThanOrEqualTo(o)&&n(e)}}(e.level,e.maxLevel,u,r)};var lo={};const fo=Nr.exports("log4js:categoryFilter");lo.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return"string"==typeof e&&(e=[e]),n=>{fo(`Checking ${n.categoryName} against ${e}`),-1===e.indexOf(n.categoryName)&&(fo("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var Do={};const po=Nr.exports("log4js:noLogFilter");Do.configure=function(e,t,n){const r=n(e.appender);return function(e,t){return n=>{po(`Checking data: ${n.data} against filters: ${e}`),"string"==typeof e&&(e=[e]),e=e.filter((e=>null!=e&&""!==e));const r=new RegExp(e.join("|"),"i");(0===e.length||n.data.findIndex((e=>r.test(e)))<0)&&(po("Not excluded, sending to appender"),t(n))}}(e.exclude,r)};var Eo={},mo={exports:{}},ho={},yo={fromCallback:function(e){return Object.defineProperty((function(){if("function"!=typeof arguments[arguments.length-1])return new Promise(((t,n)=>{arguments[arguments.length]=(e,r)=>{if(e)return n(e);t(r)},arguments.length++,e.apply(this,arguments)}));e.apply(this,arguments)}),"name",{value:e.name})},fromPromise:function(e){return Object.defineProperty((function(){const t=arguments[arguments.length-1];if("function"!=typeof t)return e.apply(this,arguments);e.apply(this,arguments).then((e=>t(null,e)),t)}),"name",{value:e.name})}};!function(e){const t=yo.fromCallback,n=we,r=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter((e=>"function"==typeof n[e]));Object.keys(n).forEach((t=>{"promises"!==t&&(e[t]=n[t])})),r.forEach((r=>{e[r]=t(n[r])})),e.exists=function(e,t){return"function"==typeof t?n.exists(e,t):new Promise((t=>n.exists(e,t)))},e.read=function(e,t,r,u,o,i){return"function"==typeof i?n.read(e,t,r,u,o,i):new Promise(((i,s)=>{n.read(e,t,r,u,o,((e,t,n)=>{if(e)return s(e);i({bytesRead:t,buffer:n})}))}))},e.write=function(e,t,...r){return"function"==typeof r[r.length-1]?n.write(e,t,...r):new Promise(((u,o)=>{n.write(e,t,...r,((e,t,n)=>{if(e)return o(e);u({bytesWritten:t,buffer:n})}))}))},"function"==typeof n.realpath.native&&(e.realpath.native=t(n.realpath.native))}(ho);const Co=p.default;function Fo(e){return(e=Co.normalize(Co.resolve(e)).split(Co.sep)).length>0?e[0]:null}const go=/[<>:"|?*]/;var Ao=function(e){const t=Fo(e);return e=e.replace(t,""),go.test(e)};const vo=we,So=p.default,wo=Ao,Oo=parseInt("0777",8);var bo=function e(t,n,r,u){if("function"==typeof n?(r=n,n={}):n&&"object"==typeof n||(n={mode:n}),"win32"===process.platform&&wo(t)){const e=new Error(t+" contains invalid WIN32 path characters.");return e.code="EINVAL",r(e)}let o=n.mode;const i=n.fs||vo;void 0===o&&(o=Oo&~process.umask()),u||(u=null),r=r||function(){},t=So.resolve(t),i.mkdir(t,o,(o=>{if(!o)return r(null,u=u||t);if("ENOENT"===o.code){if(So.dirname(t)===t)return r(o);e(So.dirname(t),n,((u,o)=>{u?r(u,o):e(t,n,r,o)}))}else i.stat(t,((e,t)=>{e||!t.isDirectory()?r(o,u):r(null,u)}))}))};const _o=we,Bo=p.default,Po=Ao,ko=parseInt("0777",8);var xo=function e(t,n,r){n&&"object"==typeof n||(n={mode:n});let u=n.mode;const o=n.fs||_o;if("win32"===process.platform&&Po(t)){const e=new Error(t+" contains invalid WIN32 path characters.");throw e.code="EINVAL",e}void 0===u&&(u=ko&~process.umask()),r||(r=null),t=Bo.resolve(t);try{o.mkdirSync(t,u),r=r||t}catch(u){if("ENOENT"===u.code){if(Bo.dirname(t)===t)throw u;r=e(Bo.dirname(t),n,r),e(t,n,r)}else{let e;try{e=o.statSync(t)}catch(e){throw u}if(!e.isDirectory())throw u}}return r};const No=(0,yo.fromCallback)(bo);var Io={mkdirs:No,mkdirsSync:xo,mkdirp:No,mkdirpSync:xo,ensureDir:No,ensureDirSync:xo};const To=we;E.default,p.default;var Ro=function(e,t,n,r){To.open(e,"r+",((e,u)=>{if(e)return r(e);To.futimes(u,t,n,(e=>{To.close(u,(t=>{r&&r(e||t)}))}))}))},Mo=function(e,t,n){const r=To.openSync(e,"r+");return To.futimesSync(r,t,n),To.closeSync(r)};const Lo=we,jo=p.default,$o=10,Ho=5,Jo=0,Go=process.versions.node.split("."),Vo=Number.parseInt(Go[0],10),Uo=Number.parseInt(Go[1],10),Wo=Number.parseInt(Go[2],10);function zo(){if(Vo>$o)return!0;if(Vo===$o){if(Uo>Ho)return!0;if(Uo===Ho&&Wo>=Jo)return!0}return!1}function Ko(e,t){const n=jo.resolve(e).split(jo.sep).filter((e=>e)),r=jo.resolve(t).split(jo.sep).filter((e=>e));return n.reduce(((e,t,n)=>e&&r[n]===t),!0)}function qo(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}var Yo,Xo,Zo={checkPaths:function(e,t,n,r){!function(e,t,n){zo()?Lo.stat(e,{bigint:!0},((e,r)=>{if(e)return n(e);Lo.stat(t,{bigint:!0},((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))})):Lo.stat(e,((e,r)=>{if(e)return n(e);Lo.stat(t,((e,t)=>e?"ENOENT"===e.code?n(null,{srcStat:r,destStat:null}):n(e):n(null,{srcStat:r,destStat:t})))}))}(e,t,((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;return s&&s.ino&&s.dev&&s.ino===i.ino&&s.dev===i.dev?r(new Error("Source and destination must not be the same.")):i.isDirectory()&&Ko(e,t)?r(new Error(qo(e,t,n))):r(null,{srcStat:i,destStat:s})}))},checkPathsSync:function(e,t,n){const{srcStat:r,destStat:u}=function(e,t){let n,r;n=zo()?Lo.statSync(e,{bigint:!0}):Lo.statSync(e);try{r=zo()?Lo.statSync(t,{bigint:!0}):Lo.statSync(t)}catch(e){if("ENOENT"===e.code)return{srcStat:n,destStat:null};throw e}return{srcStat:n,destStat:r}}(e,t);if(u&&u.ino&&u.dev&&u.ino===r.ino&&u.dev===r.dev)throw new Error("Source and destination must not be the same.");if(r.isDirectory()&&Ko(e,t))throw new Error(qo(e,t,n));return{srcStat:r,destStat:u}},checkParentPaths:function e(t,n,r,u,o){const i=jo.resolve(jo.dirname(t)),s=jo.resolve(jo.dirname(r));if(s===i||s===jo.parse(s).root)return o();zo()?Lo.stat(s,{bigint:!0},((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(qo(t,r,u))):e(t,n,s,u,o))):Lo.stat(s,((i,c)=>i?"ENOENT"===i.code?o():o(i):c.ino&&c.dev&&c.ino===n.ino&&c.dev===n.dev?o(new Error(qo(t,r,u))):e(t,n,s,u,o)))},checkParentPathsSync:function e(t,n,r,u){const o=jo.resolve(jo.dirname(t)),i=jo.resolve(jo.dirname(r));if(i===o||i===jo.parse(i).root)return;let s;try{s=zo()?Lo.statSync(i,{bigint:!0}):Lo.statSync(i)}catch(e){if("ENOENT"===e.code)return;throw e}if(s.ino&&s.dev&&s.ino===n.ino&&s.dev===n.dev)throw new Error(qo(t,r,u));return e(t,n,i,u)},isSrcSubdir:Ko};const Qo=we,ei=p.default,ti=Io.mkdirsSync,ni=Mo,ri=Zo;function ui(e,t,n,r){if(!r.filter||r.filter(t,n))return function(e,t,n,r){const u=r.dereference?Qo.statSync:Qo.lstatSync,o=u(t);if(o.isDirectory())return function(e,t,n,r,u){if(!t)return function(e,t,n,r){return Qo.mkdirSync(n),ii(t,n,r),Qo.chmodSync(n,e.mode)}(e,n,r,u);if(t&&!t.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`);return ii(n,r,u)}(o,e,t,n,r);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return function(e,t,n,r,u){return t?function(e,t,n,r){if(r.overwrite)return Qo.unlinkSync(n),oi(e,t,n,r);if(r.errorOnExist)throw new Error(`'${n}' already exists`)}(e,n,r,u):oi(e,n,r,u)}(o,e,t,n,r);if(o.isSymbolicLink())return function(e,t,n,r){let u=Qo.readlinkSync(t);r.dereference&&(u=ei.resolve(process.cwd(),u));if(e){let e;try{e=Qo.readlinkSync(n)}catch(e){if("EINVAL"===e.code||"UNKNOWN"===e.code)return Qo.symlinkSync(u,n);throw e}if(r.dereference&&(e=ei.resolve(process.cwd(),e)),ri.isSrcSubdir(u,e))throw new Error(`Cannot copy '${u}' to a subdirectory of itself, '${e}'.`);if(Qo.statSync(n).isDirectory()&&ri.isSrcSubdir(e,u))throw new Error(`Cannot overwrite '${e}' with '${u}'.`);return function(e,t){return Qo.unlinkSync(t),Qo.symlinkSync(e,t)}(u,n)}return Qo.symlinkSync(u,n)}(e,t,n,r)}(e,t,n,r)}function oi(e,t,n,r){return"function"==typeof Qo.copyFileSync?(Qo.copyFileSync(t,n),Qo.chmodSync(n,e.mode),r.preserveTimestamps?ni(n,e.atime,e.mtime):void 0):function(e,t,n,r){const u=65536,o=(Xo?Yo:(Xo=1,Yo=function(e){if("function"==typeof Buffer.allocUnsafe)try{return Buffer.allocUnsafe(e)}catch(t){return new Buffer(e)}return new Buffer(e)}))(u),i=Qo.openSync(t,"r"),s=Qo.openSync(n,"w",e.mode);let c=0;for(;cfunction(e,t,n,r){const u=ei.join(t,e),o=ei.join(n,e),{destStat:i}=ri.checkPathsSync(u,o,"copy");return ui(i,u,o,r)}(r,e,t,n)))}var si=function(e,t,n){"function"==typeof n&&(n={filter:n}),(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269");const{srcStat:r,destStat:u}=ri.checkPathsSync(e,t,"copy");return ri.checkParentPathsSync(e,r,t,"copy"),function(e,t,n,r){if(r.filter&&!r.filter(t,n))return;const u=ei.dirname(n);Qo.existsSync(u)||ti(u);return ui(e,t,n,r)}(u,e,t,n)},ci={copySync:si};const ai=yo.fromPromise,li=ho;var fi={pathExists:ai((function(e){return li.access(e).then((()=>!0)).catch((()=>!1))})),pathExistsSync:li.existsSync};const di=we,Di=p.default,pi=Io.mkdirs,Ei=fi.pathExists,mi=Ro,hi=Zo;function yi(e,t,n,r,u){const o=Di.dirname(n);Ei(o,((i,s)=>i?u(i):s?Fi(e,t,n,r,u):void pi(o,(o=>o?u(o):Fi(e,t,n,r,u)))))}function Ci(e,t,n,r,u,o){Promise.resolve(u.filter(n,r)).then((i=>i?e(t,n,r,u,o):o()),(e=>o(e)))}function Fi(e,t,n,r,u){return r.filter?Ci(gi,e,t,n,r,u):gi(e,t,n,r,u)}function gi(e,t,n,r,u){(r.dereference?di.stat:di.lstat)(t,((o,i)=>o?u(o):i.isDirectory()?function(e,t,n,r,u,o){if(!t)return function(e,t,n,r,u){di.mkdir(n,(o=>{if(o)return u(o);Si(t,n,r,(t=>t?u(t):di.chmod(n,e.mode,u)))}))}(e,n,r,u,o);if(t&&!t.isDirectory())return o(new Error(`Cannot overwrite non-directory '${r}' with directory '${n}'.`));return Si(n,r,u,o)}(i,e,t,n,r,u):i.isFile()||i.isCharacterDevice()||i.isBlockDevice()?function(e,t,n,r,u,o){return t?function(e,t,n,r,u){if(!r.overwrite)return r.errorOnExist?u(new Error(`'${n}' already exists`)):u();di.unlink(n,(o=>o?u(o):Ai(e,t,n,r,u)))}(e,n,r,u,o):Ai(e,n,r,u,o)}(i,e,t,n,r,u):i.isSymbolicLink()?function(e,t,n,r,u){di.readlink(t,((t,o)=>t?u(t):(r.dereference&&(o=Di.resolve(process.cwd(),o)),e?void di.readlink(n,((t,i)=>t?"EINVAL"===t.code||"UNKNOWN"===t.code?di.symlink(o,n,u):u(t):(r.dereference&&(i=Di.resolve(process.cwd(),i)),hi.isSrcSubdir(o,i)?u(new Error(`Cannot copy '${o}' to a subdirectory of itself, '${i}'.`)):e.isDirectory()&&hi.isSrcSubdir(i,o)?u(new Error(`Cannot overwrite '${i}' with '${o}'.`)):function(e,t,n){di.unlink(t,(r=>r?n(r):di.symlink(e,t,n)))}(o,n,u)))):di.symlink(o,n,u))))}(e,t,n,r,u):void 0))}function Ai(e,t,n,r,u){return"function"==typeof di.copyFile?di.copyFile(t,n,(t=>t?u(t):vi(e,n,r,u))):function(e,t,n,r,u){const o=di.createReadStream(t);o.on("error",(e=>u(e))).once("open",(()=>{const t=di.createWriteStream(n,{mode:e.mode});t.on("error",(e=>u(e))).on("open",(()=>o.pipe(t))).once("close",(()=>vi(e,n,r,u)))}))}(e,t,n,r,u)}function vi(e,t,n,r){di.chmod(t,e.mode,(u=>u?r(u):n.preserveTimestamps?mi(t,e.atime,e.mtime,r):r()))}function Si(e,t,n,r){di.readdir(e,((u,o)=>u?r(u):wi(o,e,t,n,r)))}function wi(e,t,n,r,u){const o=e.pop();return o?function(e,t,n,r,u,o){const i=Di.join(n,t),s=Di.join(r,t);hi.checkPaths(i,s,"copy",((t,c)=>{if(t)return o(t);const{destStat:a}=c;Fi(a,i,s,u,(t=>t?o(t):wi(e,n,r,u,o)))}))}(e,o,t,n,r,u):u()}var Oi=function(e,t,n,r){"function"!=typeof n||r?"function"==typeof n&&(n={filter:n}):(r=n,n={}),r=r||function(){},(n=n||{}).clobber=!("clobber"in n)||!!n.clobber,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&"ia32"===process.arch&&console.warn("fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;\n\n see https://github.com/jprichardson/node-fs-extra/issues/269"),hi.checkPaths(e,t,"copy",((u,o)=>{if(u)return r(u);const{srcStat:i,destStat:s}=o;hi.checkParentPaths(e,i,t,"copy",(u=>u?r(u):n.filter?Ci(yi,s,e,t,n,r):yi(s,e,t,n,r)))}))};var bi={copy:(0,yo.fromCallback)(Oi)};const _i=we,Bi=p.default,Pi=g.default,ki="win32"===process.platform;function xi(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((t=>{e[t]=e[t]||_i[t],e[t+="Sync"]=e[t]||_i[t]})),e.maxBusyTries=e.maxBusyTries||3}function Ni(e,t,n){let r=0;"function"==typeof t&&(n=t,t={}),Pi(e,"rimraf: missing path"),Pi.strictEqual(typeof e,"string","rimraf: path should be a string"),Pi.strictEqual(typeof n,"function","rimraf: callback function required"),Pi(t,"rimraf: invalid options argument provided"),Pi.strictEqual(typeof t,"object","rimraf: options should be object"),xi(t),Ii(e,t,(function u(o){if(o){if(("EBUSY"===o.code||"ENOTEMPTY"===o.code||"EPERM"===o.code)&&rIi(e,t,u)),100*r)}"ENOENT"===o.code&&(o=null)}n(o)}))}function Ii(e,t,n){Pi(e),Pi(t),Pi("function"==typeof n),t.lstat(e,((r,u)=>r&&"ENOENT"===r.code?n(null):r&&"EPERM"===r.code&&ki?Ti(e,t,r,n):u&&u.isDirectory()?Mi(e,t,r,n):void t.unlink(e,(r=>{if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return ki?Ti(e,t,r,n):Mi(e,t,r,n);if("EISDIR"===r.code)return Mi(e,t,r,n)}return n(r)}))))}function Ti(e,t,n,r){Pi(e),Pi(t),Pi("function"==typeof r),n&&Pi(n instanceof Error),t.chmod(e,438,(u=>{u?r("ENOENT"===u.code?null:n):t.stat(e,((u,o)=>{u?r("ENOENT"===u.code?null:n):o.isDirectory()?Mi(e,t,n,r):t.unlink(e,r)}))}))}function Ri(e,t,n){let r;Pi(e),Pi(t),n&&Pi(n instanceof Error);try{t.chmodSync(e,438)}catch(e){if("ENOENT"===e.code)return;throw n}try{r=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}r.isDirectory()?ji(e,t,n):t.unlinkSync(e)}function Mi(e,t,n,r){Pi(e),Pi(t),n&&Pi(n instanceof Error),Pi("function"==typeof r),t.rmdir(e,(u=>{!u||"ENOTEMPTY"!==u.code&&"EEXIST"!==u.code&&"EPERM"!==u.code?u&&"ENOTDIR"===u.code?r(n):r(u):function(e,t,n){Pi(e),Pi(t),Pi("function"==typeof n),t.readdir(e,((r,u)=>{if(r)return n(r);let o,i=u.length;if(0===i)return t.rmdir(e,n);u.forEach((r=>{Ni(Bi.join(e,r),t,(r=>{if(!o)return r?n(o=r):void(0==--i&&t.rmdir(e,n))}))}))}))}(e,t,r)}))}function Li(e,t){let n;xi(t=t||{}),Pi(e,"rimraf: missing path"),Pi.strictEqual(typeof e,"string","rimraf: path should be a string"),Pi(t,"rimraf: missing options"),Pi.strictEqual(typeof t,"object","rimraf: options should be object");try{n=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&ki&&Ri(e,t,n)}try{n&&n.isDirectory()?ji(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return ki?Ri(e,t,n):ji(e,t,n);if("EISDIR"!==n.code)throw n;ji(e,t,n)}}function ji(e,t,n){Pi(e),Pi(t),n&&Pi(n instanceof Error);try{t.rmdirSync(e)}catch(r){if("ENOTDIR"===r.code)throw n;if("ENOTEMPTY"===r.code||"EEXIST"===r.code||"EPERM"===r.code)!function(e,t){if(Pi(e),Pi(t),t.readdirSync(e).forEach((n=>Li(Bi.join(e,n),t))),!ki){return t.rmdirSync(e,t)}{const n=Date.now();do{try{return t.rmdirSync(e,t)}catch(e){}}while(Date.now()-n<500)}}(e,t);else if("ENOENT"!==r.code)throw r}}var $i=Ni;Ni.sync=Li;const Hi=$i;var Ji={remove:(0,yo.fromCallback)(Hi),removeSync:Hi.sync};const Gi=yo.fromCallback,Vi=we,Ui=p.default,Wi=Io,zi=Ji,Ki=Gi((function(e,t){t=t||function(){},Vi.readdir(e,((n,r)=>{if(n)return Wi.mkdirs(e,t);r=r.map((t=>Ui.join(e,t))),function e(){const n=r.pop();if(!n)return t();zi.remove(n,(n=>{if(n)return t(n);e()}))}()}))}));function qi(e){let t;try{t=Vi.readdirSync(e)}catch(t){return Wi.mkdirsSync(e)}t.forEach((t=>{t=Ui.join(e,t),zi.removeSync(t)}))}var Yi={emptyDirSync:qi,emptydirSync:qi,emptyDir:Ki,emptydir:Ki};const Xi=yo.fromCallback,Zi=p.default,Qi=we,es=Io,ts=fi.pathExists;var ns={createFile:Xi((function(e,t){function n(){Qi.writeFile(e,"",(e=>{if(e)return t(e);t()}))}Qi.stat(e,((r,u)=>{if(!r&&u.isFile())return t();const o=Zi.dirname(e);ts(o,((e,r)=>e?t(e):r?n():void es.mkdirs(o,(e=>{if(e)return t(e);n()}))))}))})),createFileSync:function(e){let t;try{t=Qi.statSync(e)}catch(e){}if(t&&t.isFile())return;const n=Zi.dirname(e);Qi.existsSync(n)||es.mkdirsSync(n),Qi.writeFileSync(e,"")}};const rs=yo.fromCallback,us=p.default,os=we,is=Io,ss=fi.pathExists;var cs={createLink:rs((function(e,t,n){function r(e,t){os.link(e,t,(e=>{if(e)return n(e);n(null)}))}ss(t,((u,o)=>u?n(u):o?n(null):void os.lstat(e,(u=>{if(u)return u.message=u.message.replace("lstat","ensureLink"),n(u);const o=us.dirname(t);ss(o,((u,i)=>u?n(u):i?r(e,t):void is.mkdirs(o,(u=>{if(u)return n(u);r(e,t)}))))}))))})),createLinkSync:function(e,t){if(os.existsSync(t))return;try{os.lstatSync(e)}catch(e){throw e.message=e.message.replace("lstat","ensureLink"),e}const n=us.dirname(t);return os.existsSync(n)||is.mkdirsSync(n),os.linkSync(e,t)}};const as=p.default,ls=we,fs=fi.pathExists;var ds={symlinkPaths:function(e,t,n){if(as.isAbsolute(e))return ls.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:e})));{const r=as.dirname(t),u=as.join(r,e);return fs(u,((t,o)=>t?n(t):o?n(null,{toCwd:u,toDst:e}):ls.lstat(e,(t=>t?(t.message=t.message.replace("lstat","ensureSymlink"),n(t)):n(null,{toCwd:e,toDst:as.relative(r,e)})))))}},symlinkPathsSync:function(e,t){let n;if(as.isAbsolute(e)){if(n=ls.existsSync(e),!n)throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}{const r=as.dirname(t),u=as.join(r,e);if(n=ls.existsSync(u),n)return{toCwd:u,toDst:e};if(n=ls.existsSync(e),!n)throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:as.relative(r,e)}}}};const Ds=we;var ps={symlinkType:function(e,t,n){if(n="function"==typeof t?t:n,t="function"!=typeof t&&t)return n(null,t);Ds.lstat(e,((e,r)=>{if(e)return n(null,"file");t=r&&r.isDirectory()?"dir":"file",n(null,t)}))},symlinkTypeSync:function(e,t){let n;if(t)return t;try{n=Ds.lstatSync(e)}catch(e){return"file"}return n&&n.isDirectory()?"dir":"file"}};const Es=yo.fromCallback,ms=p.default,hs=we,ys=Io.mkdirs,Cs=Io.mkdirsSync,Fs=ds.symlinkPaths,gs=ds.symlinkPathsSync,As=ps.symlinkType,vs=ps.symlinkTypeSync,Ss=fi.pathExists;var ws={createSymlink:Es((function(e,t,n,r){r="function"==typeof n?n:r,n="function"!=typeof n&&n,Ss(t,((u,o)=>u?r(u):o?r(null):void Fs(e,t,((u,o)=>{if(u)return r(u);e=o.toDst,As(o.toCwd,n,((n,u)=>{if(n)return r(n);const o=ms.dirname(t);Ss(o,((n,i)=>n?r(n):i?hs.symlink(e,t,u,r):void ys(o,(n=>{if(n)return r(n);hs.symlink(e,t,u,r)}))))}))}))))})),createSymlinkSync:function(e,t,n){if(hs.existsSync(t))return;const r=gs(e,t);e=r.toDst,n=vs(r.toCwd,n);const u=ms.dirname(t);return hs.existsSync(u)||Cs(u),hs.symlinkSync(e,t,n)}};var Os,bs={createFile:ns.createFile,createFileSync:ns.createFileSync,ensureFile:ns.createFile,ensureFileSync:ns.createFileSync,createLink:cs.createLink,createLinkSync:cs.createLinkSync,ensureLink:cs.createLink,ensureLinkSync:cs.createLinkSync,createSymlink:ws.createSymlink,createSymlinkSync:ws.createSymlinkSync,ensureSymlink:ws.createSymlink,ensureSymlinkSync:ws.createSymlinkSync};try{Os=we}catch(e){Os=D.default}function _s(e,t){var n,r="\n";return"object"==typeof t&&null!==t&&(t.spaces&&(n=t.spaces),t.EOL&&(r=t.EOL)),JSON.stringify(e,t?t.replacer:null,n).replace(/\n/g,r)+r}function Bs(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e=e.replace(/^\uFEFF/,"")}var Ps={readFile:function(e,t,n){null==n&&(n=t,t={}),"string"==typeof t&&(t={encoding:t});var r=(t=t||{}).fs||Os,u=!0;"throws"in t&&(u=t.throws),r.readFile(e,t,(function(r,o){if(r)return n(r);var i;o=Bs(o);try{i=JSON.parse(o,t?t.reviver:null)}catch(t){return u?(t.message=e+": "+t.message,n(t)):n(null,null)}n(null,i)}))},readFileSync:function(e,t){"string"==typeof(t=t||{})&&(t={encoding:t});var n=t.fs||Os,r=!0;"throws"in t&&(r=t.throws);try{var u=n.readFileSync(e,t);return u=Bs(u),JSON.parse(u,t.reviver)}catch(t){if(r)throw t.message=e+": "+t.message,t;return null}},writeFile:function(e,t,n,r){null==r&&(r=n,n={});var u=(n=n||{}).fs||Os,o="";try{o=_s(t,n)}catch(e){return void(r&&r(e,null))}u.writeFile(e,o,n,r)},writeFileSync:function(e,t,n){var r=(n=n||{}).fs||Os,u=_s(t,n);return r.writeFileSync(e,u,n)}},ks=Ps;const xs=yo.fromCallback,Ns=ks;var Is={readJson:xs(Ns.readFile),readJsonSync:Ns.readFileSync,writeJson:xs(Ns.writeFile),writeJsonSync:Ns.writeFileSync};const Ts=p.default,Rs=Io,Ms=fi.pathExists,Ls=Is;var js=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=Ts.dirname(e);Ms(u,((o,i)=>o?r(o):i?Ls.writeJson(e,t,n,r):void Rs.mkdirs(u,(u=>{if(u)return r(u);Ls.writeJson(e,t,n,r)}))))};const $s=we,Hs=p.default,Js=Io,Gs=Is;var Vs=function(e,t,n){const r=Hs.dirname(e);$s.existsSync(r)||Js.mkdirsSync(r),Gs.writeJsonSync(e,t,n)};const Us=yo.fromCallback,Ws=Is;Ws.outputJson=Us(js),Ws.outputJsonSync=Vs,Ws.outputJSON=Ws.outputJson,Ws.outputJSONSync=Ws.outputJsonSync,Ws.writeJSON=Ws.writeJson,Ws.writeJSONSync=Ws.writeJsonSync,Ws.readJSON=Ws.readJson,Ws.readJSONSync=Ws.readJsonSync;var zs=Ws;const Ks=we,qs=p.default,Ys=ci.copySync,Xs=Ji.removeSync,Zs=Io.mkdirpSync,Qs=Zo;function ec(e,t,n){try{Ks.renameSync(e,t)}catch(r){if("EXDEV"!==r.code)throw r;return function(e,t,n){const r={overwrite:n,errorOnExist:!0};return Ys(e,t,r),Xs(e)}(e,t,n)}}var tc=function(e,t,n){const r=(n=n||{}).overwrite||n.clobber||!1,{srcStat:u}=Qs.checkPathsSync(e,t,"move");return Qs.checkParentPathsSync(e,u,t,"move"),Zs(qs.dirname(t)),function(e,t,n){if(n)return Xs(t),ec(e,t,n);if(Ks.existsSync(t))throw new Error("dest already exists.");return ec(e,t,n)}(e,t,r)},nc={moveSync:tc};const rc=we,uc=p.default,oc=bi.copy,ic=Ji.remove,sc=Io.mkdirp,cc=fi.pathExists,ac=Zo;function lc(e,t,n,r){rc.rename(e,t,(u=>u?"EXDEV"!==u.code?r(u):function(e,t,n,r){const u={overwrite:n,errorOnExist:!0};oc(e,t,u,(t=>t?r(t):ic(e,r)))}(e,t,n,r):r()))}var fc=function(e,t,n,r){"function"==typeof n&&(r=n,n={});const u=n.overwrite||n.clobber||!1;ac.checkPaths(e,t,"move",((n,o)=>{if(n)return r(n);const{srcStat:i}=o;ac.checkParentPaths(e,i,t,"move",(n=>{if(n)return r(n);sc(uc.dirname(t),(n=>n?r(n):function(e,t,n,r){if(n)return ic(t,(u=>u?r(u):lc(e,t,n,r)));cc(t,((u,o)=>u?r(u):o?r(new Error("dest already exists.")):lc(e,t,n,r)))}(e,t,u,r)))}))}))};var dc={move:(0,yo.fromCallback)(fc)};const Dc=yo.fromCallback,pc=we,Ec=p.default,mc=Io,hc=fi.pathExists;var yc={outputFile:Dc((function(e,t,n,r){"function"==typeof n&&(r=n,n="utf8");const u=Ec.dirname(e);hc(u,((o,i)=>o?r(o):i?pc.writeFile(e,t,n,r):void mc.mkdirs(u,(u=>{if(u)return r(u);pc.writeFile(e,t,n,r)}))))})),outputFileSync:function(e,...t){const n=Ec.dirname(e);if(pc.existsSync(n))return pc.writeFileSync(e,...t);mc.mkdirsSync(n),pc.writeFileSync(e,...t)}};!function(e){e.exports=Object.assign({},ho,ci,bi,Yi,bs,zs,Io,nc,dc,yc,fi,Ji);const t=D.default;Object.getOwnPropertyDescriptor(t,"promises")&&Object.defineProperty(e.exports,"promises",{get:()=>t.promises})}(mo);const Cc=Nr.exports("streamroller:fileNameFormatter"),Fc=p.default;const gc=Nr.exports("streamroller:fileNameParser"),Ac=nu.exports;const vc=Nr.exports("streamroller:moveAndMaybeCompressFile"),Sc=mo.exports,wc=v.default;var Oc=async(e,t,n)=>{if(n=function(e){const t={mode:parseInt("0600",8),compress:!1},n=Object.assign({},t,e);return vc(`_parseOption: moveAndMaybeCompressFile called with option=${JSON.stringify(n)}`),n}(n),e!==t){if(await Sc.pathExists(e))if(vc(`moveAndMaybeCompressFile: moving file from ${e} to ${t} ${n.compress?"with":"without"} compress`),n.compress)await new Promise(((r,u)=>{let o=!1;const i=Sc.createWriteStream(t,{mode:n.mode,flags:"wx"}).on("open",(()=>{o=!0;const t=Sc.createReadStream(e).on("open",(()=>{t.pipe(wc.createGzip()).pipe(i)})).on("error",(t=>{vc(`moveAndMaybeCompressFile: error reading ${e}`,t),i.destroy(t)}))})).on("finish",(()=>{vc(`moveAndMaybeCompressFile: finished compressing ${t}, deleting ${e}`),Sc.unlink(e).then(r).catch((t=>{vc(`moveAndMaybeCompressFile: error deleting ${e}, truncating instead`,t),Sc.truncate(e).then(r).catch((t=>{vc(`moveAndMaybeCompressFile: error truncating ${e}`,t),u(t)}))}))})).on("error",(e=>{o?(vc(`moveAndMaybeCompressFile: error writing ${t}, deleting`,e),Sc.unlink(t).then((()=>{u(e)})).catch((e=>{vc(`moveAndMaybeCompressFile: error deleting ${t}`,e),u(e)}))):(vc(`moveAndMaybeCompressFile: error creating ${t}`,e),u(e))}))})).catch((()=>{}));else{vc(`moveAndMaybeCompressFile: renaming ${e} to ${t}`);try{await Sc.move(e,t,{overwrite:!0})}catch(n){if(vc(`moveAndMaybeCompressFile: error renaming ${e} to ${t}`,n),"ENOENT"!==n.code){vc("moveAndMaybeCompressFile: trying copy+truncate instead");try{await Sc.copy(e,t,{overwrite:!0}),await Sc.truncate(e)}catch(e){vc("moveAndMaybeCompressFile: error copy+truncate",e)}}}}}else vc("moveAndMaybeCompressFile: source and target are the same, not doing anything")};const bc=Nr.exports("streamroller:RollingFileWriteStream"),_c=mo.exports,Bc=p.default,Pc=E.default,kc=()=>new Date,xc=nu.exports,{Writable:Nc}=C.default,Ic=({file:e,keepFileExt:t,needsIndex:n,alwaysIncludeDate:r,compress:u,fileNameSep:o})=>{let i=o||".";const s=Fc.join(e.dir,e.name),c=t=>t+e.ext,a=(e,t,r)=>!n&&r||!t?e:e+i+t,l=(e,t,n)=>(t>0||r)&&n?e+i+n:e,f=(e,t)=>t&&u?e+".gz":e,d=t?[l,a,c,f]:[c,l,a,f];return({date:e,index:t})=>(Cc(`_formatFileName: date=${e}, index=${t}`),d.reduce(((n,r)=>r(n,t,e)),s))},Tc=({file:e,keepFileExt:t,pattern:n,fileNameSep:r})=>{let u=r||".";const o="__NOT_MATCHING__";let i=[(e,t)=>e.endsWith(".gz")?(gc("it is gzipped"),t.isCompressed=!0,e.slice(0,-1*".gz".length)):e,t?t=>t.startsWith(e.name)&&t.endsWith(e.ext)?(gc("it starts and ends with the right things"),t.slice(e.name.length+1,-1*e.ext.length)):o:t=>t.startsWith(e.base)?(gc("it starts with the right things"),t.slice(e.base.length+1)):o,n?(e,t)=>{const r=e.split(u);let o=r[r.length-1];gc("items: ",r,", indexStr: ",o);let i=e;void 0!==o&&o.match(/^\d+$/)?(i=e.slice(0,-1*(o.length+1)),gc(`dateStr is ${i}`),n&&!i&&(i=o,o="0")):o="0";try{const r=Ac.parse(n,i,new Date(0,0));return Ac.asString(n,r)!==i?e:(t.index=parseInt(o,10),t.date=i,t.timestamp=r.getTime(),"")}catch(t){return gc(`Problem parsing ${i} as ${n}, error was: `,t),e}}:(e,t)=>e.match(/^\d+$/)?(gc("it has an index"),t.index=parseInt(e,10),""):e];return e=>{let t={filename:e,index:0,isCompressed:!1};return i.reduce(((e,n)=>n(e,t)),e)?null:t}},Rc=Oc;var Mc=class extends Nc{constructor(e,t){if(bc(`constructor: creating RollingFileWriteStream. path=${e}`),"string"!=typeof e||0===e.length)throw new Error(`Invalid filename: ${e}`);if(e.endsWith(Bc.sep))throw new Error(`Filename is a directory: ${e}`);0===e.indexOf(`~${Bc.sep}`)&&(e=e.replace("~",Pc.homedir())),super(t),this.options=this._parseOption(t),this.fileObject=Bc.parse(e),""===this.fileObject.dir&&(this.fileObject=Bc.parse(Bc.join(process.cwd(),e))),this.fileFormatter=Ic({file:this.fileObject,alwaysIncludeDate:this.options.alwaysIncludePattern,needsIndex:this.options.maxSize 0`)}else delete n.maxSize;if(n.numBackups||0===n.numBackups){if(n.numBackups<0)throw new Error(`options.numBackups (${n.numBackups}) should be >= 0`);if(n.numBackups>=Number.MAX_SAFE_INTEGER)throw new Error(`options.numBackups (${n.numBackups}) should be < Number.MAX_SAFE_INTEGER`);n.numToKeep=n.numBackups+1}else if(n.numToKeep<=0)throw new Error(`options.numToKeep (${n.numToKeep}) should be > 0`);return bc(`_parseOption: creating stream with option=${JSON.stringify(n)}`),n}_final(e){this.currentFileStream.end("",this.options.encoding,e)}_write(e,t,n){this._shouldRoll().then((()=>{bc(`_write: writing chunk. file=${this.currentFileStream.path} state=${JSON.stringify(this.state)} chunk=${e}`),this.currentFileStream.write(e,t,(t=>{this.state.currentSize+=e.length,n(t)}))}))}async _shouldRoll(){(this._dateChanged()||this._tooBig())&&(bc(`_shouldRoll: rolling because dateChanged? ${this._dateChanged()} or tooBig? ${this._tooBig()}`),await this._roll())}_dateChanged(){return this.state.currentDate&&this.state.currentDate!==xc(this.options.pattern,kc())}_tooBig(){return this.state.currentSize>=this.options.maxSize}_roll(){return bc("_roll: closing the current stream"),new Promise(((e,t)=>{this.currentFileStream.end("",this.options.encoding,(()=>{this._moveOldFiles().then(e).catch(t)}))}))}async _moveOldFiles(){const e=await this._getExistingFiles();for(let t=(this.state.currentDate?e.filter((e=>e.date===this.state.currentDate)):e).length;t>=0;t--){bc(`_moveOldFiles: i = ${t}`);const e=this.fileFormatter({date:this.state.currentDate,index:t}),n=this.fileFormatter({date:this.state.currentDate,index:t+1}),r={compress:this.options.compress&&0===t,mode:this.options.mode};await Rc(e,n,r)}this.state.currentSize=0,this.state.currentDate=this.state.currentDate?xc(this.options.pattern,kc()):null,bc(`_moveOldFiles: finished rolling files. state=${JSON.stringify(this.state)}`),this._renewWriteStream(),await new Promise(((e,t)=>{this.currentFileStream.write("","utf8",(()=>{this._clean().then(e).catch(t)}))}))}async _getExistingFiles(){const e=await _c.readdir(this.fileObject.dir).catch((()=>[]));bc(`_getExistingFiles: files=${e}`);const t=e.map((e=>this.fileNameParser(e))).filter((e=>e)),n=e=>(e.timestamp?e.timestamp:kc().getTime())-e.index;return t.sort(((e,t)=>n(e)-n(t))),t}_renewWriteStream(){const e=this.fileFormatter({date:this.state.currentDate,index:0}),t=e=>{try{return _c.mkdirSync(e,{recursive:!0})}catch(n){if("ENOENT"===n.code)return t(Bc.dirname(e)),t(e);if("EEXIST"!==n.code&&"EROFS"!==n.code)throw n;try{if(_c.statSync(e).isDirectory())return e;throw n}catch(e){throw n}}};t(this.fileObject.dir);const n={flags:this.options.flags,encoding:this.options.encoding,mode:this.options.mode};var r,u;_c.appendFileSync(e,"",(r={...n},u="flags",r["flag"]=r[u],delete r[u],r)),this.currentFileStream=_c.createWriteStream(e,n),this.currentFileStream.on("error",(e=>{this.emit("error",e)}))}async _clean(){const e=await this._getExistingFiles();if(bc(`_clean: numToKeep = ${this.options.numToKeep}, existingFiles = ${e.length}`),bc("_clean: existing files are: ",e),this._tooManyFiles(e.length)){const n=e.slice(0,e.length-this.options.numToKeep).map((e=>Bc.format({dir:this.fileObject.dir,base:e.filename})));await(t=n,bc(`deleteFiles: files to delete: ${t}`),Promise.all(t.map((e=>_c.unlink(e).catch((t=>{bc(`deleteFiles: error when unlinking ${e}, ignoring. Error was ${t}`)}))))))}var t}_tooManyFiles(e){return this.options.numToKeep>0&&e>this.options.numToKeep}};const Lc=Mc;var jc=class extends Lc{constructor(e,t,n,r){r||(r={}),t&&(r.maxSize=t),r.numBackups||0===r.numBackups||(n||0===n||(n=1),r.numBackups=n),super(e,r),this.backups=r.numBackups,this.size=this.options.maxSize}get theStream(){return this.currentFileStream}};const $c=Mc;var Hc={RollingFileWriteStream:Mc,RollingFileStream:jc,DateRollingFileStream:class extends $c{constructor(e,t,n){t&&"object"==typeof t&&(n=t,t=null),n||(n={}),t||(t="yyyy-MM-dd"),n.pattern=t,n.numBackups||0===n.numBackups?n.daysToKeep=n.numBackups:(n.daysToKeep||0===n.daysToKeep?process.emitWarning("options.daysToKeep is deprecated due to the confusion it causes when used together with file size rolling. Please use options.numBackups instead.","DeprecationWarning","streamroller-DEP0001"):n.daysToKeep=1,n.numBackups=n.daysToKeep),super(e,n),this.mode=this.options.mode}get theStream(){return this.currentFileStream}}};const Jc=Nr.exports("log4js:file"),Gc=p.default,Vc=Hc,Uc=E.default.EOL;let Wc=!1;const zc=new Set;function Kc(){zc.forEach((e=>{e.sighupHandler()}))}function qc(e,t,n,r){const u=new Vc.RollingFileStream(e,t,n,r);return u.on("error",(t=>{console.error("log4js.fileAppender - Writing to file %s, error happened ",e,t)})),u.on("drain",(()=>{process.emit("log4js:pause",!1)})),u}Eo.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.mode=e.mode||384,function(e,t,n,r,u,o){e=Gc.normalize(e),Jc("Creating file appender (",e,", ",n,", ",r=r||0===r?r:5,", ",u,", ",o,")");let i=qc(e,n,r,u);const s=function(e){if(i.writable){if(!0===u.removeColor){const t=/\x1b[[0-9;]*m/g;e.data=e.data.map((e=>"string"==typeof e?e.replace(t,""):e))}i.write(t(e,o)+Uc,"utf8")||process.emit("log4js:pause",!0)}};return s.reopen=function(){i.end((()=>{i=qc(e,n,r,u)}))},s.sighupHandler=function(){Jc("SIGHUP handler called."),s.reopen()},s.shutdown=function(e){zc.delete(s),0===zc.size&&Wc&&(process.removeListener("SIGHUP",Kc),Wc=!1),i.end("","utf-8",e)},zc.add(s),Wc||(process.on("SIGHUP",Kc),Wc=!0),s}(e.filename,n,e.maxLogSize,e.backups,e,e.timezoneOffset)};var Yc={};const Xc=Hc,Zc=E.default.EOL;function Qc(e,t,n,r,u){r.maxSize=r.maxLogSize;const o=function(e,t,n){const r=new Xc.DateRollingFileStream(e,t,n);return r.on("error",(t=>{console.error("log4js.dateFileAppender - Writing to file %s, error happened ",e,t)})),r.on("drain",(()=>{process.emit("log4js:pause",!1)})),r}(e,t,r),i=function(e){o.writable&&(o.write(n(e,u)+Zc,"utf8")||process.emit("log4js:pause",!0))};return i.shutdown=function(e){o.end("","utf-8",e)},i}Yc.configure=function(e,t){let n=t.basicLayout;return e.layout&&(n=t.layout(e.layout.type,e.layout)),e.alwaysIncludePattern||(e.alwaysIncludePattern=!1),e.mode=e.mode||384,Qc(e.filename,e.pattern,n,e,e.timezoneOffset)};var ea={};const ta=Nr.exports("log4js:fileSync"),na=p.default,ra=D.default,ua=E.default.EOL||"\n";function oa(e,t){if(ra.existsSync(e))return;const n=ra.openSync(e,t.flags,t.mode);ra.closeSync(n)}class ia{constructor(e,t,n,r){ta("In RollingFileStream"),function(){if(!e||!t||t<=0)throw new Error("You must specify a filename and file size")}(),this.filename=e,this.size=t,this.backups=n,this.options=r,this.currentSize=0,this.currentSize=function(e){let t=0;try{t=ra.statSync(e).size}catch(t){oa(e,r)}return t}(this.filename)}shouldRoll(){return ta("should roll with current size %d, and max size %d",this.currentSize,this.size),this.currentSize>=this.size}roll(e){const t=this,n=new RegExp(`^${na.basename(e)}`);function r(e){return n.test(e)}function u(t){return parseInt(t.substring(`${na.basename(e)}.`.length),10)||0}function o(e,t){return u(e)>u(t)?1:u(e) ${e}.${r+1}`),ra.renameSync(na.join(na.dirname(e),n),`${e}.${r+1}`)}}ta("Rolling, rolling, rolling"),ta("Renaming the old files"),ra.readdirSync(na.dirname(e)).filter(r).sort(o).reverse().forEach(i)}write(e,t){const n=this;ta("in write"),this.shouldRoll()&&(this.currentSize=0,this.roll(this.filename)),ta("writing the chunk to the file"),n.currentSize+=e.length,ra.appendFileSync(n.filename,e)}}ea.configure=function(e,t){let n=t.basicLayout;e.layout&&(n=t.layout(e.layout.type,e.layout));const r={flags:e.flags||"a",encoding:e.encoding||"utf8",mode:e.mode||384};return function(e,t,n,r,u,o){ta("fileSync appender created");const i=function(e,t,n){let r;var u;return t?r=new ia(e,t,n,o):(oa(u=e,o),r={write(e){ra.appendFileSync(u,e)}}),r}(e=na.normalize(e),n,r=r||0===r?r:5);return e=>{i.write(t(e,u)+ua)}}(e.filename,n,e.maxLogSize,e.backups,e.timezoneOffset,r)};var sa={};const ca=Nr.exports("log4js:tcp"),aa=S.default;sa.configure=function(e,t){ca(`configure with config = ${e}`);let n=function(e){return e.serialise()};return e.layout&&(n=t.layout(e.layout.type,e.layout)),function(e,t){let n=!1;const r=[];let u,o=3,i="__LOG4JS__";function s(e){ca("Writing log event to socket"),n=u.write(`${t(e)}${i}`,"utf8")}function c(){let e;for(ca("emptying buffer");e=r.shift();)s(e)}function a(e){n?s(e):(ca("buffering log event because it cannot write at the moment"),r.push(e))}return function t(){ca(`appender creating socket to ${e.host||"localhost"}:${e.port||5e3}`),i=`${e.endMsg||"__LOG4JS__"}`,u=aa.createConnection(e.port||5e3,e.host||"localhost"),u.on("connect",(()=>{ca("socket connected"),c(),n=!0})),u.on("drain",(()=>{ca("drain event received, emptying buffer"),n=!0,c()})),u.on("timeout",u.end.bind(u)),u.on("error",(e=>{ca("connection error",e),n=!1,c()})),u.on("close",t)}(),a.shutdown=function(e){ca("shutdown called"),r.length&&o?(ca("buffer has items, waiting 100ms to empty"),o-=1,setTimeout((()=>{a.shutdown(e)}),100)):(u.removeAllListeners("close"),u.end(e))},a}(e,n)};const la=p.default,fa=Nr.exports("log4js:appenders"),da=tu,Da=eo,pa=gu,Ea=hu,ma=to,ha=new Map;ha.set("console",oo),ha.set("stdout",so),ha.set("stderr",co),ha.set("logLevelFilter",ao),ha.set("categoryFilter",lo),ha.set("noLogFilter",Do),ha.set("file",Eo),ha.set("dateFile",Yc),ha.set("fileSync",ea),ha.set("tcp",sa);const ya=new Map,Ca=(e,t)=>{fa("Loading module from ",e);try{return require(e)}catch(n){return void da.throwExceptionIf(t,"MODULE_NOT_FOUND"!==n.code,`appender "${e}" could not be loaded (error was: ${n})`)}},Fa=new Set,ga=(e,t)=>{if(ya.has(e))return ya.get(e);if(!t.appenders[e])return!1;if(Fa.has(e))throw new Error(`Dependency loop detected for appender ${e}.`);Fa.add(e),fa(`Creating appender ${e}`);const n=Aa(e,t);return Fa.delete(e),ya.set(e,n),n},Aa=(e,t)=>{const n=t.appenders[e],r=n.type.configure?n.type:((e,t)=>ha.get(e)||Ca(`./${e}`,t)||Ca(e,t)||require.main&&Ca(la.join(la.dirname(require.main.filename),e),t)||Ca(la.join(process.cwd(),e),t))(n.type,t);return da.throwExceptionIf(t,da.not(r),`appender "${e}" is not valid (type "${n.type}" could not be found)`),r.appender&&fa(`DEPRECATION: Appender ${n.type} exports an appender function.`),r.shutdown&&fa(`DEPRECATION: Appender ${n.type} exports a shutdown function.`),fa(`${e}: clustering.isMaster ? ${Da.isMaster()}`),fa(`${e}: appenderModule is ${F.default.inspect(r)}`),Da.onlyOnMaster((()=>(fa(`calling appenderModule.configure for ${e} / ${n.type}`),r.configure(ma.modifyConfig(n),Ea,(e=>ga(e,t)),pa))),(()=>{}))},va=e=>{ya.clear(),Fa.clear();const t=[];Object.values(e.categories).forEach((e=>{t.push(...e.appenders)})),Object.keys(e.appenders).forEach((n=>{(t.includes(n)||"tcp-server"===e.appenders[n].type)&&ga(n,e)}))},Sa=()=>{va({appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"trace"}}})};Sa(),da.addListener((e=>{da.throwExceptionIf(e,da.not(da.anObject(e.appenders)),'must have a property "appenders" of type object.');const t=Object.keys(e.appenders);da.throwExceptionIf(e,da.not(t.length),"must define at least one appender."),t.forEach((t=>{da.throwExceptionIf(e,da.not(e.appenders[t].type),`appender "${t}" is not valid (must be an object with property "type")`)}))})),da.addListener(va),Au.exports=ya,Au.exports.init=Sa;var wa={exports:{}};!function(e){const t=Nr.exports("log4js:categories"),n=tu,r=gu,u=Au.exports,o=new Map;function i(e,t,n){if(!1===t.inherit)return;const r=n.lastIndexOf(".");if(r<0)return;const u=n.substring(0,r);let o=e.categories[u];o||(o={inherit:!0,appenders:[]}),i(e,o,u),!e.categories[u]&&o.appenders&&o.appenders.length&&o.level&&(e.categories[u]=o),t.appenders=t.appenders||[],t.level=t.level||o.level,o.appenders.forEach((e=>{t.appenders.includes(e)||t.appenders.push(e)})),t.parent=o}function s(e){if(!e.categories)return;Object.keys(e.categories).forEach((t=>{const n=e.categories[t];i(e,n,t)}))}n.addPreProcessingListener((e=>s(e))),n.addListener((e=>{n.throwExceptionIf(e,n.not(n.anObject(e.categories)),'must have a property "categories" of type object.');const t=Object.keys(e.categories);n.throwExceptionIf(e,n.not(t.length),"must define at least one category."),t.forEach((t=>{const o=e.categories[t];n.throwExceptionIf(e,[n.not(o.appenders),n.not(o.level)],`category "${t}" is not valid (must be an object with properties "appenders" and "level")`),n.throwExceptionIf(e,n.not(Array.isArray(o.appenders)),`category "${t}" is not valid (appenders must be an array of appender names)`),n.throwExceptionIf(e,n.not(o.appenders.length),`category "${t}" is not valid (appenders must contain at least one appender name)`),Object.prototype.hasOwnProperty.call(o,"enableCallStack")&&n.throwExceptionIf(e,"boolean"!=typeof o.enableCallStack,`category "${t}" is not valid (enableCallStack must be boolean type)`),o.appenders.forEach((r=>{n.throwExceptionIf(e,n.not(u.get(r)),`category "${t}" is not valid (appender "${r}" is not defined)`)})),n.throwExceptionIf(e,n.not(r.getLevel(o.level)),`category "${t}" is not valid (level "${o.level}" not recognised; valid levels are ${r.levels.join(", ")})`)})),n.throwExceptionIf(e,n.not(e.categories.default),'must define a "default" category.')}));const c=e=>{o.clear();Object.keys(e.categories).forEach((n=>{const i=e.categories[n],s=[];i.appenders.forEach((e=>{s.push(u.get(e)),t(`Creating category ${n}`),o.set(n,{appenders:s,level:r.getLevel(i.level),enableCallStack:i.enableCallStack||!1})}))}))},a=()=>{c({categories:{default:{appenders:["out"],level:"OFF"}}})};a(),n.addListener(c);const l=e=>(t(`configForCategory: searching for config for ${e}`),o.has(e)?(t(`configForCategory: ${e} exists in config, returning it`),o.get(e)):e.indexOf(".")>0?(t(`configForCategory: ${e} has hierarchy, searching for parents`),l(e.substring(0,e.lastIndexOf(".")))):(t("configForCategory: returning config for default category"),l("default")));e.exports=o,e.exports=Object.assign(e.exports,{appendersForCategory:e=>l(e).appenders,getLevelForCategory:e=>l(e).level,setLevelForCategory:(e,n)=>{let r=o.get(e);if(t(`setLevelForCategory: found ${r} for ${e}`),!r){const n=l(e);t(`setLevelForCategory: no config found for category, found ${n} for parents of ${e}`),r={appenders:n.appenders}}r.level=n,o.set(e,r)},getEnableCallStackForCategory:e=>!0===l(e).enableCallStack,setEnableCallStackForCategory:(e,t)=>{l(e).enableCallStack=t},init:a})}(wa);const Oa=Nr.exports("log4js:logger"),ba=Hu,_a=gu,Ba=eo,Pa=wa.exports,ka=tu,xa=/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;function Na(e,t=4){const n=e.stack.split("\n").slice(t),r=xa.exec(n[0]);return r&&6===r.length?{functionName:r[1],fileName:r[2],lineNumber:parseInt(r[3],10),columnNumber:parseInt(r[4],10),callStack:n.join("\n")}:null}class Ia{constructor(e){if(!e)throw new Error("No category provided.");this.category=e,this.context={},this.parseCallStack=Na,Oa(`Logger created (${this.category}, ${this.level})`)}get level(){return _a.getLevel(Pa.getLevelForCategory(this.category),_a.TRACE)}set level(e){Pa.setLevelForCategory(this.category,_a.getLevel(e,this.level))}get useCallStack(){return Pa.getEnableCallStackForCategory(this.category)}set useCallStack(e){Pa.setEnableCallStackForCategory(this.category,!0===e)}log(e,...t){let n=_a.getLevel(e);n||(this._log(_a.WARN,"log4js:logger.log: invalid value for log-level as first parameter given: ",e),n=_a.INFO),this.isLevelEnabled(n)&&this._log(n,t)}isLevelEnabled(e){return this.level.isLessThanOrEqualTo(e)}_log(e,t){Oa(`sending log data (${e}) to appenders`);const n=new ba(this.category,e,t,this.context,this.useCallStack&&this.parseCallStack(new Error));Ba.send(n)}addContext(e,t){this.context[e]=t}removeContext(e){delete this.context[e]}clearContext(){this.context={}}setParseCallStackFunction(e){this.parseCallStack=e}}function Ta(e){const t=_a.getLevel(e),n=t.toString().toLowerCase().replace(/_([a-z])/g,(e=>e[1].toUpperCase())),r=n[0].toUpperCase()+n.slice(1);Ia.prototype[`is${r}Enabled`]=function(){return this.isLevelEnabled(t)},Ia.prototype[n]=function(...e){this.log(t,...e)}}_a.levels.forEach(Ta),ka.addListener((()=>{_a.levels.forEach(Ta)}));var Ra=Ia;const Ma=gu;function La(e){return e.originalUrl||e.url}function ja(e,t){for(let n=0;ne.source?e.source:e));t=new RegExp(n.join("|"))}return t}(t.nolog);return(e,i,s)=>{if(e._logging)return s();if(o&&o.test(e.originalUrl))return s();if(n.isLevelEnabled(r)||"auto"===t.level){const o=new Date,{writeHead:s}=i;e._logging=!0,i.writeHead=(e,t)=>{i.writeHead=s,i.writeHead(e,t),i.__statusCode=e,i.__headers=t||{}},i.on("finish",(()=>{i.responseTime=new Date-o,i.statusCode&&"auto"===t.level&&(r=Ma.INFO,i.statusCode>=300&&(r=Ma.WARN),i.statusCode>=400&&(r=Ma.ERROR)),r=function(e,t,n){let r=t;if(n){const t=n.find((t=>{let n=!1;return n=t.from&&t.to?e>=t.from&&e<=t.to:-1!==t.codes.indexOf(e),n}));t&&(r=Ma.getLevel(t.level,r))}return r}(i.statusCode,r,t.statusRules);const s=function(e,t,n){const r=[];return r.push({token:":url",replacement:La(e)}),r.push({token:":protocol",replacement:e.protocol}),r.push({token:":hostname",replacement:e.hostname}),r.push({token:":method",replacement:e.method}),r.push({token:":status",replacement:t.__statusCode||t.statusCode}),r.push({token:":response-time",replacement:t.responseTime}),r.push({token:":date",replacement:(new Date).toUTCString()}),r.push({token:":referrer",replacement:e.headers.referer||e.headers.referrer||""}),r.push({token:":http-version",replacement:`${e.httpVersionMajor}.${e.httpVersionMinor}`}),r.push({token:":remote-addr",replacement:e.headers["x-forwarded-for"]||e.ip||e._remoteAddress||e.socket&&(e.socket.remoteAddress||e.socket.socket&&e.socket.socket.remoteAddress)}),r.push({token:":user-agent",replacement:e.headers["user-agent"]}),r.push({token:":content-length",replacement:t.getHeader("content-length")||t.__headers&&t.__headers["Content-Length"]||"-"}),r.push({token:/:req\[([^\]]+)]/g,replacement:(t,n)=>e.headers[n.toLowerCase()]}),r.push({token:/:res\[([^\]]+)]/g,replacement:(e,n)=>t.getHeader(n.toLowerCase())||t.__headers&&t.__headers[n]}),(e=>{const t=e.concat();for(let e=0;eja(e,s)));t&&n.log(r,t)}else n.log(r,ja(u,s));t.context&&n.removeContext("res")}))}return s()}},nl=Va;let rl=!1;function ul(e){if(!rl)return;Ua("Received log event ",e);Za.appendersForCategory(e.categoryName).forEach((t=>{t(e)}))}function ol(e){rl&&il();let t=e;return"string"==typeof t&&(t=function(e){Ua(`Loading configuration from ${e}`);try{return JSON.parse(Wa.readFileSync(e,"utf8"))}catch(t){throw new Error(`Problem reading config from file "${e}". Error was ${t.message}`,t)}}(e)),Ua(`Configuration is ${t}`),Ka.configure(za(t)),el.onMessage(ul),rl=!0,sl}function il(e){Ua("Shutdown called. Disabling all log writing."),rl=!1;const t=Array.from(Xa.values());Xa.init(),Za.init();const n=t.reduceRight(((e,t)=>t.shutdown?e+1:e),0);if(0===n)return Ua("No appenders with shutdown functions found."),void 0!==e&&e();let r,u=0;function o(t){r=r||t,u+=1,Ua(`Appender shutdowns complete: ${u} / ${n}`),u>=n&&(Ua("All shutdown functions completed."),e&&e(r))}return Ua(`Found ${n} appenders with shutdown functions.`),t.filter((e=>e.shutdown)).forEach((e=>e.shutdown(o))),null}const sl={getLogger:function(e){return rl||ol(process.env.LOG4JS_CONFIG||{appenders:{out:{type:"stdout"}},categories:{default:{appenders:["out"],level:"OFF"}}}),new Qa(e||"default")},configure:ol,shutdown:il,connectLogger:tl,levels:Ya,addLayout:qa.addLayout,recording:function(){return nl}};var cl=sl,al={};Object.defineProperty(al,"__esModule",{value:!0}),al.levelMap=al.getLevel=al.setCategoriesLevel=al.getConfiguration=al.setConfiguration=void 0;const ll=cl;let fl={appenders:{debug:{type:"stdout",layout:{type:"pattern",pattern:"[%d] > hvigor %p %c %[%m%]"}},info:{type:"stdout",layout:{type:"pattern",pattern:"[%d] > hvigor %[%m%]"}},"no-pattern-info":{type:"stdout",layout:{type:"pattern",pattern:"%m"}},wrong:{type:"stderr",layout:{type:"pattern",pattern:"[%d] > hvigor %[%p: %m%]"}},"just-debug":{type:"logLevelFilter",appender:"debug",level:"debug",maxLevel:"debug"},"just-info":{type:"logLevelFilter",appender:"info",level:"info",maxLevel:"info"},"just-wrong":{type:"logLevelFilter",appender:"wrong",level:"warn",maxLevel:"error"}},categories:{default:{appenders:["just-debug","just-info","just-wrong"],level:"debug"},"no-pattern-info":{appenders:["no-pattern-info"],level:"info"}}};al.setConfiguration=e=>{fl=e};al.getConfiguration=()=>fl;let dl=ll.levels.DEBUG;al.setCategoriesLevel=(e,t)=>{dl=e;const n=fl.categories;for(const r in n)(null==t?void 0:t.includes(r))||Object.prototype.hasOwnProperty.call(n,r)&&(n[r].level=e.levelStr)};al.getLevel=()=>dl,al.levelMap=new Map([["ALL",ll.levels.ALL],["MARK",ll.levels.MARK],["TRACE",ll.levels.TRACE],["DEBUG",ll.levels.DEBUG],["INFO",ll.levels.INFO],["WARN",ll.levels.WARN],["ERROR",ll.levels.ERROR],["FATAL",ll.levels.FATAL],["OFF",ll.levels.OFF]]);var Dl=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),pl=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),El=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Dl(t,e,n);return pl(t,e),t};Object.defineProperty(xr,"__esModule",{value:!0}),xr.evaluateLogLevel=xr.HvigorLogger=void 0;const ml=El(cl),hl=cl,yl=El(F.default),Cl=al;class Fl{constructor(e){ml.configure((0,Cl.getConfiguration)()),this._logger=ml.getLogger(e),this._logger.level=(0,Cl.getLevel)()}static getLogger(e){return new Fl(e)}log(e,...t){this._logger.log(e,...t)}debug(e,...t){this._logger.debug(e,...t)}info(e,...t){this._logger.info(e,...t)}warn(e,...t){void 0!==e&&""!==e&&this._logger.warn(e,...t)}error(e,...t){this._logger.error(e,...t)}_printTaskExecuteInfo(e,t){this.info(`Finished :${e}... after ${t}`)}_printFailedTaskInfo(e){this.error(`Failed :${e}... `)}_printDisabledTaskInfo(e){this.info(`Disabled :${e}... `)}_printUpToDateTaskInfo(e){this.info(`UP-TO-DATE :${e}... `)}errorMessageExit(e,...t){throw new Error(yl.format(e,...t))}errorExit(e,t,...n){t&&this._logger.error(t,n),this._logger.error(e.stack)}setLevel(e,t){(0,Cl.setCategoriesLevel)(e,t),ml.shutdown(),ml.configure((0,Cl.getConfiguration)())}getLevel(){return this._logger.level}configure(e){const t=(0,Cl.getConfiguration)(),n={appenders:{...t.appenders,...e.appenders},categories:{...t.categories,...e.categories}};(0,Cl.setConfiguration)(n),ml.shutdown(),ml.configure(n)}}xr.HvigorLogger=Fl,xr.evaluateLogLevel=function(e,t){t.debug?e.setLevel(hl.levels.DEBUG):t.warn?e.setLevel(hl.levels.WARN):t.error?e.setLevel(hl.levels.ERROR):e.setLevel(hl.levels.INFO)};var gl=w&&w.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0}),X.parseJsonText=X.parseJsonFile=void 0;const Al=Z,vl=gl(kr),Sl=gl(p.default),wl=gl(E.default),Ol=xr.HvigorLogger.getLogger("parse-json-util");var bl;!function(e){e[e.Char=0]="Char",e[e.EOF=1]="EOF",e[e.Identifier=2]="Identifier"}(bl||(bl={}));let _l,Bl,Pl,kl,xl,Nl,Il="start",Tl=[],Rl=0,Ml=1,Ll=0,jl=!1,$l="default",Hl="'",Jl=1;function Gl(e,t=!1){Bl=String(e),Il="start",Tl=[],Rl=0,Ml=1,Ll=0,kl=void 0,jl=t;do{_l=Vl(),Xl[Il]()}while("eof"!==_l.type);return kl}function Vl(){for($l="default",xl="",Hl="'",Jl=1;;){Nl=Ul();const e=zl[$l]();if(e)return e}}function Ul(){if(Bl[Rl])return String.fromCodePoint(Bl.codePointAt(Rl))}function Wl(){const e=Ul();return"\n"===e?(Ml++,Ll=0):e?Ll+=e.length:Ll++,e&&(Rl+=e.length),e}X.parseJsonFile=function(e,t=!1,n="utf-8"){const r=vl.default.readFileSync(Sl.default.resolve(e),{encoding:n});try{return Gl(r,t)}catch(t){if(t instanceof SyntaxError){const n=t.message.split("at");2===n.length&&Ol.errorMessageExit(`${n[0].trim()}${wl.default.EOL}\t at ${e}:${n[1].trim()}`)}Ol.errorMessageExit(`${e} is not in valid JSON/JSON5 format.`)}},X.parseJsonText=Gl;const zl={default(){switch(Nl){case"/":return Wl(),void($l="comment");case void 0:return Wl(),Kl("eof")}if(!Al.JudgeUtil.isIgnoreChar(Nl)&&!Al.JudgeUtil.isSpaceSeparator(Nl))return zl[Il]();Wl()},start(){$l="value"},beforePropertyName(){switch(Nl){case"$":case"_":return xl=Wl(),void($l="identifierName");case"\\":return Wl(),void($l="identifierNameStartEscape");case"}":return Kl("punctuator",Wl());case'"':case"'":return Hl=Nl,Wl(),void($l="string")}if(Al.JudgeUtil.isIdStartChar(Nl))return xl+=Wl(),void($l="identifierName");throw tf(bl.Char,Wl())},afterPropertyName(){if(":"===Nl)return Kl("punctuator",Wl());throw tf(bl.Char,Wl())},beforePropertyValue(){$l="value"},afterPropertyValue(){switch(Nl){case",":case"}":return Kl("punctuator",Wl())}throw tf(bl.Char,Wl())},beforeArrayValue(){if("]"===Nl)return Kl("punctuator",Wl());$l="value"},afterArrayValue(){switch(Nl){case",":case"]":return Kl("punctuator",Wl())}throw tf(bl.Char,Wl())},end(){throw tf(bl.Char,Wl())},comment(){switch(Nl){case"*":return Wl(),void($l="multiLineComment");case"/":return Wl(),void($l="singleLineComment")}throw tf(bl.Char,Wl())},multiLineComment(){switch(Nl){case"*":return Wl(),void($l="multiLineCommentAsterisk");case void 0:throw tf(bl.Char,Wl())}Wl()},multiLineCommentAsterisk(){switch(Nl){case"*":return void Wl();case"/":return Wl(),void($l="default");case void 0:throw tf(bl.Char,Wl())}Wl(),$l="multiLineComment"},singleLineComment(){switch(Nl){case"\n":case"\r":case"\u2028":case"\u2029":return Wl(),void($l="default");case void 0:return Wl(),Kl("eof")}Wl()},value(){switch(Nl){case"{":case"[":return Kl("punctuator",Wl());case"n":return Wl(),ql("ull"),Kl("null",null);case"t":return Wl(),ql("rue"),Kl("boolean",!0);case"f":return Wl(),ql("alse"),Kl("boolean",!1);case"-":case"+":return"-"===Wl()&&(Jl=-1),void($l="numerical");case".":case"0":case"I":case"N":return void($l="numerical");case'"':case"'":return Hl=Nl,Wl(),xl="",void($l="string")}if(void 0===Nl||!Al.JudgeUtil.isDigitWithoutZero(Nl))throw tf(bl.Char,Wl());$l="numerical"},numerical(){switch(Nl){case".":return xl=Wl(),void($l="decimalPointLeading");case"0":return xl=Wl(),void($l="zero");case"I":return Wl(),ql("nfinity"),Kl("numeric",Jl*(1/0));case"N":return Wl(),ql("aN"),Kl("numeric",NaN)}if(void 0!==Nl&&Al.JudgeUtil.isDigitWithoutZero(Nl))return xl=Wl(),void($l="decimalInteger");throw tf(bl.Char,Wl())},zero(){switch(Nl){case".":case"e":case"E":return void($l="decimal");case"x":case"X":return xl+=Wl(),void($l="hexadecimal")}return Kl("numeric",0)},decimalInteger(){switch(Nl){case".":case"e":case"E":return void($l="decimal")}if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},decimal(){switch(Nl){case".":xl+=Wl(),$l="decimalFraction";break;case"e":case"E":xl+=Wl(),$l="decimalExponent"}},decimalPointLeading(){if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalFraction");throw tf(bl.Char,Wl())},decimalFraction(){switch(Nl){case"e":case"E":return xl+=Wl(),void($l="decimalExponent")}if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},decimalExponent(){switch(Nl){case"+":case"-":return xl+=Wl(),void($l="decimalExponentSign")}if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalExponentInteger");throw tf(bl.Char,Wl())},decimalExponentSign(){if(Al.JudgeUtil.isDigit(Nl))return xl+=Wl(),void($l="decimalExponentInteger");throw tf(bl.Char,Wl())},decimalExponentInteger(){if(!Al.JudgeUtil.isDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},hexadecimal(){if(Al.JudgeUtil.isHexDigit(Nl))return xl+=Wl(),void($l="hexadecimalInteger");throw tf(bl.Char,Wl())},hexadecimalInteger(){if(!Al.JudgeUtil.isHexDigit(Nl))return Kl("numeric",Jl*Number(xl));xl+=Wl()},identifierNameStartEscape(){if("u"!==Nl)throw tf(bl.Char,Wl());Wl();const e=Yl();switch(e){case"$":case"_":break;default:if(!Al.JudgeUtil.isIdStartChar(e))throw tf(bl.Identifier)}xl+=e,$l="identifierName"},identifierName(){switch(Nl){case"$":case"_":case"‌":case"‍":return void(xl+=Wl());case"\\":return Wl(),void($l="identifierNameEscape")}if(!Al.JudgeUtil.isIdContinueChar(Nl))return Kl("identifier",xl);xl+=Wl()},identifierNameEscape(){if("u"!==Nl)throw tf(bl.Char,Wl());Wl();const e=Yl();switch(e){case"$":case"_":case"‌":case"‍":break;default:if(!Al.JudgeUtil.isIdContinueChar(e))throw tf(bl.Identifier)}xl+=e,$l="identifierName"},string(){switch(Nl){case"\\":return Wl(),void(xl+=function(){const e=Ul(),t=function(){switch(Ul()){case"b":return Wl(),"\b";case"f":return Wl(),"\f";case"n":return Wl(),"\n";case"r":return Wl(),"\r";case"t":return Wl(),"\t";case"v":return Wl(),"\v"}return}();if(t)return t;switch(e){case"0":if(Wl(),Al.JudgeUtil.isDigit(Ul()))throw tf(bl.Char,Wl());return"\0";case"x":return Wl(),function(){let e="",t=Ul();if(!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());if(e+=Wl(),t=Ul(),!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());return e+=Wl(),String.fromCodePoint(parseInt(e,16))}();case"u":return Wl(),Yl();case"\n":case"\u2028":case"\u2029":return Wl(),"";case"\r":return Wl(),"\n"===Ul()&&Wl(),""}if(void 0===e||Al.JudgeUtil.isDigitWithoutZero(e))throw tf(bl.Char,Wl());return Wl()}());case'"':case"'":if(Nl===Hl){const e=Kl("string",xl);return Wl(),e}return void(xl+=Wl());case"\n":case"\r":case void 0:throw tf(bl.Char,Wl());case"\u2028":case"\u2029":!function(e){Ol.warn(`JSON5: '${ef(e)}' in strings is not valid ECMAScript; consider escaping.`)}(Nl)}xl+=Wl()}};function Kl(e,t){return{type:e,value:t,line:Ml,column:Ll}}function ql(e){for(const t of e){if(Ul()!==t)throw tf(bl.Char,Wl());Wl()}}function Yl(){let e="",t=4;for(;t-- >0;){const t=Ul();if(!Al.JudgeUtil.isHexDigit(t))throw tf(bl.Char,Wl());e+=Wl()}return String.fromCodePoint(parseInt(e,16))}const Xl={start(){if("eof"===_l.type)throw tf(bl.EOF);Zl()},beforePropertyName(){switch(_l.type){case"identifier":case"string":return Pl=_l.value,void(Il="afterPropertyName");case"punctuator":return void Ql();case"eof":throw tf(bl.EOF)}},afterPropertyName(){if("eof"===_l.type)throw tf(bl.EOF);Il="beforePropertyValue"},beforePropertyValue(){if("eof"===_l.type)throw tf(bl.EOF);Zl()},afterPropertyValue(){if("eof"===_l.type)throw tf(bl.EOF);switch(_l.value){case",":return void(Il="beforePropertyName");case"}":Ql()}},beforeArrayValue(){if("eof"===_l.type)throw tf(bl.EOF);"punctuator"!==_l.type||"]"!==_l.value?Zl():Ql()},afterArrayValue(){if("eof"===_l.type)throw tf(bl.EOF);switch(_l.value){case",":return void(Il="beforeArrayValue");case"]":Ql()}},end(){}};function Zl(){const e=function(){let e;switch(_l.type){case"punctuator":switch(_l.value){case"{":e={};break;case"[":e=[]}break;case"null":case"boolean":case"numeric":case"string":e=_l.value}return e}();if(jl&&"object"==typeof e&&(e._line=Ml,e._column=Ll),void 0===kl)kl=e;else{const t=Tl[Tl.length-1];Array.isArray(t)?jl&&"object"!=typeof e?t.push({value:e,_line:Ml,_column:Ll}):t.push(e):t[Pl]=jl&&"object"!=typeof e?{value:e,_line:Ml,_column:Ll}:e}!function(e){if(e&&"object"==typeof e)Tl.push(e),Il=Array.isArray(e)?"beforeArrayValue":"beforePropertyName";else{const e=Tl[Tl.length-1];Il=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}}(e)}function Ql(){Tl.pop();const e=Tl[Tl.length-1];Il=e?Array.isArray(e)?"afterArrayValue":"afterPropertyValue":"end"}function ef(e){const t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return`\\x${`00${t}`.substring(t.length)}`}return e}function tf(e,t){let n="";switch(e){case bl.Char:n=void 0===t?`JSON5: invalid end of input at ${Ml}:${Ll}`:`JSON5: invalid character '${ef(t)}' at ${Ml}:${Ll}`;break;case bl.EOF:n=`JSON5: invalid end of input at ${Ml}:${Ll}`;break;case bl.Identifier:Ll-=5,n=`JSON5: invalid identifier character at ${Ml}:${Ll}`}const r=new nf(n);return r.lineNumber=Ml,r.columnNumber=Ll,r}class nf extends SyntaxError{}var rf=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),uf=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),of=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&rf(t,e,n);return uf(t,e),t};Object.defineProperty(Y,"__esModule",{value:!0});var sf=Y.cleanWorkSpace=Ff=Y.executeInstallHvigor=yf=Y.isHvigorInstalled=mf=Y.isAllDependenciesInstalled=void 0;const cf=of(D.default),af=of(p.default),lf=b,ff=j,df=$,Df=X;let pf,Ef;var mf=Y.isAllDependenciesInstalled=function(){function e(e){const t=null==e?void 0:e.dependencies;return void 0===t?0:Object.getOwnPropertyNames(t).length}if(pf=gf(),Ef=Af(),e(pf)+1!==e(Ef))return!1;for(const e in null==pf?void 0:pf.dependencies)if(!(0,ff.hasNpmPackInPaths)(e,[lf.HVIGOR_PROJECT_DEPENDENCIES_HOME])||!hf(e,pf,Ef))return!1;return!0};function hf(e,t,n){return void 0!==n.dependencies&&(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,t.dependencies[e])===n.dependencies[e]}var yf=Y.isHvigorInstalled=function(){return pf=gf(),Ef=Af(),(0,ff.hasNpmPackInPaths)(lf.HVIGOR_ENGINE_PACKAGE_NAME,[lf.HVIGOR_PROJECT_DEPENDENCIES_HOME])&&(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,pf.hvigorVersion)===Ef.dependencies[lf.HVIGOR_ENGINE_PACKAGE_NAME]};const Cf={cwd:lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,stdio:["inherit","inherit","inherit"]};var Ff=Y.executeInstallHvigor=function(){(0,df.logInfoPrintConsole)("Hvigor installing...");const e={dependencies:{}};e.dependencies[lf.HVIGOR_ENGINE_PACKAGE_NAME]=(0,ff.offlinePluginConversion)(lf.HVIGOR_PROJECT_ROOT_DIR,pf.hvigorVersion);try{cf.mkdirSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,{recursive:!0});const t=af.resolve(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,lf.DEFAULT_PACKAGE_JSON);cf.writeFileSync(t,JSON.stringify(e))}catch(e){(0,df.logErrorAndExit)(e)}!function(){const e=["config","set","store-dir",lf.HVIGOR_PNPM_STORE_PATH];(0,ff.executeCommand)(lf.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,e,Cf)}(),(0,ff.executeCommand)(lf.HVIGOR_WRAPPER_PNPM_SCRIPT_PATH,["install"],Cf)};function gf(){const e=af.resolve(lf.HVIGOR_PROJECT_WRAPPER_HOME,lf.DEFAULT_HVIGOR_CONFIG_JSON_FILE_NAME);return cf.existsSync(e)||(0,df.logErrorAndExit)(`Error: Hvigor config file ${e} does not exist.`),(0,Df.parseJsonFile)(e)}function Af(){return cf.existsSync(lf.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH)?(0,Df.parseJsonFile)(lf.HVIGOR_PROJECT_DEPENDENCY_PACKAGE_JSON_PATH):{dependencies:{}}}sf=Y.cleanWorkSpace=function(){if((0,df.logInfoPrintConsole)("Hvigor cleaning..."),!cf.existsSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME))return;const e=cf.readdirSync(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME);if(e&&0!==e.length){cf.existsSync(lf.HVIGOR_BOOT_JS_FILE_PATH)&&(0,ff.executeCommand)(process.argv[0],[lf.HVIGOR_BOOT_JS_FILE_PATH,"--stop-daemon"],{});try{e.forEach((e=>{cf.rmSync(af.resolve(lf.HVIGOR_PROJECT_DEPENDENCIES_HOME,e),{recursive:!0})}))}catch(e){(0,df.logErrorAndExit)(`The hvigor build tool cannot be installed. Please manually clear the workspace directory and synchronize the project again.\n\n Workspace Path: ${lf.HVIGOR_PROJECT_DEPENDENCIES_HOME}.`)}}};var vf={},Sf=w&&w.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var u=Object.getOwnPropertyDescriptor(t,n);u&&!("get"in u?!t.__esModule:u.writable||u.configurable)||(u={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,u)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),wf=w&&w.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Of=w&&w.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&Sf(t,e,n);return wf(t,e),t};Object.defineProperty(vf,"__esModule",{value:!0});var bf=vf.executeBuild=void 0;const _f=b,Bf=Of(D.default),Pf=Of(p.default),kf=$;bf=vf.executeBuild=function(){const e=Pf.resolve(_f.HVIGOR_PROJECT_DEPENDENCIES_HOME,"node_modules","@ohos","hvigor","bin","hvigor.js");try{const t=Bf.realpathSync(e);require(t)}catch(t){(0,kf.logErrorAndExit)(`Error: ENOENT: no such file ${e},delete ${_f.HVIGOR_PROJECT_DEPENDENCIES_HOME} and retry.`)}},function(){if(O.checkNpmConifg(),O.environmentHandler(),O.isPnpmAvailable()||O.executeInstallPnpm(),yf()&&mf())bf();else{sf();try{Ff()}catch(e){return void sf()}bf()}}(); \ No newline at end of file diff --git a/templates/openharmony/hvigorw b/templates/openharmony/hvigorw new file mode 100644 index 00000000000..54aadd226b4 --- /dev/null +++ b/templates/openharmony/hvigorw @@ -0,0 +1,48 @@ +#!/bin/bash + +# ---------------------------------------------------------------------------- +# Hvigor startup script, version 1.0.0 +# +# Required ENV vars: +# ------------------ +# NODE_HOME - location of a Node home dir +# or +# Add /usr/local/nodejs/bin to the PATH environment variable +# ---------------------------------------------------------------------------- + +HVIGOR_APP_HOME=$(dirname $(readlink -f $0)) +HVIGOR_WRAPPER_SCRIPT=${HVIGOR_APP_HOME}/hvigor/hvigor-wrapper.js +warn() { + echo "" + echo -e "\033[1;33m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m" +} + +error() { + echo "" + echo -e "\033[1;31m`date '+[%Y-%m-%d %H:%M:%S]'`$@\033[0m" +} + +fail() { + error "$@" + exit 1 +} + +# Determine node to start hvigor wrapper script +if [ -n "${NODE_HOME}" ];then + EXECUTABLE_NODE="${NODE_HOME}/bin/node" + if [ ! -x "$EXECUTABLE_NODE" ];then + fail "ERROR: NODE_HOME is set to an invalid directory,check $NODE_HOME\n\nPlease set NODE_HOME in your environment to the location where your nodejs installed" + fi +else + EXECUTABLE_NODE="node" + which ${EXECUTABLE_NODE} > /dev/null 2>&1 || fail "ERROR: NODE_HOME is not set and not 'node' command found in your path" +fi + +# Check hvigor wrapper script +if [ ! -r "$HVIGOR_WRAPPER_SCRIPT" ];then + fail "ERROR: Couldn't find hvigor/hvigor-wrapper.js in ${HVIGOR_APP_HOME}" +fi + +# start hvigor-wrapper script +exec "${EXECUTABLE_NODE}" \ + "${HVIGOR_WRAPPER_SCRIPT}" "$@" diff --git a/templates/openharmony/hvigorw.bat b/templates/openharmony/hvigorw.bat new file mode 100644 index 00000000000..6861293e47d --- /dev/null +++ b/templates/openharmony/hvigorw.bat @@ -0,0 +1,64 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Hvigor startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +set WRAPPER_MODULE_PATH=%APP_HOME%\hvigor\hvigor-wrapper.js +set NODE_EXE=node.exe + +goto start + +:start +@rem Find node.exe +if defined NODE_HOME goto findNodeFromNodeHome + +%NODE_EXE% --version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. +echo. +echo Please set the NODE_HOME variable in your environment to match the +echo location of your NodeJs installation. + +goto fail + +:findNodeFromNodeHome +set NODE_HOME=%NODE_HOME:"=% +set NODE_EXE_PATH=%NODE_HOME%/%NODE_EXE% + +if exist "%NODE_EXE_PATH%" goto execute +echo. +echo ERROR: NODE_HOME is not set and no 'node' command could be found in your PATH. +echo. +echo Please set the NODE_HOME variable in your environment to match the +echo location of your NodeJs installation. + +goto fail + +:execute +@rem Execute hvigor +"%NODE_EXE%" %WRAPPER_MODULE_PATH% %* + +if "%ERRORLEVEL%" == "0" goto hvigorwEnd + +:fail +exit /b 1 + +:hvigorwEnd +if "%OS%" == "Windows_NT" endlocal + +:end diff --git a/templates/openharmony/oh-package-lock.json5 b/templates/openharmony/oh-package-lock.json5 new file mode 100644 index 00000000000..12dbc422142 --- /dev/null +++ b/templates/openharmony/oh-package-lock.json5 @@ -0,0 +1,14 @@ +{ + "lockfileVersion": 1, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6", + "@ohos/hypium@^1.0.6": "@ohos/hypium@1.0.6" + }, + "packages": { + "@ohos/hypium@1.0.6": { + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", + "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==" + } + } +} \ No newline at end of file diff --git a/templates/openharmony/oh-package.json5 b/templates/openharmony/oh-package.json5 new file mode 100644 index 00000000000..b794907fe7b --- /dev/null +++ b/templates/openharmony/oh-package.json5 @@ -0,0 +1,12 @@ +{ + "license": "", + "devDependencies": { + "@ohos/hypium": "1.0.6" + }, + "author": "", + "name": "test-cases", + "description": "example description", + "main": "", + "version": "1.0.0", + "dependencies": {} +} \ No newline at end of file diff --git a/templates/openharmony/package-lock.json b/templates/openharmony/package-lock.json deleted file mode 100644 index 97d30687f97..00000000000 --- a/templates/openharmony/package-lock.json +++ /dev/null @@ -1,1212 +0,0 @@ -{ - "name": "myapplication", - "version": "1.0.0", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@ohos/hos-sdkmanager-common": { - "version": "1.0.4", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hos-sdkmanager-common/-/@ohos/hos-sdkmanager-common-1.0.4.tgz", - "integrity": "sha512-LWrfF8Js+u54BcEAdyjzsA81iGBA4LPvQdQ1ig/pX6mvTieUPSvtjtAzdI8nnGVmJRLrHwAMHEO/syd9d8UAFw==", - "requires": { - "@ohos/sdkmanager-common": "^1.1.8" - } - }, - "@ohos/hvigor": { - "version": "1.1.6", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor/-/@ohos/hvigor-1.1.6.tgz", - "integrity": "sha512-/n7cSH3Tc1p5CEgELeJof2MLBYbu96Enmkga8PA1BFoBZnPF+SirHwJyynhtUtOJQOyFkBFQOXmwzq5o2Pdvug==", - "requires": { - "@ohos/hvigor-base": "1.1.6", - "fs-extra": "10.0.0", - "interpret": "1.4.0", - "liftoff": "4.0.0", - "mute-stdout": "1.0.0", - "pretty-hrtime": "1.0.0", - "v8flags": "3.2.0", - "yargs": "7.1.2" - } - }, - "@ohos/hvigor-base": { - "version": "1.1.6", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-base/-/@ohos/hvigor-base-1.1.6.tgz", - "integrity": "sha512-VU1jdgb+86RZ6fsea1kKP3Dx77DAQmSwGQoFEpjRVPP6aLXpRfM8aLS8DNlpMVEw1dFVQhOOsZ22thcbxinSOA==", - "requires": { - "json5": "2.2.0", - "log4js": "6.4.1", - "once": "1.4.0", - "pretty-hrtime": "1.0.0" - } - }, - "@ohos/hvigor-ohos-plugin": { - "version": "1.1.6", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hvigor-ohos-plugin/-/@ohos/hvigor-ohos-plugin-1.1.6.tgz", - "integrity": "sha512-Bnm1932VypATJf/Cp+sTzsX/oHFojAW7dAbEgfQpwQsyXmQbwXEf0zGnbrjVD0WKtxVVpO+znhpZvrDhOiUXlg==", - "requires": { - "@ohos/hos-sdkmanager-common": "1.0.4", - "@ohos/hvigor-base": "1.1.6", - "@ohos/sdkmanager-common": "1.1.8", - "adm-zip": "0.5.9", - "ajv": "8.10.0", - "execa": "5.1.1", - "fast-xml-parser": "4.0.3", - "fs-extra": "10.0.0", - "glob": "7.2.0", - "iconv-lite": "0.6.3", - "json5": "2.2.0", - "lodash": "4.17.21", - "pretty-hrtime": "1.0.3", - "resolve-package-path": "4.0.3" - }, - "dependencies": { - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==" - } - } - }, - "@ohos/hypium": { - "version": "1.0.1", - "resolved": "https://repo.harmonyos.com/npm/@ohos/hypium/-/@ohos/hypium-1.0.1.tgz", - "integrity": "sha512-HaztFbgwYZCdVlayXirBlmJaNTXUO65qRgYnUmrhWGEzG7wFU2fyFbeXgQeYMVWFXgeezFOoHAPoS96TEE7TIQ==" - }, - "@ohos/sdkmanager-common": { - "version": "1.1.8", - "resolved": "https://repo.harmonyos.com/npm/@ohos/sdkmanager-common/-/@ohos/sdkmanager-common-1.1.8.tgz", - "integrity": "sha512-mxq69+6Zg/ybeQGnOtkBzOTbNBkEdiYehRKWsAD/je53v1W+ahauLqe90pNZEiBuVYugzb6z2EaJtAXYZtE8gQ==" - }, - "adm-zip": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.5.9.tgz", - "integrity": "sha512-s+3fXLkeeLjZ2kLjCBwQufpI5fuN+kIGBxu6530nVQZGVol0d7Y/M88/xw9HGGUcJjKf8LutN3VPRUBq6N7Ajg==" - }, - "ajv": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", - "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==" - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==" - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==" - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "requires": { - "fill-range": "^7.0.1" - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==" - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "dependencies": { - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "date-format": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/date-format/-/date-format-4.0.11.tgz", - "integrity": "sha512-VS20KRyorrbMCQmpdl2hg5KaOUsda1RbnsJg461FfrcyCUg+pkd0b40BSW4niQyTheww4DBXQnS7HwSrKkipLw==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==" - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==" - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-xml-parser": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.0.3.tgz", - "integrity": "sha512-xhQbg3a/EYNHwK0cxIG1nZmVkHX/0tWihamn5pU4Mhd9KEVE2ga8ZJiqEUgB2sApElvAATOdMTLjgqIpvYDUkQ==", - "requires": { - "strnum": "^1.0.5" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "findup-sync": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-5.0.0.tgz", - "integrity": "sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==", - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.3", - "micromatch": "^4.0.4", - "resolve-dir": "^1.0.1" - } - }, - "fined": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-2.0.0.tgz", - "integrity": "sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==", - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^5.0.0", - "object.defaults": "^1.1.0", - "object.pick": "^1.3.0", - "parse-filepath": "^1.0.2" - } - }, - "flagged-respawn": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-2.0.0.tgz", - "integrity": "sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==" - }, - "flatted": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", - "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==" - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==" - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "requires": { - "for-in": "^1.0.1" - } - }, - "fs-extra": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz", - "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" - }, - "get-intrinsic": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.2.tgz", - "integrity": "sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==" - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" - }, - "is-core-module": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.9.0.tgz", - "integrity": "sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==", - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" - }, - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==" - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==" - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==" - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "requires": { - "invert-kv": "^1.0.0" - } - }, - "liftoff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-4.0.0.tgz", - "integrity": "sha512-rMGwYF8q7g2XhG2ulBmmJgWv25qBsqRbDn5gH0+wnuyeFt7QBJlHJmtg5qEdn4pN6WVAUMgXnIxytMFRX9c1aA==", - "requires": { - "extend": "^3.0.2", - "findup-sync": "^5.0.0", - "fined": "^2.0.0", - "flagged-respawn": "^2.0.0", - "is-plain-object": "^5.0.0", - "object.map": "^1.0.1", - "rechoir": "^0.8.0", - "resolve": "^1.20.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "log4js": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.4.1.tgz", - "integrity": "sha512-iUiYnXqAmNKiIZ1XSAitQ4TmNs8CdZYTAWINARF3LjnsLN8tY5m0vRwd6uuWj/yNY0YHxeZodnbmxKFUOM2rMg==", - "requires": { - "date-format": "^4.0.3", - "debug": "^4.3.3", - "flatted": "^3.2.4", - "rfdc": "^1.3.0", - "streamroller": "^3.0.2" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==" - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "mute-stdout": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.0.tgz", - "integrity": "sha512-MaSQenn0f9oxIjtCufclpV00MuYTiHaXPbdcfPIM+quMqoa8cXywjHHx4LhhIAZlXqPWMdcUpYviajfmHtHRJw==" - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "requires": { - "path-key": "^3.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==" - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "requires": { - "isobject": "^3.0.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "requires": { - "lcid": "^1.0.0" - } - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==" - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==" - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==" - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==" - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==" - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "requires": { - "pinkie": "^2.0.0" - } - }, - "pretty-hrtime": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.0.tgz", - "integrity": "sha512-CU2l5CYUAptUYq/671ajexQfXuxJFwwg0n243Kdkx8bTjeenedsWgu8TGHPm03vLfNtk3aTXgySKPp3Usykudw==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "requires": { - "resolve": "^1.20.0" - } - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==" - }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==" - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "resolve-package-path": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/resolve-package-path/-/resolve-package-path-4.0.3.tgz", - "integrity": "sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==", - "requires": { - "path-root": "^0.1.1" - } - }, - "rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", - "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" - }, - "streamroller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-3.1.1.tgz", - "integrity": "sha512-iPhtd9unZ6zKdWgMeYGfSBuqCngyJy1B/GPi/lTpwGpa3bajuX30GjUVd0/Tn/Xhg0mr4DOSENozz9Y06qyonQ==", - "requires": { - "date-format": "^4.0.10", - "debug": "^4.3.4", - "fs-extra": "^10.1.0" - }, - "dependencies": { - "fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - } - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==" - }, - "strnum": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "requires": { - "is-number": "^7.0.0" - } - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==" - }, - "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "requires": { - "punycode": "^2.1.0" - } - }, - "v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "requires": { - "isexe": "^2.0.0" - } - }, - "which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==" - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==" - }, - "yargs": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", - "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.1" - } - }, - "yargs-parser": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", - "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", - "requires": { - "camelcase": "^3.0.0", - "object.assign": "^4.1.0" - } - } - } -} diff --git a/templates/openharmony/package.json b/templates/openharmony/package.json deleted file mode 100644 index 944747c070b..00000000000 --- a/templates/openharmony/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "license": "ISC", - "devDependencies": {}, - "name": "myapplication", - "ohos": { - "org": "huawei", - "directoryLevel": "project", - "buildTool": "hvigor" - }, - "scripts": { - "build": "hvigor assembleHap" - }, - "description": "example description", - "repository": {}, - "version": "1.0.0", - "dependencies": { - "@ohos/hypium": "1.0.5", - "@ohos/hvigor-ohos-plugin": "1.4.1", - "@ohos/hvigor": "1.4.0" - } -} From a9847545d4042bce7e20fc9abbd1e5e683d6932f Mon Sep 17 00:00:00 2001 From: Canvas Date: Thu, 13 Jul 2023 17:27:36 +0800 Subject: [PATCH 04/26] fix Type 'AnimationCache | null' is not assignable to type 'AnimationCache'. (#15712) --- cocos/spine/skeleton-cache.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/spine/skeleton-cache.ts b/cocos/spine/skeleton-cache.ts index 0757b362275..fe54719bd70 100644 --- a/cocos/spine/skeleton-cache.ts +++ b/cocos/spine/skeleton-cache.ts @@ -378,13 +378,13 @@ class SkeletonCache { return skeletonInfo; } - public getAnimationCache (uuid: string, animationName: string) { + public getAnimationCache (uuid: string, animationName: string): null | AnimationCache { const poolKey = `${uuid}#${animationName}`; const animCache = this._animationPool[poolKey]; return animCache; } - public initAnimationCache (uuid: string, data: SkeletonData, animationName: string) { + public initAnimationCache (uuid: string, data: SkeletonData, animationName: string): null | AnimationCache { const spData = data.getRuntimeData(); if (!spData) return null; const skeletonInfo = this._skeletonCache[uuid]; From fc3a6a5ec33c127b67afba68170074608a0d01c0 Mon Sep 17 00:00:00 2001 From: troublemaker52025 Date: Thu, 13 Jul 2023 18:55:51 +0800 Subject: [PATCH 05/26] add skin component help (#15702) --- editor/i18n/en/localization.js | 2 +- editor/i18n/zh/localization.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/i18n/en/localization.js b/editor/i18n/en/localization.js index ac405d0815e..1ba99832758 100755 --- a/editor/i18n/en/localization.js +++ b/editor/i18n/en/localization.js @@ -141,7 +141,7 @@ module.exports = link(mixin({ Bloom: `${url}/${version}/manual/en/render-pipeline/post-process/index.html`, HBAO: `${url}/${version}/manual/en/render-pipeline/post-process/index.html`, ColorGrading: `${url}/${version}/manual/en/render-pipeline/post-process/index.html`, - Skin: `${url}/${version}/manual/en/shader/surface-shader/skin.html`, + Skin: `${url}/${version}/manual/en/shader/advanced-shader/skin.html`, RenderRoot2D: `${url}/${version}/manual/en/ui-system/components/editor/renderroot2d.html`, }, assets: { diff --git a/editor/i18n/zh/localization.js b/editor/i18n/zh/localization.js index 8477d480eb6..2e51cd91d3d 100755 --- a/editor/i18n/zh/localization.js +++ b/editor/i18n/zh/localization.js @@ -141,7 +141,7 @@ module.exports = link(mixin({ Bloom: `${url}/${version}/manual/zh/render-pipeline/post-process/index.html`, HBAO: `${url}/${version}/manual/zh/render-pipeline/post-process/index.html`, ColorGrading: `${url}/${version}/manual/zh/render-pipeline/post-process/index.html`, - Skin: `${url}/${version}/manual/zh/shader/surface-shader/skin.html`, + Skin: `${url}/${version}/manual/zh/shader/advanced-shader/skin.html`, RenderRoot2D: `${url}/${version}/manual/zh/ui-system/components/editor/renderroot2d.html`, }, assets: { From e383b269f7849483f269d3724a56abb0b4f8f2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leslie=20Leigh=20=28=E6=9D=8E=E7=9A=84=E5=BA=8F=29?= Date: Thu, 13 Jul 2023 19:20:33 +0800 Subject: [PATCH 06/26] Pose graph: fix apply transform node (#15719) * Pose graph: fix apply transform node * Update --- .../marionette/animation-graph-context.ts | 14 ++++++++++---- .../pose-graph/pose-nodes/apply-transform.ts | 2 +- .../pose-graph/pose-transform-space.test.ts | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/cocos/animation/marionette/animation-graph-context.ts b/cocos/animation/marionette/animation-graph-context.ts index 14cd791ce15..16ddeeeac09 100644 --- a/cocos/animation/marionette/animation-graph-context.ts +++ b/cocos/animation/marionette/animation-graph-context.ts @@ -915,9 +915,12 @@ class AnimationGraphEvaluationContext { break; } case TransformSpace.LOCAL: { // Local -> * - const nodeComponentTransform = pose.transforms.getTransform(poseTransformIndex, cacheParentTransform_spaceConversion); - const invNodeComponentTransform = Transform.invert(nodeComponentTransform, nodeComponentTransform); - Transform.multiply(transform, invNodeComponentTransform, transform); + // Bone_Local_Transform * result = input + // result = inv(Bone_Local_Transform) * input + assertIsTrue(poseSpace === PoseTransformSpace.COMPONENT || poseSpace === PoseTransformSpace.LOCAL); + const boneTransform = pose.transforms.getTransform(poseTransformIndex, cacheParentTransform_spaceConversion); + const invBoneTransform = Transform.invert(boneTransform, boneTransform); + Transform.multiply(transform, invBoneTransform, transform); break; } } @@ -975,6 +978,9 @@ class AnimationGraphEvaluationContext { break; } case TransformSpace.LOCAL: { + assertIsTrue(poseSpace === PoseTransformSpace.COMPONENT || poseSpace === PoseTransformSpace.LOCAL); + // Bone_Local_Transform * result = input + // result = inv(Bone_Local_Transform) * input const currentTransform = pose.transforms.getTransform(poseTransformIndex, cacheParentTransform_spaceConversion); Transform.multiply(transform, currentTransform, transform); break; @@ -1005,7 +1011,7 @@ class AnimationGraphEvaluationContext { const { _parentTable: parentTable } = this; Transform.setIdentity(out); - for (let iTransform = transformIndex; iTransform >= 0; iTransform = parentTable[iTransform]) { + for (let iTransform = parentTable[transformIndex]; iTransform >= 0; iTransform = parentTable[iTransform]) { const localTransform = pose.transforms.getTransform(iTransform, cacheTransform_spaceConversion); Transform.multiply(out, localTransform, out); } diff --git a/cocos/animation/marionette/pose-graph/pose-nodes/apply-transform.ts b/cocos/animation/marionette/pose-graph/pose-nodes/apply-transform.ts index 6425f6b69fd..31ce2fef83a 100644 --- a/cocos/animation/marionette/pose-graph/pose-nodes/apply-transform.ts +++ b/cocos/animation/marionette/pose-graph/pose-nodes/apply-transform.ts @@ -17,7 +17,7 @@ import { PoseGraphType } from '../foundation/type-system'; import { TransformSpace } from './transform-space'; import { Transform } from '../../../core/transform'; -enum TransformOperation { +export enum TransformOperation { LEAVE_UNCHANGED, REPLACE, diff --git a/tests/animation/new-gen-anim/pose-graph/pose-transform-space.test.ts b/tests/animation/new-gen-anim/pose-graph/pose-transform-space.test.ts index 5009af42742..f1856cc8fbf 100644 --- a/tests/animation/new-gen-anim/pose-graph/pose-transform-space.test.ts +++ b/tests/animation/new-gen-anim/pose-graph/pose-transform-space.test.ts @@ -106,7 +106,7 @@ describe(`Pose transform space`, () => { hierarchy.getComponentToWorldTransform(), // Component -> World hierarchy.computeComponentSpaceTransform( // Local -> Component localSpacePoseRecord, - nodeName, + hierarchy.getParentNodeName(nodeName), ), ); }], @@ -116,7 +116,7 @@ describe(`Pose transform space`, () => { [PoseTransformSpace.LOCAL, TransformSpace.COMPONENT, (hierarchy, localSpacePoseRecord, nodeName) => { return hierarchy.computeComponentSpaceTransform( localSpacePoseRecord, - nodeName, + hierarchy.getParentNodeName(nodeName), ); }], From aa413ddafb881480b3d19291724986471bc99c09 Mon Sep 17 00:00:00 2001 From: Canvas Date: Thu, 13 Jul 2023 19:31:00 +0800 Subject: [PATCH 07/26] fix spine cache animation logic. (#15711) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix the data desynchronization when switching cache mode dynamically & Type 'AnimationCache | null' is not assignable to type 'AnimationCache'. * fix ‘BindingError: Cannot pass non-string to std::string’ when skin name is number. * remove old code. * remove try catch. * rolling conflict codes. --------- Co-authored-by: Santy-Wang --- cocos/spine/skeleton-cache.ts | 8 +++++--- cocos/spine/skeleton.ts | 21 +++++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/cocos/spine/skeleton-cache.ts b/cocos/spine/skeleton-cache.ts index fe54719bd70..3b68018a013 100644 --- a/cocos/spine/skeleton-cache.ts +++ b/cocos/spine/skeleton-cache.ts @@ -113,6 +113,7 @@ export class AnimationCache { } public setSkin (skinName: string) { + if (this._skeleton) this._skeleton.setSkinByName(skinName); this._instance.setSkin(skinName); } @@ -379,9 +380,10 @@ class SkeletonCache { } public getAnimationCache (uuid: string, animationName: string): null | AnimationCache { - const poolKey = `${uuid}#${animationName}`; - const animCache = this._animationPool[poolKey]; - return animCache; + const skeletonInfo = this._skeletonCache[uuid]; + if (!skeletonInfo) return null; + const animationsCache = skeletonInfo.animationsCache; + return animationsCache[animationName]; } public initAnimationCache (uuid: string, data: SkeletonData, animationName: string): null | AnimationCache { diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 6039aab94b2..459f27e5cfe 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -212,6 +212,8 @@ export class Skeleton extends UIRenderer { @serializable protected _timeScale = 1; @serializable + protected _preCacheMode = -1; + @serializable protected _cacheMode = AnimationCacheMode.REALTIME; @serializable protected _defaultCacheMode: AnimationCacheMode = AnimationCacheMode.REALTIME; @@ -380,7 +382,7 @@ export class Skeleton extends UIRenderer { const skinName = skinsEnum[value]; if (skinName !== undefined) { - this.defaultSkin = skinName; + this.defaultSkin = String(skinName); this.setSkin(this.defaultSkin); this._refreshInspector(); this.markForUpdateRenderData(); @@ -685,6 +687,11 @@ export class Skeleton extends UIRenderer { this._refreshInspector(); return; } + this._needUpdateSkeltonData = false; + const data = this.skeletonData?.getRuntimeData(); + if (!data) return; + this.setSkeletonData(data); + if (this.defaultSkin) this.setSkin(this.defaultSkin); this._textures = skeletonData.textures; this._runtimeData = skeletonData.getRuntimeData(); if (!this._runtimeData) return; @@ -696,6 +703,7 @@ export class Skeleton extends UIRenderer { this._indexBoneSockets(); this._updateSocketBindings(); this.attachUtil.init(this); + this._preCacheMode = this._cacheMode; } /** @@ -719,7 +727,6 @@ export class Skeleton extends UIRenderer { this._skeletonCache.enablePrivateMode(); } } - if (this.isAnimationCached()) { if (this.debugBones || this.debugSlots) { warn('Debug bones or slots is invalid in cached mode'); @@ -856,13 +863,14 @@ export class Skeleton extends UIRenderer { * @param skinName @en The name of skin. @zh 皮肤名称。 */ public setSkin (name: string) { + if (this._skeleton) this._skeleton.setSkinByName(name); + this._instance.setSkin(name); if (this.isAnimationCached()) { if (this._animCache) { this._animCache.setSkin(name); - this.invalidAnimationCache(); } } - this._instance.setSkin(name); + this.invalidAnimationCache(); } /** @@ -910,7 +918,6 @@ export class Skeleton extends UIRenderer { } const frames = frameCache.frames; const frameTime = SkeletonCache.FrameTime; - // Animation Start, the event different from dragonbones inner event, // It has no event object. if (this._accTime === 0 && this._playCount === 0) { @@ -1175,9 +1182,11 @@ export class Skeleton extends UIRenderer { * skeleton.setAnimationCacheMode(sp.Skeleton.AnimationCacheMode.SHARED_CACHE); */ public setAnimationCacheMode (cacheMode: AnimationCacheMode) { - if (this._cacheMode !== cacheMode) { + if (this._preCacheMode !== cacheMode) { this._cacheMode = cacheMode; + //this.setSkin(this.defaultSkin); this._updateSkeletonData(); + this.setSkin(this.defaultSkin); this._updateUseTint(); this._updateSocketBindings(); this.markForUpdateRenderData(); From 0a65b82a8019f269542f37dc3c1f6f9eb78c457b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=A3=AE=E6=96=8C?= Date: Fri, 14 Jul 2023 10:08:57 +0800 Subject: [PATCH 08/26] mountAllAnimationsOnPrefab default value true (#15721) --- editor/inspector/assets/fbx/animation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/inspector/assets/fbx/animation.js b/editor/inspector/assets/fbx/animation.js index d8cd84b6f55..590b8a60c9d 100644 --- a/editor/inspector/assets/fbx/animation.js +++ b/editor/inspector/assets/fbx/animation.js @@ -700,7 +700,7 @@ const Elements = { panel.$.importAllAnimatorWrap.style.display = 'block'; } - panel.$.importAllAnimationsCheckbox.value = getPropValue.call(panel, panel.meta.userData.mountAllAnimationsOnPrefab, false); + panel.$.importAllAnimationsCheckbox.value = getPropValue.call(panel, panel.meta.userData.mountAllAnimationsOnPrefab, true); updateElementInvalid.call(panel, panel.$.importAllAnimationsCheckbox, 'mountAllAnimationsOnPrefab'); updateElementReadonly.call(panel, panel.$.importAllAnimationsCheckbox); From f26e2c4326e9395d6b71bb80bada02b3d3fe2ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leslie=20Leigh=20=28=E6=9D=8E=E7=9A=84=E5=BA=8F=29?= Date: Fri, 14 Jul 2023 13:42:14 +0800 Subject: [PATCH 09/26] Upgrade eslint, relax eslint rule explicit-function-return-type (#15723) * Upgrade eslint, relax explicit-function-return-type * Update .eslintrc.yaml Co-authored-by: PP --------- Co-authored-by: PP --- .eslintrc.yaml | 7 +- package-lock.json | 3045 ++++++++++++++++++++++++++------------------- package.json | 28 +- 3 files changed, 1798 insertions(+), 1282 deletions(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 98e5a9d4498..33743846d93 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -11,8 +11,7 @@ extends: - plugin:@typescript-eslint/recommended - plugin:@typescript-eslint/recommended-requiring-type-checking -plugins: - - '@typescript-eslint' +plugins: ["@typescript-eslint"] settings: import/resolver: @@ -146,4 +145,6 @@ rules: # Prefer the interface style. '@typescript-eslint/consistent-type-definitions': [error, interface] - '@typescript-eslint/explicit-function-return-type': [error] + '@typescript-eslint/explicit-function-return-type': [error, { + allowIIFEs: true, // IIFEs are widely used, writing their signature twice is painful + }] diff --git a/package-lock.json b/package-lock.json index a39812198e8..0fa7f37bda9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,12 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmmirror.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, "@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -1116,7 +1122,7 @@ }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz", + "resolved": "https://registry.nlark.com/@babel/plugin-syntax-async-generators/download/@babel/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha1-qYP7Gusuw/btBCohD2QOkOeG/g0=", "dev": true, "requires": { @@ -1168,7 +1174,7 @@ }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz", + "resolved": "https://registry.nlark.com/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz?cache=0&sync_timestamp=1618847125283&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40babel%2Fplugin-syntax-dynamic-import%2Fdownload%2F%40babel%2Fplugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM=", "dev": true, "requires": { @@ -1211,7 +1217,7 @@ }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz", + "resolved": "https://registry.nlark.com/@babel/plugin-syntax-json-strings/download/@babel/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha1-AcohtmjNghjJ5kDLbdiMVBKyyWo=", "dev": true, "requires": { @@ -1220,7 +1226,7 @@ }, "@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "resolved": "https://registry.nlark.com/@babel/plugin-syntax-logical-assignment-operators/download/@babel/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha1-ypHvRjA1MESLkGZSusLp/plB9pk=", "dev": true, "requires": { @@ -1263,7 +1269,7 @@ }, "@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz", + "resolved": "https://registry.nlark.com/@babel/plugin-syntax-object-rest-spread/download/@babel/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha1-YOIl7cvZimQDMqLnLdPmbxr1WHE=", "dev": true, "requires": { @@ -1281,7 +1287,7 @@ }, "@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", - "resolved": "https://registry.npm.taobao.org/@babel/plugin-syntax-optional-chaining/download/@babel/plugin-syntax-optional-chaining-7.8.3.tgz", + "resolved": "https://registry.nlark.com/@babel/plugin-syntax-optional-chaining/download/@babel/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha1-T2nCq5UWfgGAzVM2YT+MV4j31Io=", "dev": true, "requires": { @@ -1641,7 +1647,7 @@ }, "@babel/preset-env": { "version": "7.8.7", - "resolved": "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.8.7.tgz?cache=0&sync_timestamp=1593522855920&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.8.7.tgz", + "resolved": "https://registry.npmmirror.com/@babel/preset-env/download/@babel/preset-env-7.8.7.tgz?cache=0&sync_timestamp=1637103615805&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40babel%2Fpreset-env%2Fdownload%2F%40babel%2Fpreset-env-7.8.7.tgz", "integrity": "sha1-H8fYnH910tcMK2do3mwuBJs8uds=", "dev": true, "requires": { @@ -1817,7 +1823,7 @@ }, "@cocos/box2d": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/@cocos/box2d/download/@cocos/box2d-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/@cocos/box2d/download/@cocos/box2d-1.0.1.tgz", "integrity": "sha1-Fc2lzPxRCCt91tNoo+S55IXS5To=", "requires": { "@types/systemjs": "^0.20.6" @@ -1857,13 +1863,13 @@ "dependencies": { "ansi-regex": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { @@ -1872,7 +1878,7 @@ }, "cliui": { "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz", "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", "dev": true, "requires": { @@ -1883,7 +1889,7 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { @@ -1892,13 +1898,13 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "find-up": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { @@ -1908,7 +1914,7 @@ }, "fs-extra": { "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-8.1.0.tgz", "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "requires": { @@ -1919,7 +1925,7 @@ }, "get-caller-file": { "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, @@ -1934,13 +1940,13 @@ }, "is-fullwidth-code-point": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, "locate-path": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { @@ -1949,7 +1955,7 @@ }, "p-locate": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { @@ -1958,13 +1964,13 @@ }, "path-exists": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true }, "require-main-filename": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, @@ -1990,7 +1996,7 @@ }, "string-width": { "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, "requires": { @@ -2001,7 +2007,7 @@ }, "strip-ansi": { "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { @@ -2016,7 +2022,7 @@ }, "wrap-ansi": { "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz", "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "requires": { @@ -2027,13 +2033,13 @@ }, "y18n": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz", "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yargs": { "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz", "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { @@ -2052,7 +2058,7 @@ }, "yargs-parser": { "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz", "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { @@ -3528,40 +3534,58 @@ "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==" }, "@eslint/eslintrc": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", - "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", "dev": true, "requires": { "ajv": "^6.12.4", - "debug": "^4.1.1", - "espree": "^7.3.0", - "globals": "^13.9.0", - "ignore": "^4.0.6", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.20.0", + "resolved": "https://registry.npmmirror.com/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "requires": { "type-fest": "^0.20.2" } }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } }, "type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } @@ -3573,14 +3597,14 @@ "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==" }, "@humanwhocodes/config-array": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", - "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "version": "0.11.10", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "requires": { - "@humanwhocodes/object-schema": "^1.2.0", + "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5" } }, "@humanwhocodes/module-importer": { @@ -3589,9 +3613,9 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==" }, "@humanwhocodes/object-schema": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", - "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, "@istanbuljs/load-nyc-config": { @@ -5821,7 +5845,7 @@ }, "@jest/types": { "version": "24.9.0", - "resolved": "https://registry.npm.taobao.org/@jest/types/download/@jest/types-24.9.0.tgz", + "resolved": "https://registry.npmmirror.com/@jest/types/download/@jest/types-24.9.0.tgz", "integrity": "sha1-Y8smy3UA0Gnlo4lEGnxqtekJ/Fk=", "dev": true, "requires": { @@ -5852,7 +5876,7 @@ }, "@jridgewell/resolve-uri": { "version": "3.0.7", - "resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==" }, "@jridgewell/set-array": { @@ -5885,12 +5909,12 @@ }, "@jridgewell/sourcemap-codec": { "version": "1.4.13", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==" }, "@jridgewell/trace-mapping": { "version": "0.3.13", - "resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", "requires": { "@jridgewell/resolve-uri": "^3.0.3", @@ -6148,7 +6172,7 @@ }, "@types/fs-extra": { "version": "5.1.0", - "resolved": "https://registry.npm.taobao.org/@types/fs-extra/download/@types/fs-extra-5.1.0.tgz", + "resolved": "https://registry.npmmirror.com/@types/fs-extra/download/@types/fs-extra-5.1.0.tgz", "integrity": "sha1-KjJe+XkBUEo4KHGMOQ00uEJqEKE=", "dev": true, "requires": { @@ -6181,7 +6205,7 @@ }, "@types/istanbul-reports": { "version": "1.1.2", - "resolved": "https://registry.npm.taobao.org/@types/istanbul-reports/download/@types/istanbul-reports-1.1.2.tgz?cache=0&sync_timestamp=1613379043554&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fistanbul-reports%2Fdownload%2F%40types%2Fistanbul-reports-1.1.2.tgz", + "resolved": "https://registry.npmmirror.com/@types/istanbul-reports/download/@types/istanbul-reports-1.1.2.tgz?cache=0&sync_timestamp=1637266160892&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fistanbul-reports%2Fdownload%2F%40types%2Fistanbul-reports-1.1.2.tgz", "integrity": "sha1-6HXMaJ5HvOVJ7IHz315vbxHPrrI=", "dev": true, "requires": { @@ -6191,7 +6215,7 @@ }, "@types/jest": { "version": "24.9.1", - "resolved": "https://registry.npm.taobao.org/@types/jest/download/@types/jest-24.9.1.tgz?cache=0&sync_timestamp=1616695463771&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fjest%2Fdownload%2F%40types%2Fjest-24.9.1.tgz", + "resolved": "https://registry.npmmirror.com/@types/jest/download/@types/jest-24.9.1.tgz", "integrity": "sha1-Arr5Vzx48bmXSl82d4s2aqd71TQ=", "dev": true, "requires": { @@ -6214,6 +6238,12 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmmirror.com/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "@types/node": { "version": "13.1.7", "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-13.1.7.tgz", @@ -6276,33 +6306,79 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.3.tgz", - "integrity": "sha512-tBgfA3K/3TsZY46ROGvoRxQr1wBkclbVqRQep97MjVHJzcRBURRY3sNFqLk0/Xr//BY5hM9H2p/kp+6qim85SA==", + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.0.0.tgz", + "integrity": "sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.29.3", - "@typescript-eslint/scope-manager": "4.29.3", - "debug": "^4.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.1.0", - "semver": "^7.3.5", - "tsutils": "^3.21.0" + "@eslint-community/regexpp": "^4.5.0", + "@typescript-eslint/scope-manager": "6.0.0", + "@typescript-eslint/type-utils": "6.0.0", + "@typescript-eslint/utils": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.5.0", + "ts-api-utils": "^1.0.1" }, "dependencies": { + "@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmmirror.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, + "@typescript-eslint/type-utils": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/type-utils/-/type-utils-6.0.0.tgz", + "integrity": "sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "6.0.0", + "@typescript-eslint/utils": "6.0.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + } + }, + "@typescript-eslint/utils": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-6.0.0.tgz", + "integrity": "sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.3.0", + "@types/json-schema": "^7.0.11", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "6.0.0", + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/typescript-estree": "6.0.0", + "eslint-scope": "^5.1.1", + "semver": "^7.5.0" + } + }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" @@ -6310,36 +6386,23 @@ } } }, - "@typescript-eslint/experimental-utils": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.3.tgz", - "integrity": "sha512-ffIvbytTVWz+3keg+Sy94FG1QeOvmV9dP2YSdLFHw/ieLXWCa3U1TYu8IRCOpMv2/SPS8XqhM1+ou1YHsdzKrg==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.7", - "@typescript-eslint/scope-manager": "4.29.3", - "@typescript-eslint/types": "4.29.3", - "@typescript-eslint/typescript-estree": "4.29.3", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - } - }, "@typescript-eslint/parser": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.29.3.tgz", - "integrity": "sha512-jrHOV5g2u8ROghmspKoW7pN8T/qUzk0+DITun0MELptvngtMrwUJ1tv5zMI04CYVEUsSrN4jV7AKSv+I0y0EfQ==", + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/parser/-/parser-6.0.0.tgz", + "integrity": "sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.29.3", - "@typescript-eslint/types": "4.29.3", - "@typescript-eslint/typescript-estree": "4.29.3", - "debug": "^4.3.1" + "@typescript-eslint/scope-manager": "6.0.0", + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/typescript-estree": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0", + "debug": "^4.3.4" }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -6348,13 +6411,13 @@ } }, "@typescript-eslint/scope-manager": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.3.tgz", - "integrity": "sha512-x+w8BLXO7iWPkG5mEy9bA1iFRnk36p/goVlYobVWHyDw69YmaH9q6eA+Fgl7kYHmFvWlebUTUfhtIg4zbbl8PA==", + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-6.0.0.tgz", + "integrity": "sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==", "dev": true, "requires": { - "@typescript-eslint/types": "4.29.3", - "@typescript-eslint/visitor-keys": "4.29.3" + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0" } }, "@typescript-eslint/type-utils": { @@ -6509,57 +6572,137 @@ } }, "@typescript-eslint/types": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.3.tgz", - "integrity": "sha512-s1eV1lKNgoIYLAl1JUba8NhULmf+jOmmeFO1G5MN/RBCyyzg4TIOfIOICVNC06lor+Xmy4FypIIhFiJXOknhIg==", + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-6.0.0.tgz", + "integrity": "sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.3.tgz", - "integrity": "sha512-45oQJA0bxna4O5TMwz55/TpgjX1YrAPOI/rb6kPgmdnemRZx/dB0rsx+Ku8jpDvqTxcE1C/qEbVHbS3h0hflag==", + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.0.0.tgz", + "integrity": "sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==", "dev": true, "requires": { - "@typescript-eslint/types": "4.29.3", - "@typescript-eslint/visitor-keys": "4.29.3", - "debug": "^4.3.1", - "globby": "^11.0.3", - "is-glob": "^4.0.1", - "semver": "^7.3.5", - "tsutils": "^3.21.0" + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.0", + "ts-api-utils": "^1.0.1" }, "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.4", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, + "fast-glob": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmmirror.com/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.5.4", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "requires": { "lru-cache": "^6.0.0" } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } } } }, @@ -6728,13 +6871,13 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.29.3", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.3.tgz", - "integrity": "sha512-MGGfJvXT4asUTeVs0Q2m+sY63UsfnA+C/FDgBKV3itLBmM9H0u+URcneePtkd0at1YELmZK6HSolCqM4Fzs6yA==", + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.0.0.tgz", + "integrity": "sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==", "dev": true, "requires": { - "@typescript-eslint/types": "4.29.3", - "eslint-visitor-keys": "^2.0.0" + "@typescript-eslint/types": "6.0.0", + "eslint-visitor-keys": "^3.4.1" } }, "JSONStream": { @@ -6749,7 +6892,7 @@ }, "abab": { "version": "2.0.6", - "resolved": "https://registry.npmmirror.com/abab/-/abab-2.0.6.tgz", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", "dev": true }, @@ -6761,7 +6904,7 @@ }, "acorn-globals": { "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/acorn-globals/-/acorn-globals-6.0.0.tgz", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, "requires": { @@ -6787,13 +6930,13 @@ }, "acorn-walk": { "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/acorn-walk/download/acorn-walk-7.2.0.tgz", + "resolved": "https://registry.nlark.com/acorn-walk/download/acorn-walk-7.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.nlark.com%2Facorn-walk%2Fdownload%2Facorn-walk-7.2.0.tgz", "integrity": "sha1-DeiJpgEgOQmw++B7iTjcIdLpZ7w=", "dev": true }, "agent-base": { "version": "6.0.2", - "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "requires": { @@ -6856,7 +6999,7 @@ }, "ansi-styles": { "version": "3.2.1", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-3.2.1.tgz", "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", "requires": { "color-convert": "^1.9.0" @@ -6864,13 +7007,13 @@ }, "ansi-wrap": { "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-wrap/download/ansi-wrap-0.1.0.tgz", + "resolved": "https://registry.nlark.com/ansi-wrap/download/ansi-wrap-0.1.0.tgz", "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", "dev": true }, "anymatch": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/anymatch/download/anymatch-2.0.0.tgz", + "resolved": "https://registry.nlark.com/anymatch/download/anymatch-2.0.0.tgz", "integrity": "sha1-vLJLTzeTTZqnrBe0ra+J58du8us=", "dev": true, "requires": { @@ -6889,7 +7032,7 @@ }, "archy": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz", + "resolved": "https://registry.nlark.com/archy/download/archy-1.0.0.tgz", "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", "dev": true }, @@ -6904,7 +7047,7 @@ }, "arr-diff": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/arr-diff/download/arr-diff-4.0.0.tgz", + "resolved": "https://registry.nlark.com/arr-diff/download/arr-diff-4.0.0.tgz", "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", "dev": true }, @@ -6919,13 +7062,13 @@ }, "arr-flatten": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.1.0.tgz", + "resolved": "https://registry.nlark.com/arr-flatten/download/arr-flatten-1.1.0.tgz", "integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE=", "dev": true }, "arr-map": { "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/arr-map/download/arr-map-2.0.2.tgz", + "resolved": "https://registry.nlark.com/arr-map/download/arr-map-2.0.2.tgz", "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", "dev": true, "requires": { @@ -6934,10 +7077,50 @@ }, "arr-union": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/arr-union/download/arr-union-3.1.0.tgz", + "resolved": "https://registry.nlark.com/arr-union/download/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "array-each": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/array-each/download/array-each-1.0.1.tgz", @@ -6945,21 +7128,21 @@ "dev": true }, "array-includes": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", - "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "version": "3.1.6", + "resolved": "https://registry.npmmirror.com/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2", - "get-intrinsic": "^1.1.1", - "is-string": "^1.0.5" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" }, "dependencies": { "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -6967,16 +7150,33 @@ "get-intrinsic": "^1.0.2" } }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true } } }, @@ -7042,49 +7242,142 @@ }, "array-union": { "version": "2.1.0", - "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz", + "resolved": "https://registry.npm.taobao.org/array-union/download/array-union-2.1.0.tgz?cache=0&sync_timestamp=1614624262896&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-union%2Fdownload%2Farray-union-2.1.0.tgz", "integrity": "sha1-t5hCCtvrHego2ErNii4j0+/oXo0=" }, "array-unique": { "version": "0.3.2", - "resolved": "https://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz", + "resolved": "https://registry.nlark.com/array-unique/download/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", "dev": true }, "array.prototype.flat": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", - "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - } - }, - "asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "dev": true, "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" }, "dependencies": { - "bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - } - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", "dev": true, "requires": { @@ -7115,12 +7408,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true - }, "async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -7144,13 +7431,13 @@ }, "async-each": { "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/async-each/download/async-each-1.0.3.tgz", + "resolved": "https://registry.nlark.com/async-each/download/async-each-1.0.3.tgz", "integrity": "sha1-tyfb+H12UWAvBvTUrDh/R9kbDL8=", "dev": true }, "async-settle": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/async-settle/download/async-settle-1.0.0.tgz", + "resolved": "https://registry.nlark.com/async-settle/download/async-settle-1.0.0.tgz", "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", "dev": true, "requires": { @@ -7159,13 +7446,13 @@ }, "asynckit": { "version": "0.4.0", - "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "atob": { "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/atob/download/atob-2.1.2.tgz", + "resolved": "https://registry.nlark.com/atob/download/atob-2.1.2.tgz", "integrity": "sha1-bZUX654DDSQ2ZmZR6GvZ9vE1M8k=", "dev": true }, @@ -7329,7 +7616,7 @@ }, "bach": { "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/bach/download/bach-1.2.0.tgz", + "resolved": "https://registry.npmmirror.com/bach/download/bach-1.2.0.tgz", "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", "dev": true, "requires": { @@ -7375,7 +7662,7 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { @@ -7384,7 +7671,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { @@ -7412,13 +7699,13 @@ }, "basic-auth": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/basic-auth/download/basic-auth-1.1.0.tgz", + "resolved": "https://registry.nlark.com/basic-auth/download/basic-auth-1.1.0.tgz", "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=", "dev": true }, "binary-extensions": { "version": "1.13.1", - "resolved": "https://registry.npm.taobao.org/binary-extensions/download/binary-extensions-1.13.1.tgz", + "resolved": "https://registry.nlark.com/binary-extensions/download/binary-extensions-1.13.1.tgz", "integrity": "sha1-WYr+VHVbKGilMw0q/51Ou1Mgm2U=", "dev": true }, @@ -7440,7 +7727,7 @@ }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", + "resolved": "https://registry.nlark.com/brace-expansion/download/brace-expansion-1.1.11.tgz", "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "requires": { "balanced-match": "^1.0.0", @@ -7498,7 +7785,7 @@ }, "browser-process-hrtime": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, @@ -7762,7 +8049,7 @@ }, "bs-logger": { "version": "0.2.6", - "resolved": "https://registry.npm.taobao.org/bs-logger/download/bs-logger-0.2.6.tgz", + "resolved": "https://registry.nlark.com/bs-logger/download/bs-logger-0.2.6.tgz", "integrity": "sha1-6302UwenLPl0zGzadraDVK0za9g=", "dev": true, "requires": { @@ -7826,7 +8113,7 @@ }, "cache-base": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/cache-base/download/cache-base-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/cache-base/download/cache-base-1.0.1.tgz?cache=0&sync_timestamp=1636237266442&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcache-base%2Fdownload%2Fcache-base-1.0.1.tgz", "integrity": "sha1-Cn9GQWgxyLZi7jb+TnxZ129marI=", "dev": true, "requires": { @@ -7859,12 +8146,12 @@ }, "callsites": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/callsites/download/callsites-3.1.0.tgz", + "resolved": "https://registry.nlark.com/callsites/download/callsites-3.1.0.tgz", "integrity": "sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=" }, "camelcase": { "version": "5.3.1", - "resolved": "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz", + "resolved": "https://registry.npmmirror.com/camelcase/download/camelcase-5.3.1.tgz?cache=0&sync_timestamp=1636945130104&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcamelcase%2Fdownload%2Fcamelcase-5.3.1.tgz", "integrity": "sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=", "dev": true }, @@ -7876,7 +8163,7 @@ }, "chalk": { "version": "2.4.2", - "resolved": "https://registry.npm.taobao.org/chalk/download/chalk-2.4.2.tgz?cache=0&sync_timestamp=1573282918610&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-2.4.2.tgz", + "resolved": "https://registry.npmmirror.com/chalk/download/chalk-2.4.2.tgz", "integrity": "sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=", "requires": { "ansi-styles": "^3.2.1", @@ -7893,12 +8180,12 @@ "child_process": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/child_process/-/child_process-1.0.2.tgz", - "integrity": "sha1-sffn/HPSXn/R1FWtyU4UODAYK1o=", + "integrity": "sha512-Wmza/JzL0SiWz7kl6MhIKT5ceIlnFPJX+lwUGj7Clhy5MMldsSoJR0+uvRzOS5Kv45Mq7t1PoE8TsOA9bzvb6g==", "dev": true }, "chokidar": { "version": "2.1.8", - "resolved": "https://registry.npm.taobao.org/chokidar/download/chokidar-2.1.8.tgz", + "resolved": "https://registry.npmmirror.com/chokidar/download/chokidar-2.1.8.tgz", "integrity": "sha1-gEs6e2qZNYw8XGHnHYco8EHP+Rc=", "dev": true, "requires": { @@ -7918,7 +8205,7 @@ "dependencies": { "glob-parent": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz?cache=0&sync_timestamp=1569108917227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob-parent%2Fdownload%2Fglob-parent-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/glob-parent/download/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { @@ -7928,7 +8215,7 @@ "dependencies": { "is-glob": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/is-glob/download/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { @@ -7956,7 +8243,7 @@ }, "ci-info": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ci-info/download/ci-info-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/ci-info/download/ci-info-2.0.0.tgz", "integrity": "sha1-Z6npZL4xpR4V5QENWObxKDQAL0Y=", "dev": true }, @@ -7978,7 +8265,7 @@ }, "class-utils": { "version": "0.3.6", - "resolved": "https://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz", + "resolved": "https://registry.nlark.com/class-utils/download/class-utils-0.3.6.tgz", "integrity": "sha1-+TNprouafOAv1B+q0MqDAzGQxGM=", "dev": true, "requires": { @@ -8018,7 +8305,7 @@ }, "clone": { "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/clone/download/clone-2.1.2.tgz", + "resolved": "https://registry.nlark.com/clone/download/clone-2.1.2.tgz", "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", "dev": true }, @@ -8053,7 +8340,7 @@ }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/code-point-at/download/code-point-at-1.1.0.tgz", + "resolved": "https://registry.npmmirror.com/code-point-at/download/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, @@ -8065,7 +8352,7 @@ }, "collection-map": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/collection-map/download/collection-map-1.0.0.tgz", + "resolved": "https://registry.nlark.com/collection-map/download/collection-map-1.0.0.tgz", "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", "dev": true, "requires": { @@ -8086,7 +8373,7 @@ }, "color-convert": { "version": "1.9.3", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-1.9.3.tgz", + "resolved": "https://registry.nlark.com/color-convert/download/color-convert-1.9.3.tgz", "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", "requires": { "color-name": "1.1.3" @@ -8137,7 +8424,7 @@ }, "combined-stream": { "version": "1.0.8", - "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", "dev": true, "requires": { @@ -8146,19 +8433,19 @@ }, "commander": { "version": "2.20.3", - "resolved": "https://registry.npm.taobao.org/commander/download/commander-2.20.3.tgz", + "resolved": "https://registry.npmmirror.com/commander/download/commander-2.20.3.tgz?cache=0&sync_timestamp=1634886357672&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fcommander%2Fdownload%2Fcommander-2.20.3.tgz", "integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=", "dev": true }, "commondir": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/commondir/-/commondir-1.0.1.tgz", "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", "dev": true }, "component-emitter": { "version": "1.3.0", - "resolved": "https://registry.npm.taobao.org/component-emitter/download/component-emitter-1.3.0.tgz", + "resolved": "https://registry.nlark.com/component-emitter/download/component-emitter-1.3.0.tgz", "integrity": "sha1-FuQHD7qK4ptnnyIVhT7hgasuq8A=", "dev": true }, @@ -8169,7 +8456,7 @@ }, "concat-stream": { "version": "1.6.2", - "resolved": "https://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconcat-stream%2Fdownload%2Fconcat-stream-1.6.2.tgz", + "resolved": "https://registry.nlark.com/concat-stream/download/concat-stream-1.6.2.tgz", "integrity": "sha1-kEvfGUzTEi/Gdcd/xKw9T/D9GjQ=", "dev": true, "requires": { @@ -8180,9 +8467,9 @@ } }, "confusing-browser-globals": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", - "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", "dev": true }, "console-browserify": { @@ -8207,7 +8494,7 @@ }, "copy-descriptor": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/copy-descriptor/download/copy-descriptor-0.1.1.tgz", + "resolved": "https://registry.nlark.com/copy-descriptor/download/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, @@ -8241,7 +8528,7 @@ "dependencies": { "semver": { "version": "7.0.0", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.0.0.tgz?cache=0&sync_timestamp=1581458063470&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.0.0.tgz", + "resolved": "https://registry.nlark.com/semver/download/semver-7.0.0.tgz?cache=0&sync_timestamp=1618846864940&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.0.0.tgz", "integrity": "sha1-XzyjV2HkfgWyBsba/yz4FPAxa44=", "dev": true } @@ -8249,13 +8536,13 @@ }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, "corser": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/corser/download/corser-2.0.1.tgz", + "resolved": "https://registry.nlark.com/corser/download/corser-2.0.1.tgz", "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", "dev": true }, @@ -8349,7 +8636,7 @@ }, "cssstyle": { "version": "2.3.0", - "resolved": "https://registry.npmmirror.com/cssstyle/-/cssstyle-2.3.0.tgz", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, "requires": { @@ -8358,7 +8645,7 @@ "dependencies": { "cssom": { "version": "0.3.8", - "resolved": "https://registry.npmmirror.com/cssom/-/cssom-0.3.8.tgz", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true } @@ -8396,13 +8683,13 @@ }, "decamelize": { "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz", + "resolved": "https://registry.npmmirror.com/decamelize/download/decamelize-1.2.0.tgz?cache=0&sync_timestamp=1633055760479&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fdecamelize%2Fdownload%2Fdecamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, "decimal.js": { "version": "10.3.1", - "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.3.1.tgz", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", "dev": true }, @@ -8415,7 +8702,7 @@ "dedent": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==" + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=" }, "deep-is": { "version": "0.1.3", @@ -8453,7 +8740,7 @@ }, "define-properties": { "version": "1.1.3", - "resolved": "https://registry.npm.taobao.org/define-properties/download/define-properties-1.1.3.tgz", + "resolved": "https://registry.nlark.com/define-properties/download/define-properties-1.1.3.tgz?cache=0&sync_timestamp=1618847174317&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdefine-properties%2Fdownload%2Fdefine-properties-1.1.3.tgz", "integrity": "sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=", "dev": true, "requires": { @@ -8472,7 +8759,7 @@ "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { @@ -8481,7 +8768,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { @@ -8533,7 +8820,7 @@ }, "delayed-stream": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, @@ -8592,7 +8879,7 @@ }, "diff-sequences": { "version": "24.9.0", - "resolved": "https://registry.npm.taobao.org/diff-sequences/download/diff-sequences-24.9.0.tgz?cache=0&sync_timestamp=1579655107286&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdiff-sequences%2Fdownload%2Fdiff-sequences-24.9.0.tgz", + "resolved": "https://registry.npmmirror.com/diff-sequences/download/diff-sequences-24.9.0.tgz", "integrity": "sha1-VxXWJE4qpl9Iu6C8ly2wsLEelbU=", "dev": true }, @@ -8677,7 +8964,7 @@ }, "ecstatic": { "version": "3.3.2", - "resolved": "https://registry.npm.taobao.org/ecstatic/download/ecstatic-3.3.2.tgz", + "resolved": "https://registry.npmmirror.com/ecstatic/download/ecstatic-3.3.2.tgz", "integrity": "sha1-bR3UmBTQBZRoLGUq22YHamnUbEg=", "dev": true, "requires": { @@ -8736,26 +9023,9 @@ "once": "^1.4.0" } }, - "enquirer": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", - "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1" - }, - "dependencies": { - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - } - } - }, "error-ex": { "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/error-ex/download/error-ex-1.3.2.tgz", + "resolved": "https://registry.nlark.com/error-ex/download/error-ex-1.3.2.tgz", "integrity": "sha1-tKxAZIEH/c3PriQvQovqihTU8b8=", "dev": true, "requires": { @@ -8763,33 +9033,51 @@ } }, "es-abstract": { - "version": "1.18.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", - "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "version": "1.21.3", + "resolved": "https://registry.npmmirror.com/es-abstract/-/es-abstract-1.21.3.tgz", + "integrity": "sha512-ZU4miiY1j3sGPFLJ34VJXEqhpmL+HGByCinGHv4HC+Fxl2fI2Z4yR6tl0mORnDr6PA8eihWo4LmSWDbvhALckg==", "dev": true, "requires": { + "array-buffer-byte-length": "^1.0.0", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.3", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.3", - "is-string": "^1.0.6", - "object-inspect": "^1.11.0", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" }, "dependencies": { "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -8797,43 +9085,149 @@ "get-intrinsic": "^1.0.2" } }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } }, "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, + "is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmmirror.com/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmmirror.com/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "version": "1.12.3", + "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmmirror.com/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } + }, + "regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + } + }, + "which-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmmirror.com/which-typed-array/-/which-typed-array-1.1.10.tgz", + "integrity": "sha512-uxoA5vLUfRPdjCuJ1h5LlYdmTLbYfums398v3WLkM+i/Wltl2/XyZpQWKbN++ck5L64SR/grOHqtXCUKmlZPNA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + } + } + } + }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true } } }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -8858,7 +9252,7 @@ }, "es6-iterator": { "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/es6-iterator/download/es6-iterator-2.0.3.tgz", + "resolved": "https://registry.nlark.com/es6-iterator/download/es6-iterator-2.0.3.tgz", "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "dev": true, "requires": { @@ -8891,17 +9285,17 @@ }, "escalade": { "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz?cache=0&sync_timestamp=1602567343144&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fescalade%2Fdownload%2Fescalade-3.1.1.tgz", + "resolved": "https://registry.npm.taobao.org/escalade/download/escalade-3.1.1.tgz", "integrity": "sha1-2M/ccACWXFoBdLSoLqpcBVJ0LkA=" }, "escape-string-regexp": { "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", + "resolved": "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/escodegen/-/escodegen-2.0.0.tgz", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, "requires": { @@ -8914,13 +9308,13 @@ "dependencies": { "estraverse": { "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, "source-map": { "version": "0.6.1", - "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, "optional": true @@ -8928,137 +9322,118 @@ } }, "eslint": { - "version": "7.32.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", - "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "version": "8.44.0", + "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.44.0.tgz", + "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", "dev": true, "requires": { - "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.3", - "@humanwhocodes/config-array": "^0.5.0", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", - "debug": "^4.0.1", + "debug": "^4.3.2", "doctrine": "^3.0.0", - "enquirer": "^2.3.5", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^2.0.0", - "espree": "^7.3.1", - "esquery": "^1.4.0", + "eslint-scope": "^7.2.0", + "eslint-visitor-keys": "^3.4.1", + "espree": "^9.6.0", + "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", - "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.1.2", - "globals": "^13.6.0", - "ignore": "^4.0.6", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "js-yaml": "^3.13.1", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", "lodash.merge": "^4.6.2", - "minimatch": "^3.0.4", + "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "progress": "^2.0.0", - "regexpp": "^3.1.0", - "semver": "^7.2.1", - "strip-ansi": "^6.0.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", - "table": "^6.0.9", - "text-table": "^0.2.0", - "v8-compile-cache": "^2.0.3" + "text-table": "^0.2.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "@eslint/js": { + "version": "8.44.0", + "resolved": "https://registry.npmmirror.com/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "dev": true + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", "dev": true, "requires": { - "@babel/highlight": "^7.10.4" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" } }, - "@babel/helper-validator-identifier": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", - "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, - "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" } }, "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, "chalk": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } } }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { @@ -9067,13 +9442,13 @@ }, "color-name": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "cross-spawn": { "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { @@ -9082,42 +9457,71 @@ "which": "^2.0.1" } }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, "escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "requires": { - "is-glob": "^4.0.1" + "is-glob": "^4.0.3" + }, + "dependencies": { + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } } }, "globals": { - "version": "13.11.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", - "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "version": "13.20.0", + "resolved": "https://registry.npmmirror.com/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -9125,19 +9529,22 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", - "dev": true + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } }, "levn": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "resolved": "https://registry.npmmirror.com/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { @@ -9145,44 +9552,68 @@ "type-check": "~0.4.0" } }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "requires": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" } }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "prelude-ls": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { @@ -9191,22 +9622,31 @@ }, "shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "ansi-regex": "^5.0.0" + "has-flag": "^4.0.0" } }, "type-check": { "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { @@ -9215,59 +9655,96 @@ }, "type-fest": { "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "resolved": "https://registry.npmmirror.com/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } } } }, "eslint-config-airbnb-base": { - "version": "14.2.1", - "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", - "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "version": "15.0.0", + "resolved": "https://registry.npmmirror.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", "dev": true, "requires": { "confusing-browser-globals": "^1.0.10", "object.assign": "^4.1.2", - "object.entries": "^1.1.2" + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.4", + "resolved": "https://registry.npmmirror.com/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true } } }, "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "version": "0.3.7", + "resolved": "https://registry.npmmirror.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dev": true, "requires": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" }, "dependencies": { "debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { @@ -9275,252 +9752,103 @@ } }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.2", + "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } } } }, "eslint-module-utils": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", - "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", + "version": "2.8.0", + "resolved": "https://registry.npmmirror.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", "dev": true, "requires": { - "debug": "^3.2.7", - "pkg-dir": "^2.0.0" + "debug": "^3.2.7" }, "dependencies": { "debug": { "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - } } } }, "eslint-plugin-import": { - "version": "2.24.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.1.tgz", - "integrity": "sha512-KSFWhNxPH8OGJwpRJJs+Z7I0a13E2iFQZJIvSnCu6KUs4qmgAm3xN9GYBCSoiGWmwA7gERZPXqYQjcoCROnYhQ==", + "version": "2.27.5", + "resolved": "https://registry.npmmirror.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz", + "integrity": "sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==", "dev": true, "requires": { - "array-includes": "^3.1.3", - "array.prototype.flat": "^1.2.4", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.6.2", - "find-up": "^2.0.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.6.0", - "minimatch": "^3.0.4", - "object.values": "^1.1.4", - "pkg-up": "^2.0.0", - "read-pkg-up": "^3.0.0", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.10.1" + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", + "tsconfig-paths": "^3.14.1" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "doctrine": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "resolved": "https://registry.npmmirror.com/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { "esutils": "^2.0.2" } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "is-extglob": "^2.1.1" } }, "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.2", + "resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", "dev": true, "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true } } @@ -9547,36 +9875,27 @@ "estraverse": "^4.1.1" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^2.0.0" - } - }, "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "version": "3.4.1", + "resolved": "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", "dev": true }, "espree": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", - "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "version": "9.6.0", + "resolved": "https://registry.npmmirror.com/espree/-/espree-9.6.0.tgz", + "integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==", "dev": true, "requires": { - "acorn": "^7.4.0", - "acorn-jsx": "^5.3.1", - "eslint-visitor-keys": "^1.3.0" + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" }, "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true } } @@ -9588,18 +9907,18 @@ "dev": true }, "esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", "dev": true, "requires": { "estraverse": "^5.1.0" }, "dependencies": { "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "version": "5.3.0", + "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true } } @@ -9659,7 +9978,7 @@ }, "execa": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/execa/download/execa-1.0.0.tgz?cache=0&sync_timestamp=1576749091315&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz", + "resolved": "https://registry.npmmirror.com/execa/download/execa-1.0.0.tgz?cache=0&sync_timestamp=1637147207309&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fexeca%2Fdownload%2Fexeca-1.0.0.tgz", "integrity": "sha1-xiNqW7TfbW8V6I5/AXeYIWdJ3dg=", "dev": true, "requires": { @@ -9695,7 +10014,7 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "resolved": "https://registry.npmmirror.com/debug/download/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { @@ -9713,7 +10032,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "resolved": "https://registry.nlark.com/extend-shallow/download/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -9722,7 +10041,7 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } @@ -9730,7 +10049,7 @@ }, "expand-tilde": { "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/expand-tilde/download/expand-tilde-2.0.2.tgz", + "resolved": "https://registry.nlark.com/expand-tilde/download/expand-tilde-2.0.2.tgz", "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", "dev": true, "requires": { @@ -9739,7 +10058,7 @@ }, "expect": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/expect/download/expect-26.6.2.tgz?cache=0&sync_timestamp=1616701586390&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fexpect%2Fdownload%2Fexpect-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/expect/download/expect-26.6.2.tgz", "integrity": "sha1-xrmWvya/P+GLZ7LQ9R/JgbqTRBc=", "dev": true, "requires": { @@ -9753,7 +10072,7 @@ "dependencies": { "@jest/types": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/@jest/types/download/@jest/types-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/@jest/types/download/@jest/types-26.6.2.tgz", "integrity": "sha1-vvWlMgMOHYii9abZM/hOlyJu1I4=", "dev": true, "requires": { @@ -9784,7 +10103,7 @@ }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1611327117754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, "requires": { @@ -9803,7 +10122,7 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, "requires": { @@ -9818,19 +10137,19 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", + "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true }, "jest-get-type": { "version": "26.3.0", - "resolved": "https://registry.npm.taobao.org/jest-get-type/download/jest-get-type-26.3.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-get-type/download/jest-get-type-26.3.0.tgz", "integrity": "sha1-6X3Dw/U8K0Bsp6+u1Ek7HQmRmeA=", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611394043517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, "requires": { @@ -9864,7 +10183,7 @@ }, "extend-shallow": { "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-3.0.2.tgz", + "resolved": "https://registry.nlark.com/extend-shallow/download/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, "requires": { @@ -9874,7 +10193,7 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "resolved": "https://registry.nlark.com/is-extendable/download/is-extendable-1.0.1.tgz", "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "dev": true, "requires": { @@ -9885,7 +10204,7 @@ }, "extglob": { "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/extglob/download/extglob-2.0.4.tgz", + "resolved": "https://registry.nlark.com/extglob/download/extglob-2.0.4.tgz", "integrity": "sha1-rQD+TcYSqSMuhxhxHcXLWrAoVUM=", "dev": true, "requires": { @@ -9910,7 +10229,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "resolved": "https://registry.nlark.com/extend-shallow/download/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -9919,7 +10238,7 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { @@ -9928,7 +10247,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { @@ -9950,7 +10269,7 @@ }, "fancy-log": { "version": "1.3.3", - "resolved": "https://registry.npm.taobao.org/fancy-log/download/fancy-log-1.3.3.tgz", + "resolved": "https://registry.nlark.com/fancy-log/download/fancy-log-1.3.3.tgz", "integrity": "sha1-28GRVPVYaQFQojlToK29A1vkX8c=", "dev": true, "requires": { @@ -10031,7 +10350,7 @@ }, "fast-levenshtein": { "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", + "resolved": "https://registry.nlark.com/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, "fast-safe-stringify": { @@ -10186,7 +10505,7 @@ }, "for-own": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/for-own/download/for-own-1.0.0.tgz", + "resolved": "https://registry.nlark.com/for-own/download/for-own-1.0.0.tgz", "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", "dev": true, "requires": { @@ -10195,7 +10514,7 @@ }, "fragment-cache": { "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/fragment-cache/download/fragment-cache-0.2.1.tgz", + "resolved": "https://registry.nlark.com/fragment-cache/download/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, "requires": { @@ -10205,12 +10524,12 @@ "fs": { "version": "0.0.1-security", "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", - "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==", "dev": true }, "fs-extra": { "version": "7.0.1", - "resolved": "https://registry.npm.taobao.org/fs-extra/download/fs-extra-7.0.1.tgz", + "resolved": "https://registry.nlark.com/fs-extra/download/fs-extra-7.0.1.tgz", "integrity": "sha1-TxicRKoSO4lfcigE9V6iPq3DSOk=", "dev": true, "requires": { @@ -10221,7 +10540,7 @@ }, "fs-mkdirp-stream": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs-mkdirp-stream/download/fs-mkdirp-stream-1.0.0.tgz", + "resolved": "https://registry.nlark.com/fs-mkdirp-stream/download/fs-mkdirp-stream-1.0.0.tgz", "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", "dev": true, "requires": { @@ -10231,7 +10550,7 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", + "resolved": "https://registry.nlark.com/fs.realpath/download/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { @@ -10864,7 +11183,7 @@ }, "function-bind": { "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", + "resolved": "https://registry.nlark.com/function-bind/download/function-bind-1.1.1.tgz", "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=" }, "function.prototype.name": { @@ -11037,12 +11356,6 @@ } } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -11051,7 +11364,7 @@ }, "gensync": { "version": "1.0.0-beta.2", - "resolved": "https://registry.npm.taobao.org/gensync/download/gensync-1.0.0-beta.2.tgz", + "resolved": "https://registry.nlark.com/gensync/download/gensync-1.0.0-beta.2.tgz", "integrity": "sha1-MqbudsPX9S1GsrGuXZP+qFgKJeA=" }, "get-assigned-identifiers": { @@ -11085,7 +11398,7 @@ }, "get-stream": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/get-stream/download/get-stream-4.1.0.tgz", + "resolved": "https://registry.nlark.com/get-stream/download/get-stream-4.1.0.tgz", "integrity": "sha1-wbJVV189wh1Zv8ec09K0axw6VLU=", "dev": true, "requires": { @@ -11127,7 +11440,7 @@ }, "get-value": { "version": "2.0.6", - "resolved": "https://registry.npm.taobao.org/get-value/download/get-value-2.0.6.tgz", + "resolved": "https://registry.nlark.com/get-value/download/get-value-2.0.6.tgz", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, @@ -11166,7 +11479,7 @@ }, "glob-stream": { "version": "6.1.0", - "resolved": "https://registry.npm.taobao.org/glob-stream/download/glob-stream-6.1.0.tgz", + "resolved": "https://registry.nlark.com/glob-stream/download/glob-stream-6.1.0.tgz", "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", "dev": true, "requires": { @@ -11184,7 +11497,7 @@ "dependencies": { "glob-parent": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/glob-parent/download/glob-parent-3.1.0.tgz?cache=0&sync_timestamp=1569108917227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglob-parent%2Fdownload%2Fglob-parent-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/glob-parent/download/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "dev": true, "requires": { @@ -11194,7 +11507,7 @@ }, "is-glob": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/is-glob/download/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { @@ -11219,7 +11532,7 @@ }, "global-modules": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/global-modules/download/global-modules-1.0.0.tgz?cache=0&sync_timestamp=1571657602039&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fglobal-modules%2Fdownload%2Fglobal-modules-1.0.0.tgz", + "resolved": "https://registry.nlark.com/global-modules/download/global-modules-1.0.0.tgz", "integrity": "sha1-bXcPDrUjrHgWTXK15xqIdyZcw+o=", "dev": true, "requires": { @@ -11254,9 +11567,18 @@ }, "globals": { "version": "11.12.0", - "resolved": "https://registry.npm.taobao.org/globals/download/globals-11.12.0.tgz", + "resolved": "https://registry.npmmirror.com/globals/download/globals-11.12.0.tgz", "integrity": "sha1-q4eVM4hooLq9hSV1gBjCp+uVxC4=" }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, "globby": { "version": "11.0.1", "resolved": "https://registry.npm.taobao.org/globby/download/globby-11.0.1.tgz", @@ -11279,15 +11601,44 @@ } } }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/glogg/download/glogg-1.0.2.tgz", - "integrity": "sha1-LX3XAr7aIus7/634gGltpthGMT8=", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.nlark.com/glogg/download/glogg-1.0.2.tgz", + "integrity": "sha1-LX3XAr7aIus7/634gGltpthGMT8=", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + }, + "dependencies": { + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.2.3.tgz", @@ -11298,6 +11649,12 @@ "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==" }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "gulp": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", @@ -11313,7 +11670,7 @@ "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", "dev": true }, "gulp-cli": { @@ -11344,7 +11701,7 @@ }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-fullwidth-code-point/download/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { @@ -11353,7 +11710,7 @@ }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/string-width/download/string-width-1.0.2.tgz?cache=0&sync_timestamp=1632421309919&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstring-width%2Fdownload%2Fstring-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { @@ -11469,7 +11826,7 @@ }, "gulplog": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/gulplog/download/gulplog-1.0.0.tgz", + "resolved": "https://registry.nlark.com/gulplog/download/gulplog-1.0.0.tgz", "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", "dev": true, "requires": { @@ -11478,7 +11835,7 @@ }, "has": { "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/has/download/has-1.0.3.tgz", + "resolved": "https://registry.nlark.com/has/download/has-1.0.3.tgz", "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", "requires": { "function-bind": "^1.1.1" @@ -11492,7 +11849,7 @@ }, "has-flag": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz", + "resolved": "https://registry.nlark.com/has-flag/download/has-flag-3.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-gulplog": { @@ -11526,6 +11883,12 @@ } } }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, "has-symbols": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.1.tgz", @@ -11551,7 +11914,7 @@ }, "has-value": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-1.0.0.tgz", + "resolved": "https://registry.nlark.com/has-value/download/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, "requires": { @@ -11562,7 +11925,7 @@ }, "has-values": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-1.0.0.tgz", + "resolved": "https://registry.nlark.com/has-values/download/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, "requires": { @@ -11676,7 +12039,7 @@ }, "http-proxy": { "version": "1.18.1", - "resolved": "https://registry.npm.taobao.org/http-proxy/download/http-proxy-1.18.1.tgz", + "resolved": "https://registry.nlark.com/http-proxy/download/http-proxy-1.18.1.tgz?cache=0&sync_timestamp=1618847045732&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhttp-proxy%2Fdownload%2Fhttp-proxy-1.18.1.tgz", "integrity": "sha1-QBVB8FNIhLv5UmAzTnL4juOXZUk=", "dev": true, "requires": { @@ -11687,7 +12050,7 @@ }, "http-server": { "version": "0.12.3", - "resolved": "https://registry.npm.taobao.org/http-server/download/http-server-0.12.3.tgz", + "resolved": "https://registry.npmmirror.com/http-server/download/http-server-0.12.3.tgz?cache=0&sync_timestamp=1634685922991&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fhttp-server%2Fdownload%2Fhttp-server-0.12.3.tgz", "integrity": "sha1-ugRx0OzEJYhmFss1xPryeRQKDTc=", "dev": true, "requires": { @@ -11711,7 +12074,7 @@ }, "https-proxy-agent": { "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "requires": { @@ -11732,9 +12095,9 @@ "dev": true }, "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "version": "5.2.4", + "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "import-fresh": { @@ -11758,7 +12121,7 @@ }, "imurmurhash": { "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz", + "resolved": "https://registry.nlark.com/imurmurhash/download/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "indent-string": { @@ -11778,7 +12141,7 @@ }, "inherits": { "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz", + "resolved": "https://registry.nlark.com/inherits/download/inherits-2.0.4.tgz", "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=" }, "ini": { @@ -11846,7 +12209,7 @@ }, "invariant": { "version": "2.2.4", - "resolved": "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz", + "resolved": "https://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz?cache=0&sync_timestamp=1615984365242&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finvariant%2Fdownload%2Finvariant-2.2.4.tgz", "integrity": "sha1-YQ88ksk1nOHbYW5TgAjSP/NRWOY=", "dev": true, "requires": { @@ -11855,7 +12218,7 @@ }, "invert-kv": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/invert-kv/download/invert-kv-1.0.0.tgz", + "resolved": "https://registry.nlark.com/invert-kv/download/invert-kv-1.0.0.tgz?cache=0&sync_timestamp=1630996809231&other_urls=https%3A%2F%2Fregistry.nlark.com%2Finvert-kv%2Fdownload%2Finvert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", "dev": true }, @@ -11871,7 +12234,7 @@ }, "is-accessor-descriptor": { "version": "0.1.6", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", + "resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, "requires": { @@ -11922,6 +12285,60 @@ } } }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmmirror.com/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + } + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz", @@ -11939,7 +12356,7 @@ }, "is-binary-path": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-binary-path/download/is-binary-path-1.0.1.tgz", + "resolved": "https://registry.nlark.com/is-binary-path/download/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "dev": true, "requires": { @@ -11981,7 +12398,7 @@ }, "is-buffer": { "version": "1.1.6", - "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz", + "resolved": "https://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz?cache=0&sync_timestamp=1604432327227&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fis-buffer%2Fdownload%2Fis-buffer-1.1.6.tgz", "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "dev": true }, @@ -11993,7 +12410,7 @@ }, "is-ci": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/is-ci/download/is-ci-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/is-ci/download/is-ci-2.0.0.tgz?cache=0&sync_timestamp=1635261061017&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fis-ci%2Fdownload%2Fis-ci-2.0.0.tgz", "integrity": "sha1-a8YzQYGBDgS1wis9WJ/cpVAmQEw=", "dev": true, "requires": { @@ -12001,9 +12418,9 @@ } }, "is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "version": "2.12.1", + "resolved": "https://registry.npmmirror.com/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", "dev": true, "requires": { "has": "^1.0.3" @@ -12011,7 +12428,7 @@ }, "is-data-descriptor": { "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", + "resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, "requires": { @@ -12059,14 +12476,14 @@ }, "is-docker": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "resolved": "https://registry.npmmirror.com/is-docker/-/is-docker-2.2.1.tgz", "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, "optional": true }, "is-extendable": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz", + "resolved": "https://registry.nlark.com/is-extendable/download/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, @@ -12107,20 +12524,20 @@ }, "is-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "resolved": "https://registry.npmmirror.com/is-module/-/is-module-1.0.0.tgz", "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", "dev": true }, "is-negated-glob": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-negated-glob/download/is-negated-glob-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-negated-glob/download/is-negated-glob-1.0.0.tgz", "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", "dev": true }, "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", "dev": true }, "is-number": { @@ -12174,7 +12591,7 @@ }, "is-potential-custom-element-name": { "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, @@ -12263,7 +12680,7 @@ }, "is-stream": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz", + "resolved": "https://registry.nlark.com/is-stream/download/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, @@ -12519,13 +12936,13 @@ }, "is-windows": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz", + "resolved": "https://registry.nlark.com/is-windows/download/is-windows-1.0.2.tgz", "integrity": "sha1-0YUOuXkezRjmGCzhKjDzlmNLsZ0=", "dev": true }, "is-wsl": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "resolved": "https://registry.npmmirror.com/is-wsl/-/is-wsl-2.2.0.tgz", "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "optional": true, @@ -12535,13 +12952,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz?cache=0&sync_timestamp=1562592096220&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fisarray%2Fdownload%2Fisarray-1.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, "isexe": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz", + "resolved": "https://registry.nlark.com/isexe/download/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { @@ -13544,7 +13961,7 @@ }, "jest-diff": { "version": "24.9.0", - "resolved": "https://registry.npm.taobao.org/jest-diff/download/jest-diff-24.9.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-diff/download/jest-diff-24.9.0.tgz", "integrity": "sha1-kxt9DVd4obr3RSy4FuMl43JAVdo=", "dev": true, "requires": { @@ -14016,7 +14433,7 @@ }, "@types/istanbul-reports": { "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/@types/istanbul-reports/download/@types/istanbul-reports-3.0.1.tgz", + "resolved": "https://registry.npmmirror.com/@types/istanbul-reports/download/@types/istanbul-reports-3.0.1.tgz?cache=0&sync_timestamp=1637266160892&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fistanbul-reports%2Fdownload%2F%40types%2Fistanbul-reports-3.0.1.tgz", "integrity": "sha1-kVP+mLuivVZaY63ZQ21vDX+EaP8=", "dev": true, "requires": { @@ -14025,7 +14442,7 @@ }, "@types/yargs": { "version": "16.0.4", - "resolved": "https://registry.npmmirror.com/@types/yargs/download/@types/yargs-16.0.4.tgz", + "resolved": "https://registry.npmmirror.com/@types/yargs/download/@types/yargs-16.0.4.tgz?cache=0&sync_timestamp=1637271118840&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fyargs%2Fdownload%2F%40types%2Fyargs-16.0.4.tgz", "integrity": "sha1-JqrZjdLCo45CEIbqmtQrnlFkKXc=", "dev": true, "requires": { @@ -14040,7 +14457,7 @@ }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995588464&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, "requires": { @@ -14049,7 +14466,7 @@ }, "chalk": { "version": "4.1.2", - "resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.2.tgz?cache=0&sync_timestamp=1627646655305&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.2.tgz", + "resolved": "https://registry.npmmirror.com/chalk/download/chalk-4.1.2.tgz", "integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=", "dev": true, "requires": { @@ -14128,7 +14545,7 @@ "dependencies": { "ansi-styles": { "version": "5.2.0", - "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-5.2.0.tgz?cache=0&sync_timestamp=1618995588464&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-5.2.0.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-5.2.0.tgz", "integrity": "sha1-B0SWkK1Fd30ZJKwquy/IiV26g2s=", "dev": true } @@ -14136,7 +14553,7 @@ }, "react-is": { "version": "17.0.2", - "resolved": "https://registry.npmmirror.com/react-is/download/react-is-17.0.2.tgz?cache=0&sync_timestamp=1637338596901&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Freact-is%2Fdownload%2Freact-is-17.0.2.tgz", + "resolved": "https://registry.npmmirror.com/react-is/download/react-is-17.0.2.tgz", "integrity": "sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=", "dev": true }, @@ -14153,7 +14570,7 @@ }, "jest-get-type": { "version": "24.9.0", - "resolved": "https://registry.npm.taobao.org/jest-get-type/download/jest-get-type-24.9.0.tgz?cache=0&sync_timestamp=1579655144842&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-get-type%2Fdownload%2Fjest-get-type-24.9.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-get-type/download/jest-get-type-24.9.0.tgz", "integrity": "sha1-FoSgyKUPLkkBtmRK6GH1ee7S7w4=", "dev": true }, @@ -14446,7 +14863,7 @@ }, "jest-matcher-deep-close-to": { "version": "2.0.1", - "resolved": "https://registry.nlark.com/jest-matcher-deep-close-to/download/jest-matcher-deep-close-to-2.0.1.tgz", + "resolved": "https://registry.npmmirror.com/jest-matcher-deep-close-to/download/jest-matcher-deep-close-to-2.0.1.tgz", "integrity": "sha1-L50NpE94oWo5BNGJguOV6Y43XFo=", "dev": true, "requires": { @@ -14455,7 +14872,7 @@ "dependencies": { "@jest/types": { "version": "25.5.0", - "resolved": "https://registry.nlark.com/@jest/types/download/@jest/types-25.5.0.tgz?cache=0&sync_timestamp=1624900057884&other_urls=https%3A%2F%2Fregistry.nlark.com%2F%40jest%2Ftypes%2Fdownload%2F%40jest%2Ftypes-25.5.0.tgz", + "resolved": "https://registry.npmmirror.com/@jest/types/download/@jest/types-25.5.0.tgz", "integrity": "sha1-TWpHk/e5WZ/DaAh3uFapfbzPKp0=", "dev": true, "requires": { @@ -14467,7 +14884,7 @@ }, "@types/yargs": { "version": "15.0.14", - "resolved": "https://registry.nlark.com/@types/yargs/download/@types/yargs-15.0.14.tgz", + "resolved": "https://registry.npmmirror.com/@types/yargs/download/@types/yargs-15.0.14.tgz?cache=0&sync_timestamp=1637271118840&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Fyargs%2Fdownload%2F%40types%2Fyargs-15.0.14.tgz", "integrity": "sha1-Jtgh3biecEkhYLZtEKDrbfj2+wY=", "dev": true, "requires": { @@ -14491,7 +14908,7 @@ }, "chalk": { "version": "3.0.0", - "resolved": "https://registry.nlark.com/chalk/download/chalk-3.0.0.tgz?cache=0&sync_timestamp=1618995367379&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-3.0.0.tgz", + "resolved": "https://registry.npmmirror.com/chalk/download/chalk-3.0.0.tgz", "integrity": "sha1-P3PCv1JlkfV0zEksUeJFY0n4ROQ=", "dev": true, "requires": { @@ -14501,7 +14918,7 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, "requires": { @@ -14516,7 +14933,7 @@ }, "diff-sequences": { "version": "25.2.6", - "resolved": "https://registry.nlark.com/diff-sequences/download/diff-sequences-25.2.6.tgz?cache=0&sync_timestamp=1624900057366&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fdiff-sequences%2Fdownload%2Fdiff-sequences-25.2.6.tgz", + "resolved": "https://registry.npmmirror.com/diff-sequences/download/diff-sequences-25.2.6.tgz", "integrity": "sha1-X0Z8AO3TU1K3vKRteSfWDmh6dt0=", "dev": true }, @@ -14528,7 +14945,7 @@ }, "jest-diff": { "version": "25.5.0", - "resolved": "https://registry.nlark.com/jest-diff/download/jest-diff-25.5.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-diff/download/jest-diff-25.5.0.tgz", "integrity": "sha1-HdJu1k+WZnwGjO8Ca2d9+gGvz6k=", "dev": true, "requires": { @@ -14540,13 +14957,13 @@ }, "jest-get-type": { "version": "25.2.6", - "resolved": "https://registry.nlark.com/jest-get-type/download/jest-get-type-25.2.6.tgz?cache=0&sync_timestamp=1624900056951&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fjest-get-type%2Fdownload%2Fjest-get-type-25.2.6.tgz", + "resolved": "https://registry.npmmirror.com/jest-get-type/download/jest-get-type-25.2.6.tgz", "integrity": "sha1-Cwoy+riQi0TVCL6BaBSH26u42Hc=", "dev": true }, "jest-matcher-utils": { "version": "25.4.0", - "resolved": "https://registry.nlark.com/jest-matcher-utils/download/jest-matcher-utils-25.4.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-matcher-utils/download/jest-matcher-utils-25.4.0.tgz", "integrity": "sha1-3D567EAqHlZ+2AtXK5rShYeIleY=", "dev": true, "requires": { @@ -14558,7 +14975,7 @@ }, "pretty-format": { "version": "25.5.0", - "resolved": "https://registry.nlark.com/pretty-format/download/pretty-format-25.5.0.tgz", + "resolved": "https://registry.npmmirror.com/pretty-format/download/pretty-format-25.5.0.tgz", "integrity": "sha1-eHPB13T2gsNLjUi2dDor8qxVeRo=", "dev": true, "requires": { @@ -14570,7 +14987,7 @@ }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, "requires": { @@ -14581,7 +14998,7 @@ }, "jest-matcher-utils": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/jest-matcher-utils/download/jest-matcher-utils-26.6.2.tgz?cache=0&sync_timestamp=1616701585427&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-matcher-utils%2Fdownload%2Fjest-matcher-utils-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/jest-matcher-utils/download/jest-matcher-utils-26.6.2.tgz", "integrity": "sha1-jm/W6GPIstMaxkcu6yN7xZXlPno=", "dev": true, "requires": { @@ -14593,7 +15010,7 @@ "dependencies": { "@jest/types": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/@jest/types/download/@jest/types-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/@jest/types/download/@jest/types-26.6.2.tgz", "integrity": "sha1-vvWlMgMOHYii9abZM/hOlyJu1I4=", "dev": true, "requires": { @@ -14630,7 +15047,7 @@ }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1611327117754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, "requires": { @@ -14649,7 +15066,7 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, "requires": { @@ -14664,19 +15081,19 @@ }, "diff-sequences": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/diff-sequences/download/diff-sequences-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/diff-sequences/download/diff-sequences-26.6.2.tgz", "integrity": "sha1-SLqZFX3hkjQS7tQdtrbUqpynwLE=", "dev": true }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", + "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true }, "jest-diff": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/jest-diff/download/jest-diff-26.6.2.tgz?cache=0&sync_timestamp=1616701585219&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-diff%2Fdownload%2Fjest-diff-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/jest-diff/download/jest-diff-26.6.2.tgz", "integrity": "sha1-GqdGi1LDpo19XF/c381eSb0WQ5Q=", "dev": true, "requires": { @@ -14688,13 +15105,13 @@ }, "jest-get-type": { "version": "26.3.0", - "resolved": "https://registry.npm.taobao.org/jest-get-type/download/jest-get-type-26.3.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-get-type/download/jest-get-type-26.3.0.tgz", "integrity": "sha1-6X3Dw/U8K0Bsp6+u1Ek7HQmRmeA=", "dev": true }, "pretty-format": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/pretty-format/download/pretty-format-26.6.2.tgz?cache=0&sync_timestamp=1616701219088&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpretty-format%2Fdownload%2Fpretty-format-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/pretty-format/download/pretty-format-26.6.2.tgz", "integrity": "sha1-41wnBfFMt/4v6U+geDRbREEg/JM=", "dev": true, "requires": { @@ -14706,13 +15123,13 @@ }, "react-is": { "version": "17.0.2", - "resolved": "https://registry.npm.taobao.org/react-is/download/react-is-17.0.2.tgz", + "resolved": "https://registry.npmmirror.com/react-is/download/react-is-17.0.2.tgz", "integrity": "sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611394043517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, "requires": { @@ -14723,7 +15140,7 @@ }, "jest-message-util": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/jest-message-util/download/jest-message-util-26.6.2.tgz?cache=0&sync_timestamp=1616701584149&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-message-util%2Fdownload%2Fjest-message-util-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/jest-message-util/download/jest-message-util-26.6.2.tgz", "integrity": "sha1-WBc3RK1vwFBrXSEVC5vlbvABygc=", "dev": true, "requires": { @@ -14740,7 +15157,7 @@ "dependencies": { "@jest/types": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/@jest/types/download/@jest/types-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/@jest/types/download/@jest/types-26.6.2.tgz", "integrity": "sha1-vvWlMgMOHYii9abZM/hOlyJu1I4=", "dev": true, "requires": { @@ -14777,7 +15194,7 @@ }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1611327117754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, "requires": { @@ -14805,7 +15222,7 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, "requires": { @@ -14835,7 +15252,7 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", + "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true }, @@ -14857,7 +15274,7 @@ }, "pretty-format": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/pretty-format/download/pretty-format-26.6.2.tgz?cache=0&sync_timestamp=1616701219088&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpretty-format%2Fdownload%2Fpretty-format-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/pretty-format/download/pretty-format-26.6.2.tgz", "integrity": "sha1-41wnBfFMt/4v6U+geDRbREEg/JM=", "dev": true, "requires": { @@ -14869,13 +15286,13 @@ }, "react-is": { "version": "17.0.2", - "resolved": "https://registry.npm.taobao.org/react-is/download/react-is-17.0.2.tgz", + "resolved": "https://registry.npmmirror.com/react-is/download/react-is-17.0.2.tgz", "integrity": "sha1-5pHUqOnHiTZWVVOas3J2Kw77VPA=", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611394043517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, "requires": { @@ -14994,7 +15411,7 @@ }, "jest-regex-util": { "version": "26.0.0", - "resolved": "https://registry.npm.taobao.org/jest-regex-util/download/jest-regex-util-26.0.0.tgz?cache=0&sync_timestamp=1607352728942&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-regex-util%2Fdownload%2Fjest-regex-util-26.0.0.tgz", + "resolved": "https://registry.npmmirror.com/jest-regex-util/download/jest-regex-util-26.0.0.tgz", "integrity": "sha1-0l5xhLNuOf1GbDvEG+CXHoIf7ig=", "dev": true }, @@ -16283,7 +16700,7 @@ }, "jest-util": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/jest-util/download/jest-util-26.6.2.tgz?cache=0&sync_timestamp=1616701582882&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fjest-util%2Fdownload%2Fjest-util-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/jest-util/download/jest-util-26.6.2.tgz", "integrity": "sha1-kHU12+TVpstMR6ybkm9q8pV2y8E=", "dev": true, "requires": { @@ -16297,7 +16714,7 @@ "dependencies": { "@jest/types": { "version": "26.6.2", - "resolved": "https://registry.npm.taobao.org/@jest/types/download/@jest/types-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/@jest/types/download/@jest/types-26.6.2.tgz", "integrity": "sha1-vvWlMgMOHYii9abZM/hOlyJu1I4=", "dev": true, "requires": { @@ -16328,7 +16745,7 @@ }, "ansi-styles": { "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1611327117754&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", + "resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz", "integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "dev": true, "requires": { @@ -16356,7 +16773,7 @@ }, "color-convert": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", + "resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz", "integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "dev": true, "requires": { @@ -16386,7 +16803,7 @@ }, "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/has-flag/download/has-flag-4.0.0.tgz", + "resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626715907927&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", "integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "dev": true }, @@ -16408,7 +16825,7 @@ }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1611394043517&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz", "integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "dev": true, "requires": { @@ -16700,7 +17117,7 @@ }, "jest-worker": { "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-26.6.2.tgz", "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", "dev": true, "requires": { @@ -16711,13 +17128,13 @@ "dependencies": { "has-flag": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "supports-color": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { @@ -16733,7 +17150,7 @@ }, "js-tokens": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz", + "resolved": "https://registry.nlark.com/js-tokens/download/js-tokens-4.0.0.tgz", "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=" }, "js-yaml": { @@ -16748,7 +17165,7 @@ }, "jsdom": { "version": "19.0.0", - "resolved": "https://registry.npmmirror.com/jsdom/-/jsdom-19.0.0.tgz", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-19.0.0.tgz", "integrity": "sha512-RYAyjCbxy/vri/CfnjUWJQQtZ3LKlLnDqj+9XLNnJPgEGeirZs3hllKR20re8LUZ6o1b1X4Jat+Qd26zmP41+A==", "dev": true, "requires": { @@ -16789,7 +17206,7 @@ }, "acorn": { "version": "8.7.1", - "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.7.1.tgz", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", "dev": true }, @@ -16936,15 +17353,9 @@ }, "jsesc": { "version": "2.5.2", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-2.5.2.tgz", + "resolved": "https://registry.nlark.com/jsesc/download/jsesc-2.5.2.tgz", "integrity": "sha1-gFZNLkg9rPbo7yCWUKZ98/DCg6Q=" }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -16953,12 +17364,12 @@ }, "json-schema-traverse": { "version": "0.4.1", - "resolved": "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", + "resolved": "https://registry.nlark.com/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz", + "resolved": "https://registry.nlark.com/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" }, "json5": { @@ -16974,7 +17385,7 @@ }, "jsonfile": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/jsonfile/download/jsonfile-4.0.0.tgz", + "resolved": "https://registry.nlark.com/jsonfile/download/jsonfile-4.0.0.tgz", "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", "dev": true, "requires": { @@ -17017,7 +17428,7 @@ }, "last-run": { "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/last-run/download/last-run-1.1.1.tgz", + "resolved": "https://registry.nlark.com/last-run/download/last-run-1.1.1.tgz", "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", "dev": true, "requires": { @@ -17036,7 +17447,7 @@ }, "lcid": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/lcid/download/lcid-1.0.0.tgz", + "resolved": "https://registry.npmmirror.com/lcid/download/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "dev": true, "requires": { @@ -17054,7 +17465,7 @@ }, "leven": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/leven/download/leven-3.1.0.tgz", + "resolved": "https://registry.nlark.com/leven/download/leven-3.1.0.tgz?cache=0&sync_timestamp=1628597922950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fleven%2Fdownload%2Fleven-3.1.0.tgz", "integrity": "sha1-d4kd6DQGTMy6gq54QrtrFKE+1/I=", "dev": true }, @@ -17069,7 +17480,7 @@ }, "levn": { "version": "0.3.0", - "resolved": "https://registry.npmmirror.com/levn/-/levn-0.3.0.tgz", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "requires": { @@ -17101,7 +17512,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz", + "resolved": "https://registry.nlark.com/load-json-file/download/load-json-file-1.1.0.tgz?cache=0&sync_timestamp=1631508607226&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fload-json-file%2Fdownload%2Fload-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, "requires": { @@ -17128,12 +17539,6 @@ "integrity": "sha1-tEf2ZwoEVbv+7dETku/zMOoJdUg=", "dev": true }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", - "dev": true - }, "lodash.memoize": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", @@ -17145,15 +17550,9 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, - "lodash.truncate": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", - "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", - "dev": true - }, "loose-envify": { "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/loose-envify/download/loose-envify-1.4.0.tgz", + "resolved": "https://registry.nlark.com/loose-envify/download/loose-envify-1.4.0.tgz", "integrity": "sha1-ce5R+nvkyuwaY4OffmgtgTLTDK8=", "dev": true, "requires": { @@ -17162,7 +17561,7 @@ }, "lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz", + "resolved": "https://registry.nlark.com/lru-cache/download/lru-cache-6.0.0.tgz", "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", "requires": { "yallist": "^4.0.0" @@ -17196,7 +17595,7 @@ }, "make-error": { "version": "1.3.6", - "resolved": "https://registry.npm.taobao.org/make-error/download/make-error-1.3.6.tgz?cache=0&sync_timestamp=1582105630664&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmake-error%2Fdownload%2Fmake-error-1.3.6.tgz", + "resolved": "https://registry.nlark.com/make-error/download/make-error-1.3.6.tgz", "integrity": "sha1-LrLjfqm2fEiR9oShOUeZr0hM96I=", "dev": true }, @@ -17229,7 +17628,7 @@ }, "map-age-cleaner": { "version": "0.1.3", - "resolved": "https://registry.npm.taobao.org/map-age-cleaner/download/map-age-cleaner-0.1.3.tgz", + "resolved": "https://registry.nlark.com/map-age-cleaner/download/map-age-cleaner-0.1.3.tgz?cache=0&sync_timestamp=1629750856019&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmap-age-cleaner%2Fdownload%2Fmap-age-cleaner-0.1.3.tgz", "integrity": "sha1-fVg6cwZDTAVf5HSw9FB45uG0uSo=", "dev": true, "requires": { @@ -17238,13 +17637,13 @@ }, "map-cache": { "version": "0.2.2", - "resolved": "https://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz", + "resolved": "https://registry.nlark.com/map-cache/download/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, "map-visit": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/map-visit/download/map-visit-1.0.0.tgz", + "resolved": "https://registry.nlark.com/map-visit/download/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, "requires": { @@ -17265,7 +17664,7 @@ "dependencies": { "findup-sync": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/findup-sync/download/findup-sync-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/findup-sync/download/findup-sync-2.0.0.tgz?cache=0&sync_timestamp=1635766114067&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ffindup-sync%2Fdownload%2Ffindup-sync-2.0.0.tgz", "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", "dev": true, "requires": { @@ -17277,7 +17676,7 @@ }, "is-glob": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/is-glob/download/is-glob-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/is-glob/download/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "dev": true, "requires": { @@ -17299,7 +17698,7 @@ }, "mem": { "version": "4.3.0", - "resolved": "https://registry.npm.taobao.org/mem/download/mem-4.3.0.tgz", + "resolved": "https://registry.nlark.com/mem/download/mem-4.3.0.tgz?cache=0&sync_timestamp=1626534487701&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fmem%2Fdownload%2Fmem-4.3.0.tgz", "integrity": "sha1-Rhr0l7xK4JYIzbLmDu+2m/90QXg=", "dev": true, "requires": { @@ -17318,7 +17717,7 @@ }, "merge-stream": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/merge-stream/download/merge-stream-2.0.0.tgz", + "resolved": "https://registry.nlark.com/merge-stream/download/merge-stream-2.0.0.tgz", "integrity": "sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=", "dev": true }, @@ -17368,19 +17767,19 @@ }, "mime": { "version": "1.6.0", - "resolved": "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz?cache=0&sync_timestamp=1560034758817&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime%2Fdownload%2Fmime-1.6.0.tgz", + "resolved": "https://registry.npmmirror.com/mime/download/mime-1.6.0.tgz", "integrity": "sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=", "dev": true }, "mime-db": { "version": "1.52.0", - "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true }, "mime-types": { "version": "2.1.35", - "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "requires": { @@ -17389,7 +17788,7 @@ }, "mimic-fn": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/mimic-fn/-/mimic-fn-2.1.0.tgz", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, @@ -17415,7 +17814,7 @@ }, "minimist": { "version": "1.2.5", - "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz", + "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz", "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", "dev": true }, @@ -17426,7 +17825,7 @@ }, "mixin-deep": { "version": "1.3.2", - "resolved": "https://registry.npm.taobao.org/mixin-deep/download/mixin-deep-1.3.2.tgz", + "resolved": "https://registry.nlark.com/mixin-deep/download/mixin-deep-1.3.2.tgz", "integrity": "sha1-ESC0PcNZp4Xc5ltVuC4lfM9HlWY=", "dev": true, "requires": { @@ -17436,7 +17835,7 @@ "dependencies": { "is-extendable": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz", + "resolved": "https://registry.nlark.com/is-extendable/download/is-extendable-1.0.1.tgz", "integrity": "sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ=", "dev": true, "requires": { @@ -17476,7 +17875,7 @@ }, "ms": { "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.1.2.tgz", "integrity": "sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=" }, "mute-stdout": { @@ -17501,7 +17900,7 @@ }, "nanomatch": { "version": "1.2.13", - "resolved": "https://registry.npm.taobao.org/nanomatch/download/nanomatch-1.2.13.tgz", + "resolved": "https://registry.nlark.com/nanomatch/download/nanomatch-1.2.13.tgz", "integrity": "sha1-uHqKpPwN6P5r6IiVs4mD/yZb0Rk=", "dev": true, "requires": { @@ -17520,7 +17919,7 @@ }, "natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz", + "resolved": "https://registry.nlark.com/natural-compare/download/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, "natural-compare-lite": { @@ -17530,13 +17929,13 @@ }, "next-tick": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/next-tick/download/next-tick-1.0.0.tgz", + "resolved": "https://registry.nlark.com/next-tick/download/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", "dev": true }, "nice-try": { "version": "1.0.5", - "resolved": "https://registry.npm.taobao.org/nice-try/download/nice-try-1.0.5.tgz", + "resolved": "https://registry.nlark.com/nice-try/download/nice-try-1.0.5.tgz", "integrity": "sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=", "dev": true }, @@ -17554,7 +17953,7 @@ }, "normalize-package-data": { "version": "2.5.0", - "resolved": "https://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.5.0.tgz", + "resolved": "https://registry.nlark.com/normalize-package-data/download/normalize-package-data-2.5.0.tgz?cache=0&sync_timestamp=1629301872905&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fnormalize-package-data%2Fdownload%2Fnormalize-package-data-2.5.0.tgz", "integrity": "sha1-5m2xg4sgDB38IzIl0SyzZSDiNKg=", "dev": true, "requires": { @@ -17584,7 +17983,7 @@ }, "npm-run-path": { "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz?cache=0&sync_timestamp=1577053500910&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnpm-run-path%2Fdownload%2Fnpm-run-path-2.0.2.tgz", + "resolved": "https://registry.npmmirror.com/npm-run-path/download/npm-run-path-2.0.2.tgz?cache=0&sync_timestamp=1633420566316&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fnpm-run-path%2Fdownload%2Fnpm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", "dev": true, "requires": { @@ -17593,13 +17992,13 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/number-is-nan/download/number-is-nan-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/number-is-nan/download/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "nwsapi": { "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/nwsapi/-/nwsapi-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "dev": true }, @@ -17648,13 +18047,13 @@ }, "object-keys": { "version": "1.1.1", - "resolved": "https://registry.npm.taobao.org/object-keys/download/object-keys-1.1.1.tgz", + "resolved": "https://registry.nlark.com/object-keys/download/object-keys-1.1.1.tgz", "integrity": "sha1-HEfyct8nfzsdrwYWd9nILiMixg4=", "dev": true }, "object-visit": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/object-visit/download/object-visit-1.0.1.tgz", + "resolved": "https://registry.nlark.com/object-visit/download/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, "requires": { @@ -17686,19 +18085,19 @@ } }, "object.entries": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz", - "integrity": "sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA==", + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/object.entries/-/object.entries-1.1.6.tgz", + "integrity": "sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "dependencies": { "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -17706,16 +18105,33 @@ "get-intrinsic": "^1.0.2" } }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true } } }, @@ -17749,19 +18165,19 @@ } }, "object.values": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", - "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/object.values/-/object.values-1.1.6.tgz", + "integrity": "sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.2" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "dependencies": { "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -17769,22 +18185,39 @@ "get-intrinsic": "^1.0.2" } }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true } } }, "once": { "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", + "resolved": "https://registry.nlark.com/once/download/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" @@ -17792,7 +18225,7 @@ }, "onetime": { "version": "5.1.2", - "resolved": "https://registry.npmmirror.com/onetime/-/onetime-5.1.2.tgz", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { @@ -17812,13 +18245,13 @@ }, "opener": { "version": "1.5.2", - "resolved": "https://registry.npm.taobao.org/opener/download/opener-1.5.2.tgz", + "resolved": "https://registry.nlark.com/opener/download/opener-1.5.2.tgz?cache=0&sync_timestamp=1618847055043&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fopener%2Fdownload%2Fopener-1.5.2.tgz", "integrity": "sha1-XTfh81B3udysQwE3InGv3rKhNZg=", "dev": true }, "optionator": { "version": "0.8.3", - "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.8.3.tgz", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { @@ -17847,7 +18280,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npm.taobao.org/os-locale/download/os-locale-1.4.0.tgz", + "resolved": "https://registry.npmmirror.com/os-locale/download/os-locale-1.4.0.tgz?cache=0&sync_timestamp=1633618260196&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fos-locale%2Fdownload%2Fos-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "dev": true, "requires": { @@ -17862,7 +18295,7 @@ }, "p-finally": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz", + "resolved": "https://registry.npm.taobao.org/p-finally/download/p-finally-1.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fp-finally%2Fdownload%2Fp-finally-1.0.0.tgz", "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, @@ -17901,7 +18334,7 @@ }, "p-try": { "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/p-try/download/p-try-2.2.0.tgz", + "resolved": "https://registry.npmmirror.com/p-try/download/p-try-2.2.0.tgz", "integrity": "sha1-yyhoVA4xPWHeWPr741zpAE1VQOY=", "dev": true }, @@ -17954,7 +18387,7 @@ }, "parse-json": { "version": "2.2.0", - "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz", + "resolved": "https://registry.npmmirror.com/parse-json/download/parse-json-2.2.0.tgz?cache=0&sync_timestamp=1637475717072&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fparse-json%2Fdownload%2Fparse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { @@ -17963,7 +18396,7 @@ }, "parse-node-version": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/parse-node-version/download/parse-node-version-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/parse-node-version/download/parse-node-version-1.0.1.tgz", "integrity": "sha1-4rXb7eAOf6m8NjYH9TMn6LBzGJs=", "dev": true }, @@ -17975,20 +18408,20 @@ }, "parse5": { "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/parse5/-/parse5-6.0.1.tgz", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, "pascalcase": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/pascalcase/download/pascalcase-0.1.1.tgz", + "resolved": "https://registry.nlark.com/pascalcase/download/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, "path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", - "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=", + "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==", "dev": true, "requires": { "process": "^0.11.1", @@ -18003,13 +18436,13 @@ }, "path-dirname": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/path-dirname/download/path-dirname-1.0.2.tgz", + "resolved": "https://registry.nlark.com/path-dirname/download/path-dirname-1.0.2.tgz", "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, "path-exists": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz", + "resolved": "https://registry.nlark.com/path-exists/download/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", "dev": true }, @@ -18037,7 +18470,7 @@ }, "path-root": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/path-root/download/path-root-0.1.1.tgz", + "resolved": "https://registry.nlark.com/path-root/download/path-root-0.1.1.tgz", "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", "dev": true, "requires": { @@ -18046,7 +18479,7 @@ }, "path-root-regex": { "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/path-root-regex/download/path-root-regex-0.1.2.tgz", + "resolved": "https://registry.nlark.com/path-root-regex/download/path-root-regex-0.1.2.tgz", "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", "dev": true }, @@ -18103,19 +18536,19 @@ }, "pify": { "version": "2.3.0", - "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz?cache=0&sync_timestamp=1581697613983&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpify%2Fdownload%2Fpify-2.3.0.tgz", + "resolved": "https://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "dev": true }, "pinkie": { "version": "2.0.4", - "resolved": "https://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz", + "resolved": "https://registry.nlark.com/pinkie/download/pinkie-2.0.4.tgz", "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", "dev": true }, "pinkie-promise": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz", + "resolved": "https://registry.nlark.com/pinkie-promise/download/pinkie-promise-2.0.1.tgz?cache=0&sync_timestamp=1618847023792&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fpinkie-promise%2Fdownload%2Fpinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { @@ -18173,60 +18606,6 @@ } } }, - "pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", - "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", - "dev": true, - "requires": { - "find-up": "^2.1.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - } - } - }, "plugin-error": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/plugin-error/-/plugin-error-1.0.1.tgz", @@ -18247,7 +18626,7 @@ }, "portfinder": { "version": "1.0.28", - "resolved": "https://registry.npm.taobao.org/portfinder/download/portfinder-1.0.28.tgz", + "resolved": "https://registry.nlark.com/portfinder/download/portfinder-1.0.28.tgz", "integrity": "sha1-Z8RiKFK9U3TdHdkA93n1NGL6x3g=", "dev": true, "requires": { @@ -18258,7 +18637,7 @@ "dependencies": { "debug": { "version": "3.2.7", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-3.2.7.tgz?cache=0&sync_timestamp=1607566580543&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.2.7.tgz", + "resolved": "https://registry.npmmirror.com/debug/download/debug-3.2.7.tgz", "integrity": "sha1-clgLfpFF+zm2Z2+cXl+xALk0F5o=", "dev": true, "requires": { @@ -18278,19 +18657,19 @@ }, "posix-character-classes": { "version": "0.1.1", - "resolved": "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz", + "resolved": "https://registry.nlark.com/posix-character-classes/download/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, "prelude-ls": { "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.1.2.tgz", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true }, "pretty-format": { "version": "24.9.0", - "resolved": "https://registry.npm.taobao.org/pretty-format/download/pretty-format-24.9.0.tgz", + "resolved": "https://registry.npmmirror.com/pretty-format/download/pretty-format-24.9.0.tgz", "integrity": "sha1-EvrDGzcBmk7qPBGqmpWet2KKp8k=", "dev": true, "requires": { @@ -18302,7 +18681,7 @@ "dependencies": { "ansi-regex": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-4.1.0.tgz", + "resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-4.1.0.tgz", "integrity": "sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=", "dev": true } @@ -18323,7 +18702,7 @@ "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", "dev": true }, "process-nextick-args": { @@ -18332,12 +18711,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npm.taobao.org/progress/download/progress-2.0.3.tgz", - "integrity": "sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=", - "dev": true - }, "prompts": { "version": "2.4.2", "resolved": "https://registry.npmmirror.com/prompts/-/prompts-2.4.2.tgz", @@ -18350,7 +18723,7 @@ }, "psl": { "version": "1.8.0", - "resolved": "https://registry.npmmirror.com/psl/-/psl-1.8.0.tgz", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, @@ -18422,7 +18795,7 @@ }, "punycode": { "version": "2.1.1", - "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, @@ -18468,7 +18841,7 @@ }, "react-is": { "version": "16.13.1", - "resolved": "https://registry.npm.taobao.org/react-is/download/react-is-16.13.1.tgz", + "resolved": "https://registry.npmmirror.com/react-is/download/react-is-16.13.1.tgz", "integrity": "sha1-eJcppNw23imZ3BVt1sHZwYzqVqQ=", "dev": true }, @@ -18483,7 +18856,7 @@ }, "read-pkg": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/read-pkg/download/read-pkg-1.1.0.tgz", + "resolved": "https://registry.nlark.com/read-pkg/download/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, "requires": { @@ -18494,7 +18867,7 @@ }, "read-pkg-up": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/read-pkg-up/download/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, "requires": { @@ -18504,7 +18877,7 @@ "dependencies": { "find-up": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "resolved": "https://registry.npmmirror.com/find-up/download/find-up-1.1.2.tgz?cache=0&sync_timestamp=1633620747957&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ffind-up%2Fdownload%2Ffind-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { @@ -18514,7 +18887,7 @@ }, "path-exists": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "resolved": "https://registry.nlark.com/path-exists/download/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { @@ -18551,7 +18924,7 @@ }, "readdirp": { "version": "2.2.1", - "resolved": "https://registry.npm.taobao.org/readdirp/download/readdirp-2.2.1.tgz?cache=0&sync_timestamp=1575629866543&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Freaddirp%2Fdownload%2Freaddirp-2.2.1.tgz", + "resolved": "https://registry.nlark.com/readdirp/download/readdirp-2.2.1.tgz", "integrity": "sha1-DodiKjMlqjPokihcr4tOhGUppSU=", "dev": true, "requires": { @@ -18562,7 +18935,7 @@ }, "rechoir": { "version": "0.6.2", - "resolved": "https://registry.npm.taobao.org/rechoir/download/rechoir-0.6.2.tgz", + "resolved": "https://registry.nlark.com/rechoir/download/rechoir-0.6.2.tgz?cache=0&sync_timestamp=1627101677944&other_urls=https%3A%2F%2Fregistry.nlark.com%2Frechoir%2Fdownload%2Frechoir-0.6.2.tgz", "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", "dev": true, "requires": { @@ -18602,7 +18975,7 @@ }, "regex-not": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/regex-not/download/regex-not-1.0.2.tgz", + "resolved": "https://registry.nlark.com/regex-not/download/regex-not-1.0.2.tgz", "integrity": "sha1-H07OJ+ALC2XgJHpoEOaoXYOldSw=", "dev": true, "requires": { @@ -18644,12 +19017,6 @@ } } }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - }, "regexpu-core": { "version": "4.7.0", "resolved": "https://registry.npm.taobao.org/regexpu-core/download/regexpu-core-4.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.7.0.tgz", @@ -18681,7 +19048,7 @@ "dependencies": { "jsesc": { "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz", + "resolved": "https://registry.nlark.com/jsesc/download/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", "dev": true } @@ -18710,7 +19077,7 @@ }, "remove-trailing-separator": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", + "resolved": "https://registry.nlark.com/remove-trailing-separator/download/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", "dev": true }, @@ -18745,16 +19112,10 @@ }, "require-directory": { "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/require-directory/download/require-directory-2.1.1.tgz", + "resolved": "https://registry.nlark.com/require-directory/download/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true - }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz", @@ -18763,7 +19124,7 @@ }, "requires-port": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz", + "resolved": "https://registry.nlark.com/requires-port/download/requires-port-1.0.0.tgz", "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, @@ -18819,7 +19180,7 @@ }, "resolve-url": { "version": "0.2.1", - "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", + "resolved": "https://registry.npmmirror.com/resolve-url/download/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, @@ -18831,7 +19192,7 @@ }, "ret": { "version": "0.1.15", - "resolved": "https://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz", + "resolved": "https://registry.nlark.com/ret/download/ret-0.1.15.tgz", "integrity": "sha1-uKSCXVvbH8P29Twrwz+BOIaBx7w=", "dev": true }, @@ -19071,7 +19432,7 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", + "resolved": "https://registry.nlark.com/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1618847044058&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz", "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" }, "safe-regex": { @@ -19083,15 +19444,56 @@ "ret": "~0.1.10" } }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafer-buffer%2Fdownload%2Fsafer-buffer-2.1.2.tgz", + "resolved": "https://registry.nlark.com/safer-buffer/download/safer-buffer-2.1.2.tgz", "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=", "dev": true }, "saxes": { "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/saxes/-/saxes-5.0.1.tgz", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, "requires": { @@ -19112,7 +19514,7 @@ }, "semver-greatest-satisfied-range": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/semver-greatest-satisfied-range/download/semver-greatest-satisfied-range-1.1.0.tgz", + "resolved": "https://registry.nlark.com/semver-greatest-satisfied-range/download/semver-greatest-satisfied-range-1.1.0.tgz", "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", "dev": true, "requires": { @@ -19130,13 +19532,13 @@ }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/set-blocking/download/set-blocking-2.0.0.tgz", + "resolved": "https://registry.nlark.com/set-blocking/download/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, "set-value": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/set-value/download/set-value-2.0.1.tgz", + "resolved": "https://registry.nlark.com/set-value/download/set-value-2.0.1.tgz", "integrity": "sha1-oY1AUw5vB95CKMfe/kInr4ytAFs=", "dev": true, "requires": { @@ -19148,7 +19550,7 @@ "dependencies": { "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "resolved": "https://registry.nlark.com/extend-shallow/download/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -19210,7 +19612,7 @@ }, "side-channel": { "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/side-channel/download/side-channel-1.0.4.tgz", + "resolved": "https://registry.nlark.com/side-channel/download/side-channel-1.0.4.tgz", "integrity": "sha1-785cj9wQTudRslxY1CkAEfpeos8=", "dev": true, "requires": { @@ -19225,82 +19627,39 @@ "integrity": "sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y=", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - } - } - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/slash/download/slash-3.0.0.tgz", - "integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=" - }, - "slice-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", - "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } } } }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.nlark.com/slash/download/slash-3.0.0.tgz", + "integrity": "sha1-ZTm+hwwWWtvVJAIg2+Nh8bxNRjQ=" + }, "snapdragon": { "version": "0.8.2", - "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz", + "resolved": "https://registry.npm.taobao.org/snapdragon/download/snapdragon-0.8.2.tgz?cache=0&sync_timestamp=1617971785350&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsnapdragon%2Fdownload%2Fsnapdragon-0.8.2.tgz", "integrity": "sha1-ZJIufFZbDhQgS6GqfWlkJ40lGC0=", "dev": true, "requires": { @@ -19316,7 +19675,7 @@ "dependencies": { "debug": { "version": "2.6.9", - "resolved": "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz", + "resolved": "https://registry.npmmirror.com/debug/download/debug-2.6.9.tgz", "integrity": "sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=", "dev": true, "requires": { @@ -19334,7 +19693,7 @@ }, "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npm.taobao.org/extend-shallow/download/extend-shallow-2.0.1.tgz", + "resolved": "https://registry.nlark.com/extend-shallow/download/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, "requires": { @@ -19343,7 +19702,7 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/ms/download/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true } @@ -19371,7 +19730,7 @@ }, "is-accessor-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-accessor-descriptor/download/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha1-FpwvbT3x+ZJhgHI2XJsOofaHhlY=", "dev": true, "requires": { @@ -19380,7 +19739,7 @@ }, "is-data-descriptor": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", + "resolved": "https://registry.nlark.com/is-data-descriptor/download/is-data-descriptor-1.0.0.tgz", "integrity": "sha1-2Eh2Mh0Oet0DmQQGq7u9NrqSaMc=", "dev": true, "requires": { @@ -19402,7 +19761,7 @@ }, "snapdragon-util": { "version": "3.0.1", - "resolved": "https://registry.npm.taobao.org/snapdragon-util/download/snapdragon-util-3.0.1.tgz", + "resolved": "https://registry.nlark.com/snapdragon-util/download/snapdragon-util-3.0.1.tgz", "integrity": "sha1-+VZHlIbyrNeXAGk/b3uAXkWrVuI=", "dev": true, "requires": { @@ -19471,7 +19830,7 @@ }, "sparkles": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/sparkles/download/sparkles-1.0.1.tgz", + "resolved": "https://registry.nlark.com/sparkles/download/sparkles-1.0.1.tgz", "integrity": "sha1-AI22XtzmxQ7sDF4ijhlFBh3QQ3w=", "dev": true }, @@ -19515,7 +19874,7 @@ }, "split-string": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz", + "resolved": "https://registry.nlark.com/split-string/download/split-string-3.1.0.tgz", "integrity": "sha1-fLCd2jqGWFcFxks5pkZgOGguj+I=", "dev": true, "requires": { @@ -19524,13 +19883,13 @@ }, "sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", + "resolved": "https://registry.nlark.com/sprintf-js/download/sprintf-js-1.0.3.tgz?cache=0&sync_timestamp=1618847174560&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsprintf-js%2Fdownload%2Fsprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, "stack-trace": { "version": "0.0.10", - "resolved": "https://registry.npm.taobao.org/stack-trace/download/stack-trace-0.0.10.tgz", + "resolved": "https://registry.nlark.com/stack-trace/download/stack-trace-0.0.10.tgz?cache=0&sync_timestamp=1620387179562&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fstack-trace%2Fdownload%2Fstack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", "dev": true }, @@ -19545,7 +19904,7 @@ "dependencies": { "escape-string-regexp": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz", + "resolved": "https://registry.nlark.com/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz", "integrity": "sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q=", "dev": true } @@ -19737,19 +20096,71 @@ } } }, + "string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "dependencies": { "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -19757,32 +20168,50 @@ "get-intrinsic": "^1.0.2" } }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true } } }, "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "dependencies": { "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { @@ -19790,16 +20219,33 @@ "get-intrinsic": "^1.0.2" } }, + "define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dev": true, + "requires": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + } + }, "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true } } }, @@ -19829,7 +20275,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/strip-eof/download/strip-eof-1.0.0.tgz", + "resolved": "https://registry.npmmirror.com/strip-eof/download/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, @@ -19855,7 +20301,7 @@ }, "supports-color": { "version": "5.5.0", - "resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-5.5.0.tgz", + "resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-5.5.0.tgz", "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", "requires": { "has-flag": "^3.0.0" @@ -19890,7 +20336,7 @@ }, "supports-preserve-symlinks-flag": { "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, "sver-compat": { @@ -19905,7 +20351,7 @@ }, "symbol-tree": { "version": "3.2.4", - "resolved": "https://registry.npmmirror.com/symbol-tree/-/symbol-tree-3.2.4.tgz", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, @@ -19918,78 +20364,6 @@ "acorn-node": "^1.2.0" } }, - "table": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", - "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", - "dev": true, - "requires": { - "ajv": "^8.0.1", - "lodash.clonedeep": "^4.5.0", - "lodash.truncate": "^4.4.2", - "slice-ansi": "^4.0.0", - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ajv": { - "version": "8.6.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", - "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, "terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmmirror.com/terminal-link/-/terminal-link-2.1.1.tgz", @@ -20049,7 +20423,7 @@ }, "text-table": { "version": "0.2.0", - "resolved": "https://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz", + "resolved": "https://registry.nlark.com/text-table/download/text-table-0.2.0.tgz?cache=0&sync_timestamp=1618847142316&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftext-table%2Fdownload%2Ftext-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" }, "tfig": { @@ -20211,7 +20585,7 @@ }, "time-stamp": { "version": "1.1.0", - "resolved": "https://registry.npm.taobao.org/time-stamp/download/time-stamp-1.1.0.tgz", + "resolved": "https://registry.nlark.com/time-stamp/download/time-stamp-1.1.0.tgz", "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", "dev": true }, @@ -20235,13 +20609,13 @@ }, "tmpl": { "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/tmpl/-/tmpl-1.0.5.tgz", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, "to-absolute-glob": { "version": "2.0.2", - "resolved": "https://registry.npm.taobao.org/to-absolute-glob/download/to-absolute-glob-2.0.2.tgz", + "resolved": "https://registry.nlark.com/to-absolute-glob/download/to-absolute-glob-2.0.2.tgz", "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", "dev": true, "requires": { @@ -20251,12 +20625,12 @@ }, "to-fast-properties": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz", + "resolved": "https://registry.nlark.com/to-fast-properties/download/to-fast-properties-2.0.0.tgz?cache=0&sync_timestamp=1628418893613&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fto-fast-properties%2Fdownload%2Fto-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "to-object-path": { "version": "0.3.0", - "resolved": "https://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz", + "resolved": "https://registry.nlark.com/to-object-path/download/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, "requires": { @@ -20276,7 +20650,7 @@ }, "to-regex": { "version": "3.0.2", - "resolved": "https://registry.npm.taobao.org/to-regex/download/to-regex-3.0.2.tgz", + "resolved": "https://registry.nlark.com/to-regex/download/to-regex-3.0.2.tgz", "integrity": "sha1-E8/dmzNlUvMLUfM6iuG0Knp1mc4=", "dev": true, "requires": { @@ -20307,7 +20681,7 @@ }, "tough-cookie": { "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-4.0.0.tgz", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, "requires": { @@ -20322,6 +20696,12 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "dev": true + }, "ts-jest": { "version": "26.5.4", "resolved": "https://registry.npm.taobao.org/ts-jest/download/ts-jest-26.5.4.tgz", @@ -20342,13 +20722,13 @@ "dependencies": { "mkdirp": { "version": "1.0.4", - "resolved": "https://registry.npm.taobao.org/mkdirp/download/mkdirp-1.0.4.tgz?cache=0&sync_timestamp=1587535418745&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmkdirp%2Fdownload%2Fmkdirp-1.0.4.tgz", + "resolved": "https://registry.npmmirror.com/mkdirp/download/mkdirp-1.0.4.tgz", "integrity": "sha1-PrXtYmInVteaXw4qIh3+utdcL34=", "dev": true }, "semver": { "version": "7.3.5", - "resolved": "https://registry.npm.taobao.org/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1616463603361&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz", + "resolved": "https://registry.nlark.com/semver/download/semver-7.3.5.tgz?cache=0&sync_timestamp=1618846864940&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsemver%2Fdownload%2Fsemver-7.3.5.tgz", "integrity": "sha1-C2Ich5NI2JmOSw5L6Us/EuYBjvc=", "dev": true, "requires": { @@ -20364,20 +20744,36 @@ } }, "tsconfig-paths": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", - "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "version": "3.14.2", + "resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", "dev": true, "requires": { - "json5": "^2.2.0", - "minimist": "^1.2.0", + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", "strip-bom": "^3.0.0" }, "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "strip-bom": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "resolved": "https://registry.npmmirror.com/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true } } @@ -20428,6 +20824,103 @@ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true }, + "typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + }, + "is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmmirror.com/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + } + } + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "dependencies": { + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true + } + } + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", @@ -20578,28 +21071,56 @@ "dev": true }, "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "dependencies": { - "has-symbols": { + "call-bind": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "resolved": "https://registry.npmmirror.com/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + } + }, + "has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true } } }, "unc-path-regex": { "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/unc-path-regex/download/unc-path-regex-0.1.2.tgz", + "resolved": "https://registry.nlark.com/unc-path-regex/download/unc-path-regex-0.1.2.tgz", "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, @@ -20669,7 +21190,7 @@ }, "union": { "version": "0.5.0", - "resolved": "https://registry.npm.taobao.org/union/download/union-0.5.0.tgz", + "resolved": "https://registry.nlark.com/union/download/union-0.5.0.tgz", "integrity": "sha1-ssEb6E9gU4U3uEbtuboma6AJAHU=", "dev": true, "requires": { @@ -20678,7 +21199,7 @@ }, "union-value": { "version": "1.0.1", - "resolved": "https://registry.npm.taobao.org/union-value/download/union-value-1.0.1.tgz", + "resolved": "https://registry.npmmirror.com/union-value/download/union-value-1.0.1.tgz", "integrity": "sha1-C2/nuDWuzaYcbqTU8CwUIh4QmEc=", "dev": true, "requires": { @@ -20700,13 +21221,13 @@ }, "universalify": { "version": "0.1.2", - "resolved": "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz", + "resolved": "https://registry.nlark.com/universalify/download/universalify-0.1.2.tgz", "integrity": "sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY=", "dev": true }, "unset-value": { "version": "1.0.0", - "resolved": "https://registry.npm.taobao.org/unset-value/download/unset-value-1.0.0.tgz", + "resolved": "https://registry.nlark.com/unset-value/download/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, "requires": { @@ -20716,7 +21237,7 @@ "dependencies": { "has-value": { "version": "0.3.1", - "resolved": "https://registry.npm.taobao.org/has-value/download/has-value-0.3.1.tgz", + "resolved": "https://registry.nlark.com/has-value/download/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, "requires": { @@ -20738,7 +21259,7 @@ }, "has-values": { "version": "0.1.4", - "resolved": "https://registry.npm.taobao.org/has-values/download/has-values-0.1.4.tgz", + "resolved": "https://registry.nlark.com/has-values/download/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", "dev": true }, @@ -20752,7 +21273,7 @@ }, "upath": { "version": "1.2.0", - "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz?cache=0&sync_timestamp=1567457281208&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fupath%2Fdownload%2Fupath-1.2.0.tgz", + "resolved": "https://registry.npm.taobao.org/upath/download/upath-1.2.0.tgz", "integrity": "sha1-j2bbzVWog6za5ECK+LA1pQRMGJQ=", "dev": true }, @@ -20782,7 +21303,7 @@ }, "urix": { "version": "0.1.0", - "resolved": "https://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz", + "resolved": "https://registry.npmmirror.com/urix/download/urix-0.1.0.tgz", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, @@ -20806,13 +21327,13 @@ }, "url-join": { "version": "2.0.5", - "resolved": "https://registry.npm.taobao.org/url-join/download/url-join-2.0.5.tgz", + "resolved": "https://registry.nlark.com/url-join/download/url-join-2.0.5.tgz", "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=", "dev": true }, "use": { "version": "3.1.1", - "resolved": "https://registry.npm.taobao.org/use/download/use-3.1.1.tgz", + "resolved": "https://registry.nlark.com/use/download/use-3.1.1.tgz", "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=", "dev": true }, @@ -20827,7 +21348,7 @@ "dependencies": { "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": "https://registry.nlark.com/inherits/download/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true } @@ -20835,16 +21356,10 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", + "resolved": "https://registry.nlark.com/util-deprecate/download/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, "v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmmirror.com/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -20867,7 +21382,7 @@ }, "validate-npm-package-license": { "version": "3.0.4", - "resolved": "https://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", + "resolved": "https://registry.nlark.com/validate-npm-package-license/download/validate-npm-package-license-3.0.4.tgz", "integrity": "sha1-/JH2uce6FchX9MssXe/uw51PQQo=", "dev": true, "requires": { @@ -20877,7 +21392,7 @@ }, "value-or-function": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/value-or-function/download/value-or-function-3.0.0.tgz", + "resolved": "https://registry.nlark.com/value-or-function/download/value-or-function-3.0.0.tgz", "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", "dev": true }, @@ -21022,7 +21537,7 @@ }, "w3c-hr-time": { "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "requires": { @@ -21254,7 +21769,7 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz", + "resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz?cache=0&sync_timestamp=1619133505879&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fwrappy%2Fdownload%2Fwrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-atomic": { @@ -21277,7 +21792,7 @@ }, "xmlchars": { "version": "2.2.0", - "resolved": "https://registry.npmmirror.com/xmlchars/-/xmlchars-2.2.0.tgz", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, @@ -21301,12 +21816,12 @@ }, "yallist": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", + "resolved": "https://registry.nlark.com/yallist/download/yallist-4.0.0.tgz?cache=0&sync_timestamp=1622604530774&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fyallist%2Fdownload%2Fyallist-4.0.0.tgz", "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" }, "yargs": { "version": "12.0.5", - "resolved": "https://registry.npm.taobao.org/yargs/download/yargs-12.0.5.tgz?cache=0&sync_timestamp=1583129847322&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs%2Fdownload%2Fyargs-12.0.5.tgz", + "resolved": "https://registry.npmmirror.com/yargs/download/yargs-12.0.5.tgz?cache=0&sync_timestamp=1632605487521&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fyargs%2Fdownload%2Fyargs-12.0.5.tgz", "integrity": "sha1-BfWZe2CWR7ZPZrgeO0sQo2jnrRM=", "dev": true, "requires": { @@ -21326,13 +21841,13 @@ "dependencies": { "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz?cache=0&sync_timestamp=1570188663907&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-regex%2Fdownload%2Fansi-regex-3.0.0.tgz", + "resolved": "https://registry.nlark.com/ansi-regex/download/ansi-regex-3.0.0.tgz", "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "cliui": { "version": "4.1.0", - "resolved": "https://registry.npm.taobao.org/cliui/download/cliui-4.1.0.tgz?cache=0&sync_timestamp=1573943292170&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcliui%2Fdownload%2Fcliui-4.1.0.tgz", + "resolved": "https://registry.nlark.com/cliui/download/cliui-4.1.0.tgz", "integrity": "sha1-NIQi2+gtgAswIu709qwQvy5NG0k=", "dev": true, "requires": { @@ -21352,13 +21867,13 @@ }, "invert-kv": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/invert-kv/download/invert-kv-2.0.0.tgz", + "resolved": "https://registry.nlark.com/invert-kv/download/invert-kv-2.0.0.tgz?cache=0&sync_timestamp=1630996809231&other_urls=https%3A%2F%2Fregistry.nlark.com%2Finvert-kv%2Fdownload%2Finvert-kv-2.0.0.tgz", "integrity": "sha1-c5P1r6Weyf9fZ6J2INEcIm4+7AI=", "dev": true }, "lcid": { "version": "2.0.0", - "resolved": "https://registry.npm.taobao.org/lcid/download/lcid-2.0.0.tgz", + "resolved": "https://registry.npmmirror.com/lcid/download/lcid-2.0.0.tgz", "integrity": "sha1-bvXS32DlL4LrIopMNz6NHzlyU88=", "dev": true, "requires": { @@ -21377,7 +21892,7 @@ }, "os-locale": { "version": "3.1.0", - "resolved": "https://registry.npm.taobao.org/os-locale/download/os-locale-3.1.0.tgz", + "resolved": "https://registry.npmmirror.com/os-locale/download/os-locale-3.1.0.tgz?cache=0&sync_timestamp=1633618260196&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fos-locale%2Fdownload%2Fos-locale-3.1.0.tgz", "integrity": "sha1-qAKm7hfyTBBIOrmTVxnO9O0Wvxo=", "dev": true, "requires": { @@ -21403,7 +21918,7 @@ }, "string-width": { "version": "2.1.1", - "resolved": "https://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring-width%2Fdownload%2Fstring-width-2.1.1.tgz", + "resolved": "https://registry.npmmirror.com/string-width/download/string-width-2.1.1.tgz?cache=0&sync_timestamp=1632421309919&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstring-width%2Fdownload%2Fstring-width-2.1.1.tgz", "integrity": "sha1-q5Pyeo3BPSjKyBXEYhQ6bZASrp4=", "dev": true, "requires": { @@ -21413,7 +21928,7 @@ }, "strip-ansi": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz?cache=0&sync_timestamp=1573280518303&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-4.0.0.tgz", + "resolved": "https://registry.npmmirror.com/strip-ansi/download/strip-ansi-4.0.0.tgz", "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { @@ -21434,7 +21949,7 @@ }, "yargs-parser": { "version": "11.1.1", - "resolved": "https://registry.npm.taobao.org/yargs-parser/download/yargs-parser-11.1.1.tgz?cache=0&sync_timestamp=1583130314354&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fyargs-parser%2Fdownload%2Fyargs-parser-11.1.1.tgz", + "resolved": "https://registry.npmmirror.com/yargs-parser/download/yargs-parser-11.1.1.tgz?cache=0&sync_timestamp=1637031045984&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fyargs-parser%2Fdownload%2Fyargs-parser-11.1.1.tgz", "integrity": "sha1-h5oIZZc7yp9rq1y987HGfsfTvPQ=", "dev": true, "requires": { @@ -21465,4 +21980,4 @@ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index f85cadfaea6..2a7ceb35714 100644 --- a/package.json +++ b/package.json @@ -35,28 +35,33 @@ }, "devDependencies": { "@babel/core": "^7.13.10", + "@babel/plugin-proposal-export-default-from": "^7.17.12", "@babel/preset-env": "7.8.7", "@cocos/babel-preset-cc": "2.2.0", "@cocos/build-engine": "4.4.1", "@types/fs-extra": "^5.0.4", "@types/jest": "^24.9.1", "@types/yargs": "^12.0.14", - "@typescript-eslint/eslint-plugin": "^4.29.3", - "@typescript-eslint/parser": "^4.29.3", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", "async": "^2.6.4", + "babelify": "^10.0.0", + "browserify": "^17.0.0", "chalk": "^2.4.1", "child_process": "^1.0.2", "commander": "^2.20.3", "dat.gui": "^0.7.5", "del": "^6.0.0", - "eslint": "^7.32.0", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-plugin-import": "^2.24.1", + "eslint": "^8.44.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.27.5", "fs": "^0.0.1-security", "fs-extra": "^7.0.1", "ftp": "0.3.10", "gulp": "^4.0.2", + "gulp-rename": "^2.0.0", "gulp-sequence": "^1.0.0", + "gulp-uglify": "^3.0.2", "gulp-zip": "^5.0.2", "http-server": "^0.12.3", "jest": "^28.0.2", @@ -75,15 +80,10 @@ "typedoc-plugin-cc": "file:scripts/typedoc-plugin", "typescript": "^4.3.5", "vconsole": "^3.3.0", - "which": "^2.0.2", - "yargs": "^12.0.5", - "@babel/plugin-proposal-export-default-from": "^7.17.12", - "babelify": "^10.0.0", - "browserify": "^17.0.0", - "gulp-rename": "^2.0.0", - "gulp-uglify": "^3.0.2", "vinyl-buffer": "^1.0.1", - "vinyl-source-stream": "^2.0.0" + "vinyl-source-stream": "^2.0.0", + "which": "^2.0.2", + "yargs": "^12.0.5" }, "dependencies": { "@cocos/box2d": "1.0.1", @@ -91,4 +91,4 @@ "@cocos/ccbuild": "^1.0.0-alpha.7", "@cocos/dragonbones-js": "^1.0.1" } -} \ No newline at end of file +} From 25996141395fb4d960247745949ac244acb47cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leslie=20Leigh=20=28=E6=9D=8E=E7=9A=84=E5=BA=8F=29?= Date: Fri, 14 Jul 2023 14:22:25 +0800 Subject: [PATCH 10/26] Fix eslint (#15728) --- .eslintrc.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 33743846d93..6b0db3f8be9 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -146,5 +146,5 @@ rules: # Prefer the interface style. '@typescript-eslint/consistent-type-definitions': [error, interface] '@typescript-eslint/explicit-function-return-type': [error, { - allowIIFEs: true, // IIFEs are widely used, writing their signature twice is painful + allowIIFEs: true, # IIFEs are widely used, writing their signature twice is painful }] From 1c16ac25d8268f977bcc625d31dea2d775e3afd1 Mon Sep 17 00:00:00 2001 From: intrigus-lgtm <60750685+intrigus-lgtm@users.noreply.github.com> Date: Fri, 14 Jul 2023 08:42:48 +0200 Subject: [PATCH 11/26] V3.8.0 (#15697) * Fix two security issues (#15451) * Fix run_test_cases.yml security issue * Properly fix #15065 * Only run commenting workflows on success. (#15499) --- .github/workflows/run_test_cases.yml | 46 ++++++++++++++----- .../workflows/run_test_cases_pr_comment.yml | 36 +++++++++++++++ .../web-interface-check-pr-comment.yml | 27 +++++++++++ .github/workflows/web-interface-check.yml | 9 +++- 4 files changed, 105 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/run_test_cases_pr_comment.yml create mode 100644 .github/workflows/web-interface-check-pr-comment.yml diff --git a/.github/workflows/run_test_cases.yml b/.github/workflows/run_test_cases.yml index 8e15788a1f3..038ebd04c88 100644 --- a/.github/workflows/run_test_cases.yml +++ b/.github/workflows/run_test_cases.yml @@ -1,10 +1,12 @@ name: run test cases on: - pull_request_target: + pull_request: issue_comment: types: [created, edited] +permissions: read-all + # github.head_ref is only defined on pull_request events concurrency: group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} @@ -279,16 +281,38 @@ jobs: JOBID=`cat /usr/local/lib/node_modules/@cctest/scheduler/logs/PR-TEST/nowJobId.log` cd .. python3 -u ./python/main.py --target=job_editor --jobid=$JOBID - - name: Update Comment - uses: peter-evans/create-or-update-comment@v1 + - name: Write comment body and issue number to file + uses: actions/github-script@v5 + env: + PR_AUTHOR: ${{ steps.parse_pr.outputs.pr_author }} + EDITOR_VERSION: ${{ steps.run_test_cases.outputs.editor }} + TASK_STATUS: ${{ steps.run_test_cases.outputs.status }} + TASK_REPORT: ${{ steps.run_test_cases.outputs.report }} + JOB_ID: ${{ steps.run_test_cases.outputs.jobid }} + GITHUB_RUN_ID: ${{ github.run_id }} + PR_NUMBER: ${{ steps.get_pr.outputs.pr_number }} with: - issue-number: ${{ steps.get_pr.outputs.pr_number }} - body: | - @${{ steps.parse_pr.outputs.pr_author }}, Please check the result of `run test cases`: + script: | + const fs = require('fs'); + fs.writeFileSync('pr.txt', process.env.PR_NUMBER); + fs.writeFileSync('comment.txt', `@${process.env.PR_AUTHOR}, Please check the result of \`run test cases\`: - Test Platform: PR-Test - - Editor Version: ${{ steps.run_test_cases.outputs.editor }} - - Task Result: ${{ steps.run_test_cases.outputs.status }} - - Task URL: http://cctest.cocos.org/#/reportview/PR-TEST/${{ steps.run_test_cases.outputs.jobid }}/-1 - - GitHub Action: https://github.com/cocos/cocos-engine/actions/runs/${{ github.run_id }} + - Editor Version: ${process.env.EDITOR_VERSION} + - Task Result: ${process.env.TASK_STATUS} + - Task URL: http://cctest.cocos.org/#/reportview/PR-TEST/${process.env.JOB_ID}/-1 + - GitHub Action: https://github.com/cocos/cocos-engine/actions/runs/${process.env.GITHUB_RUN_ID} ## Task Details - ${{ steps.run_test_cases.outputs.report }} + ${process.env.TASK_REPORT}`); + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: pr.txt + path: | + pr.txt + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: comment.txt + path: | + comment.txt + \ No newline at end of file diff --git a/.github/workflows/run_test_cases_pr_comment.yml b/.github/workflows/run_test_cases_pr_comment.yml new file mode 100644 index 00000000000..7c425fb30c9 --- /dev/null +++ b/.github/workflows/run_test_cases_pr_comment.yml @@ -0,0 +1,36 @@ +name: run test cases PR comment +on: + workflow_run: + workflows: ["run test cases"] + types: + - completed + +permissions: + issues: write + pull-requests: write + +jobs: + post-pr-comment: + if: github.event.workflow_run.conclusion == 'success' + runs-on: ubuntu-latest + steps: + - name: Download artifacts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.event.workflow_run.id }} + run: | + gh run download -R "${{ github.repository }}" --name "pr.txt" "$RUN_ID" + gh run download -R "${{ github.repository }}" --name "comment.txt" "$RUN_ID" + - name: Set PR environment variable + uses: actions/github-script@v4 + with: + script: | + const fs = require('fs'); + const pr = fs.readFileSync('pr.txt', 'utf8').trim(); + core.exportVariable('PR_NUMBER', pr); + + - name: Update Comment + uses: peter-evans/create-or-update-comment@v3 + with: + issue-number: ${{ env.PR_NUMBER }} + body-path: 'comment.txt' \ No newline at end of file diff --git a/.github/workflows/web-interface-check-pr-comment.yml b/.github/workflows/web-interface-check-pr-comment.yml new file mode 100644 index 00000000000..ec549062ed7 --- /dev/null +++ b/.github/workflows/web-interface-check-pr-comment.yml @@ -0,0 +1,27 @@ +name: Interface check PR comment +on: + workflow_run: + workflows: [" Interface check"] + types: + - completed + +permissions: + issues: write + pull-requests: write + +jobs: + post-pr-comment: + if: github.event.workflow_run.conclusion == 'success' + runs-on: ubuntu-latest + steps: + - name: Download artifacts + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + RUN_ID: ${{ github.event.workflow_run.id }} + run: | + gh run download -R "${{ github.repository }}" --name "interface-diff.txt" "$RUN_ID" + - name: Post interface-diff.txt as comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + path: interface-diff.txt + number: ${{ github.event.workflow_run.pull_requests[0].number }} \ No newline at end of file diff --git a/.github/workflows/web-interface-check.yml b/.github/workflows/web-interface-check.yml index 25f5e3492dd..f96ce3b2235 100644 --- a/.github/workflows/web-interface-check.yml +++ b/.github/workflows/web-interface-check.yml @@ -1,13 +1,15 @@ name: Interface check #on: push -on: [pull_request_target] +on: [pull_request] # github.head_ref is only defined on pull_request events concurrency: group: ${{ github.workflow }}-${{ github.actor }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true +permissions: read-all + jobs: interface_check: if: @@ -79,6 +81,9 @@ jobs: cat ./interface-diff.txt node ./.github/workflows/interface-check-report.js - - uses: marocchino/sticky-pull-request-comment@v2 + - name: Upload interface-diff.txt artifact + uses: actions/upload-artifact@v2 with: + name: interface-diff.txt path: ./engine/interface-diff.txt + \ No newline at end of file From b58fbde14301756283872894300de2b7e27283c8 Mon Sep 17 00:00:00 2001 From: Canvas Date: Fri, 14 Jul 2023 14:43:53 +0800 Subject: [PATCH 12/26] add getAttachments support. (#15724) * add getAttachments support. * fix code format. * add getAttachmentsForSlot support. * optimize get attachmentsForSlot. --- cocos/spine/lib/spine-define.ts | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cocos/spine/lib/spine-define.ts b/cocos/spine/lib/spine-define.ts index 0689285be42..ae5fa9a173f 100644 --- a/cocos/spine/lib/spine-define.ts +++ b/cocos/spine/lib/spine-define.ts @@ -41,6 +41,22 @@ function overrideDefineArrayProp (prototype, getPropVector, name) { }); } +function overrideDefineArrayFunction (prototype, getPropVector, name) { + Object.defineProperty(prototype, name, { + value () { + const array: any[] = []; + const vectors = getPropVector.call(this); + const count = vectors.size(); + for (let i = 0; i < count; i++) { + const objPtr = vectors.get(i); + array.push(objPtr); + } + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + return array; + }, + }); +} + function overrideClass (wasm) { spine.wasmUtil = wasm.SpineWasmUtil; spine.wasmUtil.wasm = wasm; @@ -1127,6 +1143,18 @@ function overrideProperty_Skin () { overrideDefineArrayProp(prototype, prototype.getBones, 'bones'); overrideDefineArrayProp(prototype, prototype.getAttachments, 'attachments'); overrideDefineArrayProp(prototype, prototype.getConstraints, 'constraints'); + overrideDefineArrayFunction(prototype, prototype.getAttachments, 'getAttachments'); + const originGetAttachmentsForSlot = prototype.getAttachmentsForSlot; + Object.defineProperty(prototype, 'getAttachmentsForSlot', { + value (slotIndex: number, attachments: Array) { + const vectors = originGetAttachmentsForSlot.call(this, slotIndex); + const count = vectors.size(); + for (let i = 0; i < count; i++) { + const objPtr = vectors.get(i); + attachments.push(objPtr); + } + }, + }); } function overrideProperty_SkinEntry () { From 212ca1276db045da1a52f7a37cc64198a82878dd Mon Sep 17 00:00:00 2001 From: Canvas Date: Fri, 14 Jul 2023 16:06:11 +0800 Subject: [PATCH 13/26] fix last frame add animation flash. (#15734) * fix last frame add animation flash. * fix when loop last set frame = 0 and once last set frame = length - 1. * optimize code order. --- cocos/spine/skeleton.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cocos/spine/skeleton.ts b/cocos/spine/skeleton.ts index 459f27e5cfe..1509d19341d 100644 --- a/cocos/spine/skeleton.ts +++ b/cocos/spine/skeleton.ts @@ -930,7 +930,7 @@ export class Skeleton extends UIRenderer { if (!frameCache.isCompleted) { frameCache.updateToFrame(frameIdx); } - + this._curFrame = frames[frameIdx]; if (frameCache.isCompleted && frameIdx >= frames.length) { this._playCount++; if (this._playTimes > 0 && this._playCount >= this._playTimes) { @@ -940,12 +940,13 @@ export class Skeleton extends UIRenderer { this._playCount = 0; this._isAniComplete = true; this._emitCacheCompleteEvent(); + return; } this._accTime = 0; frameIdx = 0; + this._curFrame = frames[frameIdx]; this._emitCacheCompleteEvent(); } - this._curFrame = frames[frameIdx]; } protected _emitCacheCompleteEvent () { From 91fb580cb5af1a08c5fb9fd2149b9451b5c52151 Mon Sep 17 00:00:00 2001 From: Canvas Date: Fri, 14 Jul 2023 18:23:34 +0800 Subject: [PATCH 14/26] add skin getAttachment api. (#15738) --- native/cocos/editor-support/spine-wasm/spine-type-export.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/native/cocos/editor-support/spine-wasm/spine-type-export.cpp b/native/cocos/editor-support/spine-wasm/spine-type-export.cpp index efa3e76b4ee..b73f05e5391 100644 --- a/native/cocos/editor-support/spine-wasm/spine-type-export.cpp +++ b/native/cocos/editor-support/spine-wasm/spine-type-export.cpp @@ -660,6 +660,9 @@ EMSCRIPTEN_BINDINGS(spine) { .function("setAttachment", optional_override([](Skin &obj, size_t index, const std::string& name, Attachment *attachment) { return obj.setAttachment(index, STRING_STD2SP(name), attachment); }), allow_raw_pointers()) .function("addSkin", select_overload(&Skin::addSkin), allow_raw_pointers()) .function("copySkin", select_overload(&Skin::copySkin), allow_raw_pointers()) + .function("getAttachment", optional_override([](Skin &obj, size_t slotIndex, const std::string& name) { + return obj.getAttachment(slotIndex, STRING_STD2SP(name)); + }), allow_raw_pointers()) .function("getAttachments", optional_override([](Skin &obj) { std::vector entriesVector; auto entries = obj.getAttachments(); From b324a21e85bc3ee9ec5b83941957d07dbd3dfa48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leslie=20Leigh=20=28=E6=9D=8E=E7=9A=84=E5=BA=8F=29?= Date: Fri, 14 Jul 2023 18:52:02 +0800 Subject: [PATCH 15/26] Upgrade CI node (#15743) --- .github/workflows/web-quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/web-quality.yml b/.github/workflows/web-quality.yml index 97aa573fe7e..b29601847cb 100644 --- a/.github/workflows/web-quality.yml +++ b/.github/workflows/web-quality.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: 12 + node-version: '14.19' - name: Download external run: | From c023759a1c9de070288c1d2e8d9286f0426c8de6 Mon Sep 17 00:00:00 2001 From: Canvas Date: Sat, 15 Jul 2023 13:41:45 +0800 Subject: [PATCH 16/26] update external version v3.8.0-17 -> v3.8.0-18. (#15744) --- native/external-config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/external-config.json b/native/external-config.json index 1e1592c895b..85fa10072c2 100644 --- a/native/external-config.json +++ b/native/external-config.json @@ -3,6 +3,6 @@ "type": "github", "owner": "cocos-creator", "name": "engine-native-external", - "checkout": "v3.8.0-17" + "checkout": "v3.8.0-18" } -} +} \ No newline at end of file From 401b4083291bc3cf967d674496fa24298f380932 Mon Sep 17 00:00:00 2001 From: PP Date: Mon, 17 Jul 2023 11:17:04 +0800 Subject: [PATCH 17/26] update typedoc index (#15752) --- typedoc-index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/typedoc-index.ts b/typedoc-index.ts index 61cf294714b..4108bf986c5 100644 --- a/typedoc-index.ts +++ b/typedoc-index.ts @@ -5,9 +5,12 @@ export * from './exports/3d'; export * from './exports/animation'; export * from './exports/audio'; export * from './exports/base'; +export * from './exports/custom-pipeline'; export * from './exports/dragon-bones'; +export * from './exports/geometry-renderer'; export * from './exports/gfx-empty'; export * from './exports/intersection-2d'; +export * from './exports/light-probe'; export * from './exports/particle-2d'; export * from './exports/particle'; export * from './exports/physics-2d-framework'; @@ -23,3 +26,4 @@ export * from './exports/ui'; export * from './exports/video'; export * from './exports/webview'; export * from './exports/sorting'; +export * from './exports/xr'; From 45a80113612bc5f28aeb336d4671a479e7225d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leslie=20Leigh=20=28=E6=9D=8E=E7=9A=84=E5=BA=8F=29?= Date: Mon, 17 Jul 2023 11:23:32 +0800 Subject: [PATCH 18/26] Bump CI Node version to 16.x (#15751) * Update web-quality.yml --- .github/workflows/web-quality.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/web-quality.yml b/.github/workflows/web-quality.yml index b29601847cb..092c2a1886d 100644 --- a/.github/workflows/web-quality.yml +++ b/.github/workflows/web-quality.yml @@ -18,14 +18,14 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: - node-version: '14.19' + node-version: '16.x' - name: Download external run: | EXT_VERSION=`node ./.github/workflows/get-native-external-version.js` git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos/cocos-engine-external native/external - - run: npm ci + - run: npx npm@6 ci - name: Run ESLint shell: pwsh From fb2f76d0289b870aea230e70069a47a9926b83cd Mon Sep 17 00:00:00 2001 From: qiuguohua Date: Mon, 17 Jul 2023 11:43:55 +0800 Subject: [PATCH 19/26] Repair mac platform to open the pointerlock click mouse will appear offset problem. (#15750) --- native/cocos/platform/mac/View.mm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/native/cocos/platform/mac/View.mm b/native/cocos/platform/mac/View.mm index 405af26fdee..6fbb047f3aa 100644 --- a/native/cocos/platform/mac/View.mm +++ b/native/cocos/platform/mac/View.mm @@ -38,6 +38,7 @@ of this software and associated engine source code (the "Software"), a limited, @implementation View { cc::MouseEvent _mouseEvent; cc::KeyboardEvent _keyboardEvent; + NSRect _contentRect; AppDelegate *_delegate; } @@ -73,6 +74,11 @@ - (instancetype)initWithFrame:(NSRect)frameRect { owner:self userInfo:nil] autorelease]; [self addTrackingArea:trackingArea]; + + NSWindow* window = self.window; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification + object:window]; + [self updateContentRect]; } return self; } @@ -88,6 +94,7 @@ - (void)mtkView:(nonnull MTKView *)view drawableSizeWillChange:(CGSize)size { ev.width = static_cast(size.width); ev.height = static_cast(size.height); cc::events::WindowEvent::broadcast(ev); + [self updateContentRect]; } - (void)displayLayer:(CALayer *)layer { @@ -110,6 +117,8 @@ - (void)setFrameSize:(NSSize)newSize { ev.height = static_cast(nativeSize.height); cc::events::WindowEvent::broadcast(ev); } + + [self updateContentRect]; } - (void)viewDidChangeBackingProperties { @@ -133,6 +142,7 @@ - (void)viewDidChangeBackingProperties { ev.height = static_cast(height); cc::events::WindowEvent::broadcast(ev); } + [self updateContentRect]; } - (void)keyDown:(NSEvent *)event { @@ -272,6 +282,15 @@ - (BOOL)acceptsFirstResponder { return YES; } +- (void)updateContentRect { + NSWindow* window = self.window; + _contentRect = [window contentRectForFrameRect:[window frame]]; +} + +- (void)windowDidMove:(NSNotification *)aNotification { + [self updateContentRect]; +} + - (void)sendMouseEvent:(int)button type:(cc::MouseEvent::Type)type event:(NSEvent *)event { _mouseEvent.windowId = [self getWindowId]; _mouseEvent.type = type; @@ -311,9 +330,11 @@ - (void)sendMouseEvent:(int)button type:(cc::MouseEvent::Type)type event:(NSEven } auto mainDisplayId = CGMainDisplayID(); - float windowX = contentRect.origin.x; + + float windowX = _contentRect.origin.x; float windowY = - CGDisplayPixelsHigh(mainDisplayId) - contentRect.origin.y - contentRect.size.height; + CGDisplayPixelsHigh(mainDisplayId) - _contentRect.origin.y - _contentRect.size.height; + window->setLastMousePos(windowX + _mouseEvent.x, windowY + _mouseEvent.y); } cc::events::Mouse::broadcast(_mouseEvent); From ebfcbb62286282146cb79260471503bb92674e34 Mon Sep 17 00:00:00 2001 From: PP Date: Mon, 17 Jul 2023 14:24:48 +0800 Subject: [PATCH 20/26] [AOT] fix ts engine compile (#15745) --- cocos/physics/framework/physics-selector.ts | 2 +- cocos/physics/physx/instantiate.jsb.ts | 4 ++-- templates/openharmony/entry/src/main/ets/cocos/game.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/physics/framework/physics-selector.ts b/cocos/physics/framework/physics-selector.ts index b7041aa82f0..4cd1131ce66 100644 --- a/cocos/physics/framework/physics-selector.ts +++ b/cocos/physics/framework/physics-selector.ts @@ -64,7 +64,7 @@ interface IPhysicsWrapperObject { interface IPhysicsBackend { [key: string]: IPhysicsWrapperObject; } -interface IPhysicsSelector { +export interface IPhysicsSelector { /** * @en * The id of the physics engine being used by the physics system. diff --git a/cocos/physics/physx/instantiate.jsb.ts b/cocos/physics/physx/instantiate.jsb.ts index 972a27ee0a7..4d9c0bc7f41 100644 --- a/cocos/physics/physx/instantiate.jsb.ts +++ b/cocos/physics/physx/instantiate.jsb.ts @@ -26,6 +26,6 @@ * hack for jsb, shoule be refactor in futrue */ -import { selector } from '../framework/physics-selector'; +import { selector, IPhysicsSelector } from '../framework/physics-selector'; -selector.id = 'physx'; +(selector as Mutable).id = 'physx'; diff --git a/templates/openharmony/entry/src/main/ets/cocos/game.ts b/templates/openharmony/entry/src/main/ets/cocos/game.ts index ae8937562fe..30d203a2e2b 100644 --- a/templates/openharmony/entry/src/main/ets/cocos/game.ts +++ b/templates/openharmony/entry/src/main/ets/cocos/game.ts @@ -80,7 +80,7 @@ export function launchEngine (): Promise { return systemReady().then(() => { // @ts-ignore window.oh.loadModule = loadModule; - import('./jsb-adapter/web-adapter.js').then(() => { + return import('./jsb-adapter/web-adapter.js').then(() => { return import('./src/<%= systemBundleUrl%>').then(() => { System.warmup({ importMap, From 95c93e51c13ac4a6ad02bc51bc60954fe23c9359 Mon Sep 17 00:00:00 2001 From: bofeng-song Date: Mon, 17 Jul 2023 16:11:13 +0800 Subject: [PATCH 21/26] refine: Optimize the display of the editing box on the Android platform. (#15730) * refine: Optimize the display of the editing box on the Android platform. --- .../com/cocos/lib/CocosEditBoxActivity.java | 108 +++++++----------- 1 file changed, 41 insertions(+), 67 deletions(-) diff --git a/native/cocos/platform/android/java/src/com/cocos/lib/CocosEditBoxActivity.java b/native/cocos/platform/android/java/src/com/cocos/lib/CocosEditBoxActivity.java index 7e885b79678..388b9fdb27f 100644 --- a/native/cocos/platform/android/java/src/com/cocos/lib/CocosEditBoxActivity.java +++ b/native/cocos/platform/android/java/src/com/cocos/lib/CocosEditBoxActivity.java @@ -28,7 +28,6 @@ of this software and associated documentation files (the "Software"), to deal import android.app.Activity; import android.content.Context; import android.content.Intent; -import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; @@ -44,6 +43,7 @@ of this software and associated documentation files (the "Software"), to deal import android.text.TextUtils; import android.text.TextWatcher; import android.util.Log; +import android.view.Gravity; import android.view.KeyEvent; import android.view.View; import android.view.ViewGroup; @@ -68,8 +68,6 @@ public class CocosEditBoxActivity extends Activity { private Button mButton = null; private String mButtonTitle = null; private boolean mConfirmHold = true; - private RelativeLayout mButtonLayout = null; - private RelativeLayout.LayoutParams mButtonParams; private int mEditTextID = 1; private int mButtonLayoutID = 2; @@ -80,24 +78,15 @@ class Cocos2dxEditText extends EditText { private final String TAG = "Cocos2dxEditBox"; private boolean mIsMultiLine = false; private TextWatcher mTextWatcher = null; - private Paint mPaint; - private int mLineColor = DARK_GREEN; - private float mLineWidth = 2f; private boolean keyboardVisible = false; private int mScreenHeight; private boolean mCheckKeyboardShowNormally = false; public Cocos2dxEditText(Activity context){ super(context); - //remove focus border - this.setBackground(null); this.setTextColor(Color.BLACK); mScreenHeight = ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)). getDefaultDisplay().getHeight(); - mPaint = new Paint(); - mPaint.setStrokeWidth(mLineWidth); - mPaint.setStyle(Paint.Style.FILL); - mPaint.setColor(mLineColor); mTextWatcher = new TextWatcher() { @Override @@ -119,20 +108,6 @@ public void afterTextChanged(Editable s) { registKeyboardVisible(); } - /*************************************************************************************** - Override functions. - **************************************************************************************/ - - @Override - protected void onDraw(Canvas canvas) { - // draw the underline - int padB = this.getPaddingBottom(); - canvas.drawLine(getScrollX(), this.getHeight() - padB / 2 - mLineWidth, - getScrollX() + this.getWidth(), - this.getHeight() - padB / 2 - mLineWidth, mPaint); - super.onDraw(canvas); - } - /*************************************************************************************** Public functions. **************************************************************************************/ @@ -245,7 +220,9 @@ public void onGlobalLayout() { if (!keyboardVisible) { keyboardVisible = true; } + getRootView().scrollTo(0, heightDiff); } else { + getRootView().scrollTo(0, 0); if (mCheckKeyboardShowNormally && !keyboardVisible) { Toast.makeText(CocosEditBoxActivity.this, R.string.tip_disable_safe_input_type, Toast.LENGTH_SHORT).show(); } @@ -314,52 +291,58 @@ public void onClick(View view) { **************************************************************************************/ private void addItems(RelativeLayout layout) { RelativeLayout myLayout = new RelativeLayout(this); - this.addEditText(myLayout); - this.addButton(myLayout); + myLayout.setBackgroundColor(Color.argb(255, 244, 244, 244)); RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, - ViewGroup.LayoutParams.WRAP_CONTENT); + ViewGroup.LayoutParams.WRAP_CONTENT); layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); layout.addView(myLayout, layoutParams); - //FXI ME: Is it needed? - // When touch area outside EditText and soft keyboard, then hide. -// layout.setOnTouchListener(new View.OnTouchListener() { -// @Override -// public boolean onTouch(View v, MotionEvent event) { -// Cocos2dxEditBox.this.hide(); -// return true; -// } -// -// }); + this.addEditText(myLayout); + this.addButton(myLayout); } + private int dpToPixel(int dp) { + final float scale = getResources().getDisplayMetrics().density; + int px = (int) (dp * scale + 0.5f); + return px; + } private void addEditText(RelativeLayout layout) { mEditText = new Cocos2dxEditText(this); mEditText.setVisibility(View.INVISIBLE); - mEditText.setBackgroundColor(Color.WHITE); + mEditText.setGravity(Gravity.CENTER_VERTICAL); + mEditText.setBackground(getRoundRectShape(18, Color.WHITE, Color.WHITE)); mEditText.setId(mEditTextID); + int bottomPadding = dpToPixel(4); + int leftPadding = dpToPixel(3); + mEditText.setPadding(leftPadding,bottomPadding,leftPadding,bottomPadding); + RelativeLayout.LayoutParams editParams = new RelativeLayout.LayoutParams( - ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + + editParams.addRule(RelativeLayout.CENTER_VERTICAL); editParams.addRule(RelativeLayout.LEFT_OF, mButtonLayoutID); + int bottomMargin = dpToPixel(5); + int leftMargin = dpToPixel(4); + editParams.setMargins(leftMargin, bottomMargin, bottomMargin, bottomMargin); layout.addView(mEditText, editParams); } private void addButton(RelativeLayout layout) { mButton = new Button(this); - mButtonParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); + RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); mButton.setTextColor(Color.WHITE); - mButton.setBackground(getRoundRectShape()); - mButtonLayout = new RelativeLayout(GlobalObject.getActivity()); - mButtonLayout.setBackgroundColor(Color.WHITE); - RelativeLayout.LayoutParams buttonLayoutParams = new RelativeLayout.LayoutParams( - ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); - buttonLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); - buttonLayoutParams.addRule(RelativeLayout.ALIGN_BOTTOM, mEditTextID); - buttonLayoutParams.addRule(RelativeLayout.ALIGN_TOP, mEditTextID); - mButtonLayout.addView(mButton, mButtonParams); - mButtonLayout.setId(mButtonLayoutID); - layout.addView(mButtonLayout, buttonLayoutParams); + mButton.setTextSize(16); + mButton.setBackground(getRoundRectShape(18, DARK_GREEN, DARK_GREEN_PRESS)); + int paddingLeft = dpToPixel(5); + mButton.setPadding(paddingLeft,0,paddingLeft,0); + layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT); + layoutParams.addRule(RelativeLayout.ALIGN_TOP, mEditTextID); + layoutParams.addRule(RelativeLayout.ALIGN_BOTTOM, mEditTextID); + layoutParams.rightMargin = dpToPixel(4); + layout.addView(mButton, layoutParams); + mButton.setGravity(Gravity.CENTER); + mButton.setId(mButtonLayoutID); mButton.setOnClickListener(new View.OnClickListener() { @Override @@ -372,18 +355,17 @@ public void onClick(View v) { }); } - private Drawable getRoundRectShape() { - int radius = 7; + private Drawable getRoundRectShape(int radius, int normalColor, int pressColor) { float[] outerRadii = new float[]{radius, radius, radius, radius, radius, radius, radius, radius}; RoundRectShape roundRectShape = new RoundRectShape(outerRadii, null, null); ShapeDrawable shapeDrawableNormal = new ShapeDrawable(); shapeDrawableNormal.setShape(roundRectShape); shapeDrawableNormal.getPaint().setStyle(Paint.Style.FILL); - shapeDrawableNormal.getPaint().setColor(DARK_GREEN); + shapeDrawableNormal.getPaint().setColor(normalColor); ShapeDrawable shapeDrawablePress = new ShapeDrawable(); shapeDrawablePress.setShape(roundRectShape); shapeDrawablePress.getPaint().setStyle(Paint.Style.FILL); - shapeDrawablePress.getPaint().setColor(DARK_GREEN_PRESS); + shapeDrawablePress.getPaint().setColor(pressColor); StateListDrawable drawable = new StateListDrawable(); drawable.addState(new int[]{android.R.attr.state_pressed}, shapeDrawablePress); drawable.addState(new int[]{}, shapeDrawableNormal); @@ -400,19 +382,11 @@ private void hide() { public void show(String defaultValue, int maxLength, boolean isMultiline, boolean confirmHold, String confirmType, String inputType) { mConfirmHold = confirmHold; mEditText.show(defaultValue, maxLength, isMultiline, confirmHold, confirmType, inputType); - int editPaddingBottom = mEditText.getPaddingBottom(); - int editPadding = mEditText.getPaddingTop(); - mEditText.setPadding(editPadding, editPadding, editPadding, editPaddingBottom); mButton.setText(mButtonTitle); if (TextUtils.isEmpty(mButtonTitle)) { - mButton.setPadding(0, 0, 0, 0); - mButtonParams.setMargins(0, 0, 0, 0); - mButtonLayout.setVisibility(View.INVISIBLE); + mButton.setVisibility(View.INVISIBLE); } else { - int buttonTextPadding = mEditText.getPaddingBottom() / 2; - mButton.setPadding(editPadding, buttonTextPadding, editPadding, buttonTextPadding); - mButtonParams.setMargins(0, buttonTextPadding, 0, 0); - mButtonLayout.setVisibility(View.VISIBLE); + mButton.setVisibility(View.VISIBLE); } this.openKeyboard(); From 7a4841404f805626778b94aee78413cca61263cf Mon Sep 17 00:00:00 2001 From: hyde zhou Date: Mon, 17 Jul 2023 16:59:04 +0800 Subject: [PATCH 22/26] fix test (#15755) --- native/cocos/renderer/pipeline/custom/test/test.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/native/cocos/renderer/pipeline/custom/test/test.h b/native/cocos/renderer/pipeline/custom/test/test.h index d5d2b5e0458..cb28556b1dc 100644 --- a/native/cocos/renderer/pipeline/custom/test/test.h +++ b/native/cocos/renderer/pipeline/custom/test/test.h @@ -77,7 +77,7 @@ static void fillTestGraph(const ViewInfo &rasterData, const ResourceInfo &rescIn add_vertex(layoutGraphData, RenderPhaseTag{}, ""); auto &layout = layoutGraphData.layouts.back(); - auto &descPair = layout.descriptorSets.emplace(UpdateFrequency::PER_PASS, DescriptorSetData{renderGraph.get_allocator()}); + const auto &descPair = layout.descriptorSets.emplace(UpdateFrequency::PER_PASS, DescriptorSetData{renderGraph.get_allocator()}); auto &descData = (*descPair.first).second.descriptorSetLayoutData; for (size_t i = 0; i < layoutInfo.size(); ++i) { const ccstd::string passName = "pass" + std::to_string(i); From 979e3c9677a47b4357d6d6fe3f8908ec7f2e3ee3 Mon Sep 17 00:00:00 2001 From: hyde zhou Date: Tue, 18 Jul 2023 11:55:05 +0800 Subject: [PATCH 23/26] V3.8.1 msaa (#15584) --- .../reflection-probe-component.ts | 8 +- cocos/gfx/base/define.ts | 31 +- cocos/gfx/base/device.ts | 30 +- cocos/gfx/webgl/webgl-commands.ts | 312 ++-- cocos/gfx/webgl2/webgl2-commands.ts | 440 +++-- cocos/render-scene/core/pass.ts | 38 +- cocos/rendering/custom/executor.ts | 266 ++- cocos/rendering/custom/index.jsb.ts | 8 +- cocos/rendering/custom/index.ts | 6 +- cocos/rendering/custom/pipeline.ts | 113 +- cocos/rendering/custom/render-graph.ts | 7 +- cocos/rendering/custom/scene.ts | 34 + cocos/rendering/custom/types.ts | 3 + cocos/rendering/custom/web-pipeline.ts | 428 +++-- cocos/rendering/custom/web-scene-visitor.ts | 4 +- cocos/rendering/custom/web-scene.ts | 2 +- native/CMakeLists.txt | 6 +- native/cocos/core/assets/RenderTexture.cpp | 2 +- .../cocos/renderer/frame-graph/FrameGraph.cpp | 2 +- .../renderer/gfx-agent/CommandBufferAgent.cpp | 21 + .../renderer/gfx-agent/CommandBufferAgent.h | 1 + .../cocos/renderer/gfx-agent/DeviceAgent.cpp | 4 + native/cocos/renderer/gfx-agent/DeviceAgent.h | 2 +- .../renderer/gfx-agent/FramebufferAgent.cpp | 3 + .../renderer/gfx-base/GFXCommandBuffer.h | 1 + .../cocos/renderer/gfx-base/GFXDef-common.h | 25 +- native/cocos/renderer/gfx-base/GFXDef.cpp | 24 +- native/cocos/renderer/gfx-base/GFXDevice.cpp | 2 +- native/cocos/renderer/gfx-base/GFXDevice.h | 6 + .../renderer/gfx-base/GFXFramebuffer.cpp | 2 + .../cocos/renderer/gfx-base/GFXFramebuffer.h | 2 + .../cocos/renderer/gfx-base/GFXRenderPass.cpp | 5 +- .../cocos/renderer/gfx-base/GFXRenderPass.h | 2 + native/cocos/renderer/gfx-base/GFXTexture.cpp | 6 +- .../renderer/gfx-empty/EmptyCommandBuffer.cpp | 3 + .../renderer/gfx-empty/EmptyCommandBuffer.h | 1 + .../renderer/gfx-gles2/GLES2CommandBuffer.cpp | 4 + .../renderer/gfx-gles2/GLES2CommandBuffer.h | 1 + .../renderer/gfx-gles2/GLES2Commands.cpp | 29 +- .../cocos/renderer/gfx-gles2/GLES2Commands.h | 2 + .../cocos/renderer/gfx-gles2/GLES2Device.cpp | 8 + native/cocos/renderer/gfx-gles2/GLES2Device.h | 2 +- .../renderer/gfx-gles2/GLES2GPUObjects.h | 4 +- .../gfx-gles2/GLES2PrimaryCommandBuffer.cpp | 4 + .../gfx-gles2/GLES2PrimaryCommandBuffer.h | 1 + .../cocos/renderer/gfx-gles2/GLES2Texture.cpp | 10 +- .../renderer/gfx-gles3/GLES3CommandBuffer.cpp | 4 + .../renderer/gfx-gles3/GLES3CommandBuffer.h | 1 + .../renderer/gfx-gles3/GLES3Commands.cpp | 932 +++++----- .../cocos/renderer/gfx-gles3/GLES3Commands.h | 2 + .../cocos/renderer/gfx-gles3/GLES3Device.cpp | 11 +- native/cocos/renderer/gfx-gles3/GLES3Device.h | 4 +- .../renderer/gfx-gles3/GLES3Framebuffer.cpp | 27 +- .../renderer/gfx-gles3/GLES3Framebuffer.h | 1 + .../renderer/gfx-gles3/GLES3GPUObjects.h | 85 +- .../gfx-gles3/GLES3PrimaryCommandBuffer.cpp | 4 + .../gfx-gles3/GLES3PrimaryCommandBuffer.h | 1 + .../renderer/gfx-gles3/GLES3RenderPass.cpp | 10 +- .../cocos/renderer/gfx-gles3/GLES3Texture.cpp | 14 +- .../renderer/gfx-metal/MTLCommandBuffer.h | 1 + .../renderer/gfx-metal/MTLCommandBuffer.mm | 34 +- native/cocos/renderer/gfx-metal/MTLDevice.h | 5 +- native/cocos/renderer/gfx-metal/MTLDevice.mm | 25 +- .../renderer/gfx-metal/MTLPipelineState.mm | 2 +- native/cocos/renderer/gfx-metal/MTLTexture.h | 2 + native/cocos/renderer/gfx-metal/MTLTexture.mm | 39 +- native/cocos/renderer/gfx-metal/MTLUtils.mm | 12 +- .../gfx-validator/CommandBufferValidator.cpp | 39 +- .../gfx-validator/CommandBufferValidator.h | 1 + .../gfx-validator/DeviceValidator.cpp | 4 + .../renderer/gfx-validator/DeviceValidator.h | 2 +- .../gfx-validator/FramebufferValidator.cpp | 11 + .../renderer/gfx-vulkan/VKCommandBuffer.cpp | 54 +- .../renderer/gfx-vulkan/VKCommandBuffer.h | 1 + .../cocos/renderer/gfx-vulkan/VKCommands.cpp | 209 +-- native/cocos/renderer/gfx-vulkan/VKDevice.cpp | 19 + native/cocos/renderer/gfx-vulkan/VKDevice.h | 2 +- .../renderer/gfx-vulkan/VKFramebuffer.cpp | 5 + .../cocos/renderer/gfx-vulkan/VKGPUObjects.h | 17 +- .../renderer/gfx-vulkan/VKRenderPass.cpp | 10 +- .../cocos/renderer/gfx-vulkan/VKTexture.cpp | 6 +- native/cocos/renderer/gfx-vulkan/VKUtils.cpp | 24 +- native/cocos/renderer/gfx-vulkan/VKUtils.h | 3 +- .../gfx-wgpu/WGPUDescriptorSetLayout.cpp | 2 +- .../renderer/gfx-wgpu/WGPURenderPass.cpp | 8 +- .../cocos/renderer/gfx-wgpu/WGPUTexture.cpp | 4 +- native/cocos/renderer/gfx-wgpu/WGPUUtils.h | 16 +- .../renderer/pipeline/RenderPipeline.cpp | 2 +- .../pipeline/custom/FGDispatcherTypes.h | 3 + .../pipeline/custom/FrameGraphDispatcher.cpp | 251 ++- .../pipeline/custom/NativeBuiltinUtils.cpp | 557 ++++++ .../pipeline/custom/NativeBuiltinUtils.h | 86 + .../pipeline/custom/NativeDefaultScene.cpp | 50 - .../pipeline/custom/NativeExecutor.cpp | 105 +- .../pipeline/custom/NativePipeline.cpp | 396 +++-- .../pipeline/custom/NativePipelineFwd.h | 4 +- .../pipeline/custom/NativePipelineTypes.cpp | 9 +- .../pipeline/custom/NativePipelineTypes.h | 231 ++- .../pipeline/custom/NativeRenderGraph.cpp | 1494 ++++------------- .../custom/NativeRenderGraphUtils.cpp | 327 ++++ .../pipeline/custom/NativeRenderGraphUtils.h | 216 +++ .../pipeline/custom/NativeResourceGraph.cpp | 11 +- .../pipeline/custom/NativeSceneCulling.cpp | 13 +- .../renderer/pipeline/custom/NativeSetter.cpp | 153 ++ .../renderer/pipeline/custom/NativeUtils.cpp | 153 +- .../renderer/pipeline/custom/NativeUtils.h | 40 +- .../pipeline/custom/RenderCommonFwd.h | 10 + .../pipeline/custom/RenderCommonTypes.h | 27 + .../pipeline/custom/RenderGraphTypes.cpp | 15 +- .../pipeline/custom/RenderGraphTypes.h | 10 +- .../pipeline/custom/RenderInterfaceFwd.h | 5 +- .../pipeline/custom/RenderInterfaceTypes.h | 107 +- .../renderer/pipeline/custom/test/test.h | 51 +- .../renderer/pipeline/shadow/ShadowFlow.cpp | 4 +- .../src/complicated_barrier_case.cpp | 13 +- .../src/simple_closed_barrier_test.cpp | 8 +- native/tools/swig-config/gfx.i | 1 + native/tools/swig-config/render.i | 4 - 118 files changed, 4908 insertions(+), 3016 deletions(-) create mode 100644 cocos/rendering/custom/scene.ts create mode 100644 native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.cpp create mode 100644 native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.h delete mode 100644 native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp create mode 100644 native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.cpp create mode 100644 native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h create mode 100644 native/cocos/renderer/pipeline/custom/NativeSetter.cpp diff --git a/cocos/3d/reflection-probe/reflection-probe-component.ts b/cocos/3d/reflection-probe/reflection-probe-component.ts index ec66ef564b2..9c94934eef3 100644 --- a/cocos/3d/reflection-probe/reflection-probe-component.ts +++ b/cocos/3d/reflection-probe/reflection-probe-component.ts @@ -23,7 +23,7 @@ */ import { ccclass, executeInEditMode, menu, playOnFocus, serializable, tooltip, type, visible } from 'cc.decorator'; import { EDITOR, EDITOR_NOT_IN_PREVIEW } from 'internal:constants'; -import { CCBoolean, CCObject, Color, Enum, Vec3 } from '../../core'; +import { CCBoolean, CCObject, Color, Enum, Vec3, warn } from '../../core'; import { TextureCube } from '../../asset/assets'; import { scene } from '../../render-scene'; @@ -127,7 +127,7 @@ export class ReflectionProbe extends Component { * @zh 设置探针类型,环境反射或者平面反射 */ @type(Enum(ProbeType)) - set probeType (value: number) { + set probeType (value: ProbeType) { this.probe.probeType = value; if (value !== this._probeType) { const lastSize = this._size.clone(); @@ -151,7 +151,7 @@ export class ReflectionProbe extends Component { this._objFlags ^= CCObject.Flags.IsRotationLocked; } if (!this._sourceCamera) { - console.warn('the reflection camera is invalid, please set the reflection camera'); + warn('the reflection camera is invalid, please set the reflection camera'); } else { this.probe.switchProbeType(value, this._sourceCamera.camera); } @@ -163,7 +163,7 @@ export class ReflectionProbe extends Component { this.size = this._size; } } - get probeType (): number { + get probeType (): ProbeType { return this._probeType; } diff --git a/cocos/gfx/base/define.ts b/cocos/gfx/base/define.ts index 769ade2ff90..53eeb4062cb 100644 --- a/cocos/gfx/base/define.ts +++ b/cocos/gfx/base/define.ts @@ -21,6 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +/* eslint-disable no-empty-function */ import { Queue } from './queue'; import { Buffer } from './buffer'; @@ -129,6 +130,7 @@ export enum Feature { SUBPASS_COLOR_INPUT, SUBPASS_DEPTH_STENCIL_INPUT, RASTERIZATION_ORDER_COHERENT, + MULTI_SAMPLE_RESOLVE_DEPTH_STENCIL, COUNT, } @@ -405,6 +407,7 @@ export enum TextureFlagBit { GENERAL_LAYOUT = 0x2, // For inout framebuffer attachments EXTERNAL_OES = 0x4, // External oes texture EXTERNAL_NORMAL = 0x8, // External normal texture + LAZILY_ALLOCATED = 0x10 // Try lazily allocated mode. } export enum FormatFeatureBit { @@ -417,10 +420,13 @@ export enum FormatFeatureBit { } export enum SampleCount { - ONE, // Single sample - MULTIPLE_PERFORMANCE, // Multiple samples prioritizing performance over quality - MULTIPLE_BALANCE, // Multiple samples leveraging both quality and performance - MULTIPLE_QUALITY, // Multiple samples prioritizing quality over performance + X1 = 0x01, + X2 = 0x02, + X4 = 0x04, + X8 = 0x08, + X16 = 0x10, + X32 = 0x20, + X64 = 0x40 } export enum VsyncMode { @@ -1171,7 +1177,7 @@ export class TextureInfo { public flags: TextureFlags = TextureFlagBit.NONE, public layerCount: number = 1, public levelCount: number = 1, - public samples: SampleCount = SampleCount.ONE, + public samples: SampleCount = SampleCount.X1, public depth: number = 1, public externalRes: number = 0, ) {} @@ -1513,7 +1519,7 @@ export class ColorAttachment { constructor ( public format: Format = Format.UNKNOWN, - public sampleCount: SampleCount = SampleCount.ONE, + public sampleCount: SampleCount = SampleCount.X1, public loadOp: LoadOp = LoadOp.CLEAR, public storeOp: StoreOp = StoreOp.STORE, public barrier: GeneralBarrier = null!, @@ -1534,7 +1540,7 @@ export class DepthStencilAttachment { constructor ( public format: Format = Format.UNKNOWN, - public sampleCount: SampleCount = SampleCount.ONE, + public sampleCount: SampleCount = SampleCount.X1, public depthLoadOp: LoadOp = LoadOp.CLEAR, public depthStoreOp: StoreOp = StoreOp.STORE, public stencilLoadOp: LoadOp = LoadOp.CLEAR, @@ -1608,6 +1614,7 @@ export class RenderPassInfo { constructor ( public colorAttachments: ColorAttachment[] = [], public depthStencilAttachment: DepthStencilAttachment = new DepthStencilAttachment(), + public depthStencilResolveAttachment: DepthStencilAttachment = new DepthStencilAttachment(), public subpasses: SubpassInfo[] = [], public dependencies: SubpassDependency[] = [], ) {} @@ -1615,6 +1622,7 @@ export class RenderPassInfo { public copy (info: Readonly): RenderPassInfo { deepCopy(this.colorAttachments, info.colorAttachments, ColorAttachment); this.depthStencilAttachment.copy(info.depthStencilAttachment); + this.depthStencilResolveAttachment.copy(info.depthStencilResolveAttachment); deepCopy(this.subpasses, info.subpasses, SubpassInfo); deepCopy(this.dependencies, info.dependencies, SubpassDependency); return this; @@ -1703,12 +1711,14 @@ export class FramebufferInfo { public renderPass: RenderPass = null!, public colorTextures: Texture[] = [], public depthStencilTexture: Texture | null = null, + public depthStencilResolveTexture: Texture | null = null, ) {} public copy (info: Readonly): FramebufferInfo { this.renderPass = info.renderPass; this.colorTextures = info.colorTextures.slice(); this.depthStencilTexture = info.depthStencilTexture; + this.depthStencilResolveTexture = info.depthStencilResolveTexture; return this; } } @@ -2245,8 +2255,11 @@ export function FormatSize (format: Format, width: number, height: number, depth * @param mips The target mip levels. */ export function FormatSurfaceSize ( - format: Format, width: number, height: number, - depth: number, mips: number, + format: Format, + width: number, + height: number, + depth: number, + mips: number, ): number { let size = 0; diff --git a/cocos/gfx/base/device.ts b/cocos/gfx/base/device.ts index e0272538b24..ff4f113b59f 100644 --- a/cocos/gfx/base/device.ts +++ b/cocos/gfx/base/device.ts @@ -28,7 +28,7 @@ import { ShaderInfo, InputAssemblerInfo, RenderPassInfo, FramebufferInfo, DescriptorSetLayoutInfo, PipelineLayoutInfo, QueueInfo, BufferTextureCopy, DeviceInfo, DeviceCaps, GeneralBarrierInfo, TextureBarrierInfo, BufferBarrierInfo, SwapchainInfo, BindingMappingInfo, Format, FormatFeature, TextureType, TextureUsageBit, - TextureFlagBit, Offset, Extent, SampleCount, TextureSubresLayers, + TextureFlagBit, Offset, Extent, SampleCount, TextureSubresLayers, TextureUsage, TextureFlags, } from './define'; import { Buffer } from './buffer'; import { CommandBuffer } from './command-buffer'; @@ -359,6 +359,17 @@ export abstract class Device { * @param format The GFX format to be queried. */ public enableAutoBarrier (en: boolean): void {} + + /** + * @en Get maximum supported sample count. + * @zh 获取最大可支持的 Samples 参数 + * @param format The GFX texture format. + * @param usage The GFX texture usage. + * @param flags The GFX texture create flags. + */ + public getMaxSampleCount (format: Format, usage: TextureUsage, flags: TextureFlags): SampleCount { + return SampleCount.X1; + } } export class DefaultResource { @@ -377,7 +388,8 @@ export class DefaultResource { TextureType.TEX2D, TextureUsageBit.STORAGE | TextureUsageBit.SAMPLED, Format.RGBA8, - 2, 2, + 2, + 2, TextureFlagBit.NONE, )); const copyRegion = new BufferTextureCopy(0, 0, 0, new Offset(0, 0, 0), new Extent(2, 2, 1)); @@ -388,7 +400,8 @@ export class DefaultResource { TextureType.CUBE, TextureUsageBit.STORAGE | TextureUsageBit.SAMPLED, Format.RGBA8, - 2, 2, + 2, + 2, TextureFlagBit.NONE, 6, )); @@ -410,10 +423,12 @@ export class DefaultResource { TextureType.TEX3D, TextureUsageBit.STORAGE | TextureUsageBit.SAMPLED, Format.RGBA8, - 2, 2, + 2, + 2, TextureFlagBit.NONE, - 1, 1, - SampleCount.ONE, + 1, + 1, + SampleCount.X1, 2, )); const copyRegion = new BufferTextureCopy(0, 0, 0, new Offset(0, 0, 0), new Extent(2, 2, 2), new TextureSubresLayers(0, 0, 1)); @@ -424,7 +439,8 @@ export class DefaultResource { TextureType.TEX2D_ARRAY, TextureUsageBit.STORAGE | TextureUsageBit.SAMPLED, Format.RGBA8, - 2, 2, + 2, + 2, TextureFlagBit.NONE, 2, )); diff --git a/cocos/gfx/webgl/webgl-commands.ts b/cocos/gfx/webgl/webgl-commands.ts index 9c4f73c093c..f64ea3cc4ea 100644 --- a/cocos/gfx/webgl/webgl-commands.ts +++ b/cocos/gfx/webgl/webgl-commands.ts @@ -179,7 +179,7 @@ export function GFXFormatToWebGLInternalFormat (format: Format, gl: WebGLRenderi case Format.DEPTH_STENCIL: return gl.DEPTH_STENCIL; default: { - console.error('Unsupported Format, convert to WebGL internal format failed.'); + error('Unsupported Format, convert to WebGL internal format failed.'); return gl.RGBA; } } @@ -261,7 +261,7 @@ export function GFXFormatToWebGLFormat (format: Format, gl: WebGLRenderingContex case Format.ASTC_SRGBA_12X12: return WebGLEXT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR; default: { - console.error('Unsupported Format, convert to WebGL format failed.'); + error('Unsupported Format, convert to WebGL format failed.'); return gl.RGBA; } } @@ -288,7 +288,7 @@ function GFXTypeToWebGLType (type: Type, gl: WebGLRenderingContext): GLenum { case Type.SAMPLER2D: return gl.SAMPLER_2D; case Type.SAMPLER_CUBE: return gl.SAMPLER_CUBE; default: { - console.error('Unsupported GLType, convert to GL type failed.'); + error('Unsupported GLType, convert to GL type failed.'); return Type.UNKNOWN; } } @@ -315,7 +315,7 @@ function GFXTypeToTypedArrayCtor (type: Type): Int32ArrayConstructor | Float32Ar case Type.MAT4: return Float32Array; default: { - console.error('Unsupported GLType, convert to TypedArrayConstructor failed.'); + error('Unsupported GLType, convert to TypedArrayConstructor failed.'); return Float32Array; } } @@ -342,13 +342,13 @@ function WebGLTypeToGFXType (glType: GLenum, gl: WebGLRenderingContext): Type { case gl.SAMPLER_2D: return Type.SAMPLER2D; case gl.SAMPLER_CUBE: return Type.SAMPLER_CUBE; default: { - console.error('Unsupported GLType, convert to Type failed.'); + error('Unsupported GLType, convert to Type failed.'); return Type.UNKNOWN; } } } -function WebGLGetTypeSize (glType: GLenum, gl: WebGLRenderingContext): Type { +function WebGLGetTypeSize (glType: GLenum, gl: WebGLRenderingContext): number { switch (glType) { case gl.BOOL: return 4; case gl.BOOL_VEC2: return 8; @@ -369,13 +369,13 @@ function WebGLGetTypeSize (glType: GLenum, gl: WebGLRenderingContext): Type { case gl.SAMPLER_2D: return 4; case gl.SAMPLER_CUBE: return 4; default: { - console.error('Unsupported GLType, get type failed.'); + error('Unsupported GLType, get type failed.'); return 0; } } } -function WebGLGetComponentCount (glType: GLenum, gl: WebGLRenderingContext): Type { +function WebGLGetComponentCount (glType: GLenum, gl: WebGLRenderingContext): number { switch (glType) { case gl.FLOAT_MAT2: return 2; case gl.FLOAT_MAT3: return 3; @@ -665,7 +665,7 @@ export function WebGLCmdFuncCreateBuffer (device: WebGLDevice, gpuBuffer: IWebGL } else if (gpuBuffer.usage & BufferUsageBit.TRANSFER_SRC) { gpuBuffer.glTarget = gl.NONE; } else { - console.error('Unsupported BufferType, create buffer failed.'); + error('Unsupported BufferType, create buffer failed.'); gpuBuffer.glTarget = gl.NONE; } } @@ -764,13 +764,18 @@ export function WebGLCmdFuncResizeBuffer (device: WebGLDevice, gpuBuffer: IWebGL || (gpuBuffer.usage & BufferUsageBit.TRANSFER_SRC)) { gpuBuffer.glTarget = gl.NONE; } else { - console.error('Unsupported BufferType, create buffer failed.'); + error('Unsupported BufferType, create buffer failed.'); gpuBuffer.glTarget = gl.NONE; } } -export function WebGLCmdFuncUpdateBuffer (device: WebGLDevice, gpuBuffer: IWebGLGPUBuffer, buffer: Readonly, - offset: number, size: number): void { +export function WebGLCmdFuncUpdateBuffer ( + device: WebGLDevice, + gpuBuffer: IWebGLGPUBuffer, + buffer: Readonly, + offset: number, + size: number, +): void { if (gpuBuffer.usage & BufferUsageBit.UNIFORM) { if (ArrayBuffer.isView(buffer)) { gpuBuffer.vf32!.set(buffer as Float32Array, offset / Float32Array.BYTES_PER_ELEMENT); @@ -820,7 +825,7 @@ export function WebGLCmdFuncUpdateBuffer (device: WebGLDevice, gpuBuffer: IWebGL break; } default: { - console.error('Unsupported BufferType, update buffer failed.'); + error('Unsupported BufferType, update buffer failed.'); return; } } @@ -940,8 +945,17 @@ export function WebGLCmdFuncCreateTexture (device: WebGLDevice, gpuTexture: IWeb w = gpuTexture.width; h = gpuTexture.height; for (let i = 0; i < gpuTexture.mipLevel; ++i) { - gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, i, gpuTexture.glInternalFmt, w, h, 0, - gpuTexture.glFormat, gpuTexture.glType, null); + gl.texImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + i, + gpuTexture.glInternalFmt, + w, + h, + 0, + gpuTexture.glFormat, + gpuTexture.glType, + null, + ); w = Math.max(1, w >> 1); h = Math.max(1, h >> 1); } @@ -967,7 +981,7 @@ export function WebGLCmdFuncCreateTexture (device: WebGLDevice, gpuTexture: IWeb break; } default: { - console.error('Unsupported TextureType, create texture failed.'); + error('Unsupported TextureType, create texture failed.'); gpuTexture.type = TextureType.TEX2D; gpuTexture.glTarget = gl.TEXTURE_2D; } @@ -1084,8 +1098,17 @@ export function WebGLCmdFuncResizeTexture (device: WebGLDevice, gpuTexture: IWeb w = gpuTexture.width; h = gpuTexture.height; for (let i = 0; i < gpuTexture.mipLevel; ++i) { - gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, i, gpuTexture.glInternalFmt, w, h, - 0, gpuTexture.glFormat, gpuTexture.glType, null); + gl.texImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + i, + gpuTexture.glInternalFmt, + w, + h, + 0, + gpuTexture.glFormat, + gpuTexture.glType, + null, + ); w = Math.max(1, w >> 1); h = Math.max(1, h >> 1); } @@ -1094,7 +1117,7 @@ export function WebGLCmdFuncResizeTexture (device: WebGLDevice, gpuTexture: IWeb break; } default: { - console.error('Unsupported TextureType, create texture failed.'); + error('Unsupported TextureType, create texture failed.'); gpuTexture.type = TextureType.TEX2D; gpuTexture.glTarget = gl.TEXTURE_2D; } @@ -1178,19 +1201,19 @@ export function WebGLCmdFuncCreateFramebuffer (device: WebGLDevice, gpuFramebuff if (status !== gl.FRAMEBUFFER_COMPLETE) { switch (status) { case gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_ATTACHMENT'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_ATTACHMENT'); break; } case gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT'); break; } case gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_DIMENSIONS'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_DIMENSIONS'); break; } case gl.FRAMEBUFFER_UNSUPPORTED: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_UNSUPPORTED'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_UNSUPPORTED'); break; } default: @@ -1236,7 +1259,7 @@ export function WebGLCmdFuncCreateShader (device: WebGLDevice, gpuShader: IWebGL break; } default: { - console.error('Unsupported ShaderType.'); + error('Unsupported ShaderType.'); return; } } @@ -1248,9 +1271,9 @@ export function WebGLCmdFuncCreateShader (device: WebGLDevice, gpuShader: IWebGL gl.compileShader(gpuStage.glShader); if (!gl.getShaderParameter(gpuStage.glShader, gl.COMPILE_STATUS)) { - console.error(`${shaderTypeStr} in '${gpuShader.name}' compilation failed.`); - console.error('Shader source dump:', gpuStage.source.replace(/^|\n/g, (): string => `\n${lineNumber++} `)); - console.error(gl.getShaderInfoLog(gpuStage.glShader)); + error(`${shaderTypeStr} in '${gpuShader.name}' compilation failed.`); + error('Shader source dump:', gpuStage.source.replace(/^|\n/g, (): string => `\n${lineNumber++} `)); + error(gl.getShaderInfoLog(gpuStage.glShader)); for (let l = 0; l < gpuShader.gpuStages.length; l++) { const stage = gpuShader.gpuStages[k]; @@ -1294,13 +1317,13 @@ export function WebGLCmdFuncCreateShader (device: WebGLDevice, gpuShader: IWebGL if (gl.getProgramParameter(gpuShader.glProgram, gl.LINK_STATUS)) { debug(`Shader '${gpuShader.name}' compilation succeeded.`); } else { - console.error(`Failed to link shader '${gpuShader.name}'.`); - console.error(gl.getProgramInfoLog(gpuShader.glProgram)); + error(`Failed to link shader '${gpuShader.name}'.`); + error(gl.getProgramInfoLog(gpuShader.glProgram)); return; } // parse inputs - const activeAttribCount = gl.getProgramParameter(gpuShader.glProgram, gl.ACTIVE_ATTRIBUTES); + const activeAttribCount: number = gl.getProgramParameter(gpuShader.glProgram, gl.ACTIVE_ATTRIBUTES); gpuShader.glInputs = new Array(activeAttribCount); for (let i = 0; i < activeAttribCount; ++i) { @@ -1375,9 +1398,9 @@ export function WebGLCmdFuncCreateShader (device: WebGLDevice, gpuShader: IWebGL // WebGL doesn't support Framebuffer Fetch for (let i = 0; i < gpuShader.subpassInputs.length; ++i) { const subpassInput = gpuShader.subpassInputs[i]; - gpuShader.samplerTextures.push(new UniformSamplerTexture( - subpassInput.set, subpassInput.binding, subpassInput.name, Type.SAMPLER2D, subpassInput.count, - )); + gpuShader.samplerTextures.push( + new UniformSamplerTexture(subpassInput.set, subpassInput.binding, subpassInput.name, Type.SAMPLER2D, subpassInput.count), + ); } // create uniform sampler textures @@ -2575,24 +2598,38 @@ export function WebGLCmdFuncDraw (device: WebGLDevice, drawInfo: Readonly 0) { const offset = drawInfo.firstIndex * indexBuffer.stride; - ia.drawElementsInstancedANGLE(glPrimitive, drawInfo.indexCount, - gpuInputAssembler.glIndexType, offset, drawInfo.instanceCount); + ia.drawElementsInstancedANGLE( + glPrimitive, + drawInfo.indexCount, + gpuInputAssembler.glIndexType, + offset, + drawInfo.instanceCount, + ); } } else if (drawInfo.vertexCount > 0) { ia.drawArraysInstancedANGLE(glPrimitive, drawInfo.firstVertex, drawInfo.vertexCount, drawInfo.instanceCount); @@ -2652,8 +2703,15 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLDevice, cmdPackage: WebGLC switch (cmd) { case WebGLCmd.BEGIN_RENDER_PASS: { const cmd0 = cmdPackage.beginRenderPassCmds.array[cmdId]; - WebGLCmdFuncBeginRenderPass(device, cmd0.gpuRenderPass, cmd0.gpuFramebuffer, cmd0.renderArea, - cmd0.clearColors, cmd0.clearDepth, cmd0.clearStencil); + WebGLCmdFuncBeginRenderPass( + device, + cmd0.gpuRenderPass, + cmd0.gpuFramebuffer, + cmd0.renderArea, + cmd0.clearColors, + cmd0.clearDepth, + cmd0.clearStencil, + ); break; } /* @@ -2665,8 +2723,14 @@ export function WebGLCmdFuncExecuteCmds (device: WebGLDevice, cmdPackage: WebGLC */ case WebGLCmd.BIND_STATES: { const cmd2 = cmdPackage.bindStatesCmds.array[cmdId]; - WebGLCmdFuncBindStates(device, cmd2.gpuPipelineState, cmd2.gpuInputAssembler, - cmd2.gpuDescriptorSets, cmd2.dynamicOffsets, cmd2.dynamicStates); + WebGLCmdFuncBindStates( + device, + cmd2.gpuPipelineState, + cmd2.gpuInputAssembler, + cmd2.gpuDescriptorSets, + cmd2.dynamicOffsets, + cmd2.dynamicStates, + ); break; } case WebGLCmd.DRAW: { @@ -2715,9 +2779,15 @@ export function WebGLCmdFuncCopyTexImagesToTexture ( for (let i = 0; i < regions.length; i++) { const region = regions[i]; // console.debug('Copying image to texture 2D: ' + region.texExtent.width + ' x ' + region.texExtent.height); - gl.texSubImage2D(gl.TEXTURE_2D, region.texSubres.mipLevel, - region.texOffset.x, region.texOffset.y, - gpuTexture.glFormat, gpuTexture.glType, texImages[n++]); + gl.texSubImage2D( + gl.TEXTURE_2D, + region.texSubres.mipLevel, + region.texOffset.x, + region.texOffset.y, + gpuTexture.glFormat, + gpuTexture.glType, + texImages[n++], + ); } break; } @@ -2727,15 +2797,21 @@ export function WebGLCmdFuncCopyTexImagesToTexture ( // console.debug('Copying image to texture cube: ' + region.texExtent.width + ' x ' + region.texExtent.height); const fcount = region.texSubres.baseArrayLayer + region.texSubres.layerCount; for (f = region.texSubres.baseArrayLayer; f < fcount; ++f) { - gl.texSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, region.texSubres.mipLevel, - region.texOffset.x, region.texOffset.y, - gpuTexture.glFormat, gpuTexture.glType, texImages[n++]); + gl.texSubImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + region.texSubres.mipLevel, + region.texOffset.x, + region.texOffset.y, + gpuTexture.glFormat, + gpuTexture.glType, + texImages[n++], + ); } } break; } default: { - console.error('Unsupported GL texture type, copy buffer to texture failed.'); + error('Unsupported GL texture type, copy buffer to texture failed.'); } } @@ -2746,11 +2822,13 @@ export function WebGLCmdFuncCopyTexImagesToTexture ( } let stagingBuffer = new Uint8Array(1); -function pixelBufferPick (buffer: ArrayBufferView, +function pixelBufferPick ( + buffer: ArrayBufferView, format: Format, offset: number, stride: Extent, - extent: Extent): ArrayBufferView { + extent: Extent, +): ArrayBufferView { const blockHeight = formatAlignment(format).height; const bufferSize = FormatSize(format, extent.width, extent.height, extent.depth); @@ -2835,22 +2913,38 @@ export function WebGLCmdFuncCopyBuffersToTexture ( } if (!isCompressed) { - gl.texSubImage2D(gl.TEXTURE_2D, mipLevel, - offset.x, offset.y, - destWidth, destHeight, - gpuTexture.glFormat, gpuTexture.glType, - pixels); - } else if (gpuTexture.glInternalFmt !== WebGLEXT.COMPRESSED_RGB_ETC1_WEBGL && !device.extensions.noCompressedTexSubImage2D) { - gl.compressedTexSubImage2D(gl.TEXTURE_2D, mipLevel, - offset.x, offset.y, - destWidth, destHeight, + gl.texSubImage2D( + gl.TEXTURE_2D, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, gpuTexture.glFormat, - pixels); + gpuTexture.glType, + pixels, + ); + } else if (gpuTexture.glInternalFmt !== (WebGLEXT.COMPRESSED_RGB_ETC1_WEBGL as number) && !device.extensions.noCompressedTexSubImage2D) { + gl.compressedTexSubImage2D( + gl.TEXTURE_2D, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, + gpuTexture.glFormat, + pixels, + ); } else { // WEBGL_compressed_texture_etc1 - gl.compressedTexImage2D(gl.TEXTURE_2D, mipLevel, + gl.compressedTexImage2D( + gl.TEXTURE_2D, + mipLevel, gpuTexture.glInternalFmt, - destWidth, destHeight, 0, - pixels); + destWidth, + destHeight, + 0, + pixels, + ); } } break; @@ -2884,29 +2978,46 @@ export function WebGLCmdFuncCopyBuffersToTexture ( } if (!isCompressed) { - gl.texSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, mipLevel, - offset.x, offset.y, - destWidth, destHeight, - gpuTexture.glFormat, gpuTexture.glType, - pixels); - } else if (gpuTexture.glInternalFmt !== WebGLEXT.COMPRESSED_RGB_ETC1_WEBGL && !device.extensions.noCompressedTexSubImage2D) { - gl.compressedTexSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, mipLevel, - offset.x, offset.y, - destWidth, destHeight, + gl.texSubImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, + gpuTexture.glFormat, + gpuTexture.glType, + pixels, + ); + } else if (gpuTexture.glInternalFmt !== (WebGLEXT.COMPRESSED_RGB_ETC1_WEBGL as number) + && !device.extensions.noCompressedTexSubImage2D) { + gl.compressedTexSubImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, gpuTexture.glFormat, - pixels); + pixels, + ); } else { // WEBGL_compressed_texture_etc1 - gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, mipLevel, + gl.compressedTexImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + mipLevel, gpuTexture.glInternalFmt, - destWidth, destHeight, 0, - pixels); + destWidth, + destHeight, + 0, + pixels, + ); } } } break; } default: { - console.error('Unsupported GL texture type, copy buffer to texture failed.'); + error('Unsupported GL texture type, copy buffer to texture failed.'); } } @@ -2945,7 +3056,7 @@ export function WebGLCmdFuncCopyTextureToBuffers ( break; } default: { - console.error('Unsupported GL texture type, copy texture to buffers failed.'); + error('Unsupported GL texture type, copy texture to buffers failed.'); } } gl.bindFramebuffer(gl.FRAMEBUFFER, null); @@ -2953,8 +3064,13 @@ export function WebGLCmdFuncCopyTextureToBuffers ( gl.deleteFramebuffer(framebuffer); } -export function WebGLCmdFuncBlitTexture (device: WebGLDevice, - srcTexture: Readonly, dstTexture: IWebGLGPUTexture, regions: Readonly, filter: Filter): void { +export function WebGLCmdFuncBlitTexture ( + device: WebGLDevice, + srcTexture: Readonly, + dstTexture: IWebGLGPUTexture, + regions: Readonly, + filter: Filter, +): void { // logic different from native, because framebuffer map is not implemented in webgl device.blitManager.draw(srcTexture, dstTexture, regions as TextureBlit[], filter); } diff --git a/cocos/gfx/webgl2/webgl2-commands.ts b/cocos/gfx/webgl2/webgl2-commands.ts index 136a6eebfd7..80f4caab35c 100644 --- a/cocos/gfx/webgl2/webgl2-commands.ts +++ b/cocos/gfx/webgl2/webgl2-commands.ts @@ -304,7 +304,7 @@ export function GFXFormatToWebGLInternalFormat (format: Format, gl: WebGL2Render case Format.ASTC_SRGBA_12X12: return WebGL2EXT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR; default: { - console.error('Unsupported Format, convert to WebGL internal format failed.'); + error('Unsupported Format, convert to WebGL internal format failed.'); return gl.RGBA; } } @@ -423,7 +423,7 @@ export function GFXFormatToWebGLFormat (format: Format, gl: WebGL2RenderingConte case Format.ASTC_SRGBA_12X12: return WebGL2EXT.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR; default: { - console.error('Unsupported Format, convert to WebGL format failed.'); + error('Unsupported Format, convert to WebGL format failed.'); return gl.RGBA; } } @@ -458,7 +458,7 @@ function GFXTypeToWebGLType (type: Type, gl: WebGL2RenderingContext): GLenum { case Type.SAMPLER3D: return gl.SAMPLER_3D; case Type.SAMPLER_CUBE: return gl.SAMPLER_CUBE; default: { - console.error('Unsupported GLType, convert to GL type failed.'); + error('Unsupported GLType, convert to GL type failed.'); return Type.UNKNOWN; } } @@ -496,13 +496,13 @@ function WebGLTypeToGFXType (glType: GLenum, gl: WebGL2RenderingContext): Type { case gl.SAMPLER_3D: return Type.SAMPLER3D; case gl.SAMPLER_CUBE: return Type.SAMPLER_CUBE; default: { - console.error('Unsupported GLType, convert to Type failed.'); + error('Unsupported GLType, convert to Type failed.'); return Type.UNKNOWN; } } } -function WebGLGetTypeSize (glType: GLenum, gl: WebGL2RenderingContext): Type { +function WebGLGetTypeSize (glType: GLenum, gl: WebGL2RenderingContext): number { switch (glType) { case gl.BOOL: return 4; case gl.BOOL_VEC2: return 8; @@ -543,7 +543,7 @@ function WebGLGetTypeSize (glType: GLenum, gl: WebGL2RenderingContext): Type { case gl.UNSIGNED_INT_SAMPLER_3D: return 4; case gl.UNSIGNED_INT_SAMPLER_CUBE: return 4; default: { - console.error('Unsupported GLType, get type failed.'); + error('Unsupported GLType, get type failed.'); return 0; } } @@ -855,7 +855,7 @@ export function WebGL2CmdFuncCreateBuffer (device: WebGL2Device, gpuBuffer: IWeb } else if (gpuBuffer.usage & BufferUsageBit.TRANSFER_SRC) { gpuBuffer.glTarget = gl.NONE; } else { - console.error('Unsupported BufferType, create buffer failed.'); + error('Unsupported BufferType, create buffer failed.'); gpuBuffer.glTarget = gl.NONE; } } @@ -962,13 +962,18 @@ export function WebGL2CmdFuncResizeBuffer (device: WebGL2Device, gpuBuffer: IWeb || (gpuBuffer.usage & BufferUsageBit.TRANSFER_SRC)) { gpuBuffer.glTarget = gl.NONE; } else { - console.error('Unsupported BufferType, create buffer failed.'); + error('Unsupported BufferType, create buffer failed.'); gpuBuffer.glTarget = gl.NONE; } } -export function WebGL2CmdFuncUpdateBuffer (device: WebGL2Device, gpuBuffer: IWebGL2GPUBuffer, buffer: Readonly, - offset: number, size: number): void { +export function WebGL2CmdFuncUpdateBuffer ( + device: WebGL2Device, + gpuBuffer: IWebGL2GPUBuffer, + buffer: Readonly, + offset: number, + size: number, +): void { if (gpuBuffer.usage & BufferUsageBit.INDIRECT) { gpuBuffer.indirects.clearDraws(); const drawInfos = (buffer as IndirectBuffer).drawInfos; @@ -1037,7 +1042,7 @@ export function WebGL2CmdFuncUpdateBuffer (device: WebGL2Device, gpuBuffer: IWeb break; } default: { - console.error('Unsupported BufferType, update buffer failed.'); + error('Unsupported BufferType, update buffer failed.'); } } } @@ -1064,7 +1069,7 @@ export function WebGL2CmdFuncCreateTexture (device: WebGL2Device, gpuTexture: IW errorID(9100, maxSize, device.capabilities.maxTextureSize); } - if (gpuTexture.samples === SampleCount.ONE) { + if (gpuTexture.samples === SampleCount.X1) { gpuTexture.glTexture = gl.createTexture(); if (gpuTexture.size > 0) { const glTexUnit = device.stateCache.glTexUnits[device.stateCache.texUnit]; @@ -1094,8 +1099,13 @@ export function WebGL2CmdFuncCreateTexture (device: WebGL2Device, gpuTexture: IW device.stateCache.glRenderbuffer = gpuTexture.glRenderbuffer; } - gl.renderbufferStorageMultisample(gl.RENDERBUFFER, gpuTexture.samples, - gpuTexture.glInternalFmt, gpuTexture.width, gpuTexture.height); + gl.renderbufferStorageMultisample( + gl.RENDERBUFFER, + gpuTexture.samples, + gpuTexture.glInternalFmt, + gpuTexture.width, + gpuTexture.height, + ); } } break; @@ -1199,7 +1209,7 @@ export function WebGL2CmdFuncCreateTexture (device: WebGL2Device, gpuTexture: IW break; } default: { - console.error('Unsupported TextureType, create texture failed.'); + error('Unsupported TextureType, create texture failed.'); gpuTexture.type = TextureType.TEX2D; gpuTexture.glTarget = gl.TEXTURE_2D; } @@ -1254,7 +1264,7 @@ export function WebGL2CmdFuncResizeTexture (device: WebGL2Device, gpuTexture: IW errorID(9100, maxSize, device.capabilities.maxTextureSize); } - if (gpuTexture.samples === SampleCount.ONE) { + if (gpuTexture.samples === SampleCount.X1) { const glTexUnit = device.stateCache.glTexUnits[device.stateCache.texUnit]; if (glTexUnit.glTexture !== gpuTexture.glTexture) { @@ -1281,8 +1291,13 @@ export function WebGL2CmdFuncResizeTexture (device: WebGL2Device, gpuTexture: IW device.stateCache.glRenderbuffer = gpuTexture.glRenderbuffer; } - gl.renderbufferStorageMultisample(gl.RENDERBUFFER, gpuTexture.samples, - gpuTexture.glInternalFmt, gpuTexture.width, gpuTexture.height); + gl.renderbufferStorageMultisample( + gl.RENDERBUFFER, + gpuTexture.samples, + gpuTexture.glInternalFmt, + gpuTexture.width, + gpuTexture.height, + ); } break; } @@ -1387,7 +1402,7 @@ export function WebGL2CmdFuncResizeTexture (device: WebGL2Device, gpuTexture: IW break; } default: { - console.error('Unsupported TextureType, create texture failed.'); + error('Unsupported TextureType, create texture failed.'); gpuTexture.type = TextureType.TEX2D; gpuTexture.glTarget = gl.TEXTURE_2D; } @@ -1521,19 +1536,19 @@ export function WebGL2CmdFuncCreateFramebuffer (device: WebGL2Device, gpuFramebu if (status !== gl.FRAMEBUFFER_COMPLETE) { switch (status) { case gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_ATTACHMENT'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_ATTACHMENT'); break; } case gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT'); break; } case gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_DIMENSIONS'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_DIMENSIONS'); break; } case gl.FRAMEBUFFER_UNSUPPORTED: { - console.error('glCheckFramebufferStatus() - FRAMEBUFFER_UNSUPPORTED'); + error('glCheckFramebufferStatus() - FRAMEBUFFER_UNSUPPORTED'); break; } default: @@ -1579,7 +1594,7 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb break; } default: { - console.error('Unsupported ShaderType.'); + error('Unsupported ShaderType.'); return; } } @@ -1591,9 +1606,9 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb gl.compileShader(gpuStage.glShader); if (!gl.getShaderParameter(gpuStage.glShader, gl.COMPILE_STATUS)) { - console.error(`${shaderTypeStr} in '${gpuShader.name}' compilation failed.`); - console.error('Shader source dump:', gpuStage.source.replace(/^|\n/g, (): string => `\n${lineNumber++} `)); - console.error(gl.getShaderInfoLog(gpuStage.glShader)); + error(`${shaderTypeStr} in '${gpuShader.name}' compilation failed.`); + error('Shader source dump:', gpuStage.source.replace(/^|\n/g, (): string => `\n${lineNumber++} `)); + error(gl.getShaderInfoLog(gpuStage.glShader)); for (let l = 0; l < gpuShader.gpuStages.length; l++) { const stage = gpuShader.gpuStages[k]; @@ -1637,13 +1652,13 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb if (gl.getProgramParameter(gpuShader.glProgram, gl.LINK_STATUS)) { debug(`Shader '${gpuShader.name}' compilation succeeded.`); } else { - console.error(`Failed to link shader '${gpuShader.name}'.`); - console.error(gl.getProgramInfoLog(gpuShader.glProgram)); + error(`Failed to link shader '${gpuShader.name}'.`); + error(gl.getProgramInfoLog(gpuShader.glProgram)); return; } // parse inputs - const activeAttribCount = gl.getProgramParameter(gpuShader.glProgram, gl.ACTIVE_ATTRIBUTES); + const activeAttribCount: number = gl.getProgramParameter(gpuShader.glProgram, gl.ACTIVE_ATTRIBUTES); gpuShader.glInputs = new Array(activeAttribCount); for (let i = 0; i < activeAttribCount; ++i) { @@ -1675,7 +1690,7 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb } // create uniform blocks - const activeBlockCount = gl.getProgramParameter(gpuShader.glProgram, gl.ACTIVE_UNIFORM_BLOCKS); + const activeBlockCount: number = gl.getProgramParameter(gpuShader.glProgram, gl.ACTIVE_UNIFORM_BLOCKS); let blockName: string; let blockIdx: number; let blockSize: number; @@ -1728,9 +1743,9 @@ export function WebGL2CmdFuncCreateShader (device: WebGL2Device, gpuShader: IWeb // WebGL doesn't support Framebuffer Fetch for (let i = 0; i < gpuShader.subpassInputs.length; ++i) { const subpassInput = gpuShader.subpassInputs[i]; - gpuShader.samplerTextures.push(new UniformSamplerTexture( - subpassInput.set, subpassInput.binding, subpassInput.name, Type.SAMPLER2D, subpassInput.count, - )); + gpuShader.samplerTextures.push( + new UniformSamplerTexture(subpassInput.set, subpassInput.binding, subpassInput.name, Type.SAMPLER2D, subpassInput.count), + ); } // create uniform sampler textures @@ -2372,8 +2387,13 @@ export function WebGL2CmdFuncBindStates ( if (cache.glBindUBOs[glBlock.glBinding] !== gpuDescriptor.gpuBuffer.glBuffer || cache.glBindUBOOffsets[glBlock.glBinding] !== offset) { if (offset) { - gl.bindBufferRange(gl.UNIFORM_BUFFER, glBlock.glBinding, gpuDescriptor.gpuBuffer.glBuffer, - offset, gpuDescriptor.gpuBuffer.size); + gl.bindBufferRange( + gl.UNIFORM_BUFFER, + glBlock.glBinding, + gpuDescriptor.gpuBuffer.glBuffer, + offset, + gpuDescriptor.gpuBuffer.size, + ); } else { gl.bindBufferBase(gl.UNIFORM_BUFFER, glBlock.glBinding, gpuDescriptor.gpuBuffer.glBuffer); } @@ -2637,24 +2657,38 @@ export function WebGL2CmdFuncDraw (device: WebGL2Device, drawInfo: Readonly 0) { const offset = drawInfo.firstIndex * indexBuffer.stride; - gl.drawElementsInstanced(glPrimitive, drawInfo.indexCount, - gpuInputAssembler.glIndexType, offset, drawInfo.instanceCount); + gl.drawElementsInstanced( + glPrimitive, + drawInfo.indexCount, + gpuInputAssembler.glIndexType, + offset, + drawInfo.instanceCount, + ); } } else if (drawInfo.vertexCount > 0) { gl.drawArraysInstanced(glPrimitive, drawInfo.firstVertex, drawInfo.vertexCount, drawInfo.instanceCount); @@ -2714,8 +2762,15 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2Device, cmdPackage: WebG switch (cmd) { case WebGL2Cmd.BEGIN_RENDER_PASS: { const cmd0 = cmdPackage.beginRenderPassCmds.array[cmdId]; - WebGL2CmdFuncBeginRenderPass(device, cmd0.gpuRenderPass, cmd0.gpuFramebuffer, cmd0.renderArea, - cmd0.clearColors, cmd0.clearDepth, cmd0.clearStencil); + WebGL2CmdFuncBeginRenderPass( + device, + cmd0.gpuRenderPass, + cmd0.gpuFramebuffer, + cmd0.renderArea, + cmd0.clearColors, + cmd0.clearDepth, + cmd0.clearStencil, + ); break; } /* @@ -2727,8 +2782,14 @@ export function WebGL2CmdFuncExecuteCmds (device: WebGL2Device, cmdPackage: WebG */ case WebGL2Cmd.BIND_STATES: { const cmd2 = cmdPackage.bindStatesCmds.array[cmdId]; - WebGL2CmdFuncBindStates(device, cmd2.gpuPipelineState, cmd2.gpuInputAssembler, - cmd2.gpuDescriptorSets, cmd2.dynamicOffsets, cmd2.dynamicStates); + WebGL2CmdFuncBindStates( + device, + cmd2.gpuPipelineState, + cmd2.gpuInputAssembler, + cmd2.gpuDescriptorSets, + cmd2.dynamicOffsets, + cmd2.dynamicStates, + ); break; } case WebGL2Cmd.DRAW: { @@ -2789,14 +2850,29 @@ export function WebGL2CmdFuncCopyTexImagesToTexture ( switch (gpuTexture.glTarget) { case gl.TEXTURE_2D: { if (toUseTexImage2D(texImages, regions)) { - gl.texImage2D(gl.TEXTURE_2D, regions[0].texSubres.mipLevel, gpuTexture.glInternalFmt, regions[0].texExtent.width, - regions[0].texExtent.height, 0, gpuTexture.glFormat, gpuTexture.glType, texImages[0]); + gl.texImage2D( + gl.TEXTURE_2D, + regions[0].texSubres.mipLevel, + gpuTexture.glInternalFmt, + regions[0].texExtent.width, + regions[0].texExtent.height, + 0, + gpuTexture.glFormat, + gpuTexture.glType, + texImages[0], + ); } else { for (let k = 0; k < regions.length; k++) { const region = regions[k]; - gl.texSubImage2D(gl.TEXTURE_2D, region.texSubres.mipLevel, - region.texOffset.x, region.texOffset.y, - gpuTexture.glFormat, gpuTexture.glType, texImages[n++]); + gl.texSubImage2D( + gl.TEXTURE_2D, + region.texSubres.mipLevel, + region.texOffset.x, + region.texOffset.y, + gpuTexture.glFormat, + gpuTexture.glType, + texImages[n++], + ); } } break; @@ -2806,15 +2882,21 @@ export function WebGL2CmdFuncCopyTexImagesToTexture ( const region = regions[k]; const fcount = region.texSubres.baseArrayLayer + region.texSubres.layerCount; for (f = region.texSubres.baseArrayLayer; f < fcount; ++f) { - gl.texSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, region.texSubres.mipLevel, - region.texOffset.x, region.texOffset.y, - gpuTexture.glFormat, gpuTexture.glType, texImages[n++]); + gl.texSubImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + region.texSubres.mipLevel, + region.texOffset.x, + region.texOffset.y, + gpuTexture.glFormat, + gpuTexture.glType, + texImages[n++], + ); } } break; } default: { - console.error('Unsupported GL texture type, copy buffer to texture failed.'); + error('Unsupported GL texture type, copy buffer to texture failed.'); } } @@ -2824,11 +2906,13 @@ export function WebGL2CmdFuncCopyTexImagesToTexture ( } let stagingBuffer = new Uint8Array(1); -function pixelBufferPick (buffer: ArrayBufferView, +function pixelBufferPick ( + buffer: ArrayBufferView, format: Format, offset: number, stride: Extent, - extent: Extent): ArrayBufferView { + extent: Extent, +): ArrayBufferView { const blockHeight = formatAlignment(format).height; const bufferSize = FormatSize(format, extent.width, extent.height, extent.depth); @@ -2913,22 +2997,38 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( } if (!isCompressed) { - gl.texSubImage2D(gl.TEXTURE_2D, mipLevel, - offset.x, offset.y, - destWidth, destHeight, - gpuTexture.glFormat, gpuTexture.glType, - pixels); - } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL) { - gl.compressedTexSubImage2D(gl.TEXTURE_2D, mipLevel, - offset.x, offset.y, - destWidth, destHeight, + gl.texSubImage2D( + gl.TEXTURE_2D, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, + gpuTexture.glFormat, + gpuTexture.glType, + pixels, + ); + } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) { + gl.compressedTexSubImage2D( + gl.TEXTURE_2D, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, gpuTexture.glFormat, - pixels); + pixels, + ); } else { // WEBGL_compressed_texture_etc1 - gl.compressedTexImage2D(gl.TEXTURE_2D, mipLevel, + gl.compressedTexImage2D( + gl.TEXTURE_2D, + mipLevel, gpuTexture.glInternalFmt, - destWidth, destHeight, 0, - pixels); + destWidth, + destHeight, + 0, + pixels, + ); } } break; @@ -2965,22 +3065,43 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( } if (!isCompressed) { - gl.texSubImage3D(gl.TEXTURE_2D_ARRAY, mipLevel, - offset.x, offset.y, offset.z, - destWidth, destHeight, extent.depth, - gpuTexture.glFormat, gpuTexture.glType, - pixels); - } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL) { - gl.compressedTexSubImage3D(gl.TEXTURE_2D_ARRAY, mipLevel, - offset.x, offset.y, offset.z, - destWidth, destHeight, extent.depth, + gl.texSubImage3D( + gl.TEXTURE_2D_ARRAY, + mipLevel, + offset.x, + offset.y, + offset.z, + destWidth, + destHeight, + extent.depth, gpuTexture.glFormat, - pixels); + gpuTexture.glType, + pixels, + ); + } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) { + gl.compressedTexSubImage3D( + gl.TEXTURE_2D_ARRAY, + mipLevel, + offset.x, + offset.y, + offset.z, + destWidth, + destHeight, + extent.depth, + gpuTexture.glFormat, + pixels, + ); } else { // WEBGL_compressed_texture_etc1 - gl.compressedTexImage3D(gl.TEXTURE_2D_ARRAY, mipLevel, + gl.compressedTexImage3D( + gl.TEXTURE_2D_ARRAY, + mipLevel, gpuTexture.glInternalFmt, - destWidth, destHeight, extent.depth, 0, - pixels); + destWidth, + destHeight, + extent.depth, + 0, + pixels, + ); } } } @@ -3015,22 +3136,43 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( } if (!isCompressed) { - gl.texSubImage3D(gl.TEXTURE_2D_ARRAY, mipLevel, - offset.x, offset.y, offset.z, - destWidth, destHeight, extent.depth, - gpuTexture.glFormat, gpuTexture.glType, - pixels); - } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL) { - gl.compressedTexSubImage3D(gl.TEXTURE_2D_ARRAY, mipLevel, - offset.x, offset.y, offset.z, - destWidth, destHeight, extent.depth, + gl.texSubImage3D( + gl.TEXTURE_2D_ARRAY, + mipLevel, + offset.x, + offset.y, + offset.z, + destWidth, + destHeight, + extent.depth, gpuTexture.glFormat, - pixels); + gpuTexture.glType, + pixels, + ); + } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) { + gl.compressedTexSubImage3D( + gl.TEXTURE_2D_ARRAY, + mipLevel, + offset.x, + offset.y, + offset.z, + destWidth, + destHeight, + extent.depth, + gpuTexture.glFormat, + pixels, + ); } else { // WEBGL_compressed_texture_etc1 - gl.compressedTexImage3D(gl.TEXTURE_2D_ARRAY, mipLevel, + gl.compressedTexImage3D( + gl.TEXTURE_2D_ARRAY, + mipLevel, gpuTexture.glInternalFmt, - destWidth, destHeight, extent.depth, 0, - pixels); + destWidth, + destHeight, + extent.depth, + 0, + pixels, + ); } } break; @@ -3064,29 +3206,45 @@ export function WebGL2CmdFuncCopyBuffersToTexture ( } if (!isCompressed) { - gl.texSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, mipLevel, - offset.x, offset.y, - destWidth, destHeight, - gpuTexture.glFormat, gpuTexture.glType, - pixels); - } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL) { - gl.compressedTexSubImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, mipLevel, - offset.x, offset.y, - destWidth, destHeight, + gl.texSubImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, gpuTexture.glFormat, - pixels); + gpuTexture.glType, + pixels, + ); + } else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) { + gl.compressedTexSubImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + mipLevel, + offset.x, + offset.y, + destWidth, + destHeight, + gpuTexture.glFormat, + pixels, + ); } else { // WEBGL_compressed_texture_etc1 - gl.compressedTexImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, mipLevel, + gl.compressedTexImage2D( + gl.TEXTURE_CUBE_MAP_POSITIVE_X + f, + mipLevel, gpuTexture.glInternalFmt, - destWidth, destHeight, 0, - pixels); + destWidth, + destHeight, + 0, + pixels, + ); } } } break; } default: { - console.error('Unsupported GL texture type, copy buffer to texture failed.'); + error('Unsupported GL texture type, copy buffer to texture failed.'); } } @@ -3125,7 +3283,7 @@ export function WebGL2CmdFuncCopyTextureToBuffers ( break; } default: { - console.error('Unsupported GL texture type, copy texture to buffers failed.'); + error('Unsupported GL texture type, copy texture to buffers failed.'); } } gl.bindFramebuffer(gl.FRAMEBUFFER, null); @@ -3168,9 +3326,16 @@ export function WebGL2CmdFuncBlitFramebuffer ( const glFilter = (filter === Filter.LINEAR || filter === Filter.ANISOTROPIC) ? gl.LINEAR : gl.NEAREST; gl.blitFramebuffer( - srcRect.x, srcRect.y, srcRect.x + srcRect.width, srcRect.y + srcRect.height, - dstRect.x, dstRect.y, dstRect.x + dstRect.width, dstRect.y + dstRect.height, - mask, glFilter, + srcRect.x, + srcRect.y, + srcRect.x + srcRect.width, + srcRect.y + srcRect.height, + dstRect.x, + dstRect.y, + dstRect.x + dstRect.width, + dstRect.y + dstRect.height, + mask, + glFilter, ); if (rebindFBO) { @@ -3205,7 +3370,7 @@ export function WebGL2CmdFuncBlitTexture ( const blitInfo = (formatInfo: FormatInfo): { mask: number; attachment: number; } => { let mask = 0; - let attachment = gl.COLOR_ATTACHMENT0; + let attachment: number = gl.COLOR_ATTACHMENT0; if (formatInfo.hasStencil) { attachment = gl.DEPTH_STENCIL_ATTACHMENT; @@ -3269,9 +3434,16 @@ export function WebGL2CmdFuncBlitTexture ( } gl.blitFramebuffer( - region.srcOffset.x, region.srcOffset.y, region.srcOffset.x + region.srcExtent.width, region.srcOffset.y + region.srcExtent.height, - region.dstOffset.x, region.dstOffset.y, region.dstOffset.x + region.dstExtent.width, region.dstOffset.y + region.dstExtent.height, - srcMask, glFilter, + region.srcOffset.x, + region.srcOffset.y, + region.srcOffset.x + region.srcExtent.width, + region.srcOffset.y + region.srcExtent.height, + region.dstOffset.x, + region.dstOffset.y, + region.dstOffset.x + region.dstExtent.width, + region.dstOffset.y + region.dstExtent.height, + srcMask, + glFilter, ); } diff --git a/cocos/render-scene/core/pass.ts b/cocos/render-scene/core/pass.ts index a1a7c93ca72..4345d8c5003 100644 --- a/cocos/render-scene/core/pass.ts +++ b/cocos/render-scene/core/pass.ts @@ -28,13 +28,15 @@ import { TextureBase } from '../../asset/assets/texture-base'; import { builtinResMgr } from '../../asset/asset-manager/builtin-res-mgr'; import { getPhaseID } from '../../rendering/pass-phase'; import { murmurhash2_32_gc, errorID, assertID, cclegacy, warnID } from '../../core'; -import { BufferUsageBit, DynamicStateFlagBit, DynamicStateFlags, Feature, GetTypeSize, MemoryUsageBit, PrimitiveMode, Type, Color, +import { + BufferUsageBit, DynamicStateFlagBit, DynamicStateFlags, Feature, GetTypeSize, MemoryUsageBit, PrimitiveMode, Type, Color, BlendState, BlendTarget, Buffer, BufferInfo, BufferViewInfo, DepthStencilState, DescriptorSet, DescriptorSetInfo, DescriptorSetLayout, Device, RasterizerState, Sampler, Texture, Shader, PipelineLayout, deviceManager, UniformBlock, } from '../../gfx'; import { EffectAsset } from '../../asset/assets/effect-asset'; import { IProgramInfo, programLib } from './program-lib'; -import { MacroRecord, MaterialProperty, customizeType, getBindingFromHandle, getDefaultFromType, getStringFromType, +import { + MacroRecord, MaterialProperty, customizeType, getBindingFromHandle, getDefaultFromType, getStringFromType, getOffsetFromHandle, getTypeFromHandle, type2reader, type2writer, getCountFromHandle, type2validator, } from './pass-utils'; import { RenderPassStage, RenderPriority } from '../../rendering/define'; @@ -182,7 +184,7 @@ export class Pass { protected _shaderInfo: IProgramInfo = null!; protected _defines: MacroRecord = {}; protected _properties: Record = {}; - protected _shader: Shader | null = null + protected _shader: Shader | null = null; protected _bs: BlendState = new BlendState(); protected _dss: DepthStencilState = new DepthStencilState(); protected _rs: RasterizerState = new RasterizerState(); @@ -190,6 +192,7 @@ export class Pass { protected _stage: RenderPassStage = RenderPassStage.DEFAULT; protected _phase = getPhaseID('default'); protected _passID = 0xFFFFFFFF; + protected _subpassID = 0xFFFFFFFF; protected _phaseID = 0xFFFFFFFF; protected _primitive: PrimitiveMode = PrimitiveMode.TRIANGLE_LIST; protected _batchingScheme: BatchingSchemes = BatchingSchemes.NONE; @@ -488,7 +491,10 @@ export class Pass { if (cclegacy.rendering && cclegacy.rendering.enableEffectImport) { const programLib = cclegacy.rendering.programLib as ProgramLibrary; const program = programLib.getProgramVariant( - this._device, this._phaseID, this._programName, this._defines, + this._device, + this._phaseID, + this._programName, + this._defines, ); if (!program) { warnID(12103, this._programName); @@ -576,11 +582,17 @@ export class Pass { const r = cclegacy.rendering; if (typeof info.phase === 'number') { this._passID = (info as Pass)._passID; + this._subpassID = (info as Pass)._subpassID; this._phaseID = (info as Pass)._phaseID; } else { this._passID = r.getPassID(info.pass); if (this._passID !== r.INVALID_ID) { - this._phaseID = r.getPhaseID(this._passID, info.phase); + if (info.subpass) { + this._subpassID = r.getSubpassID(this._passID, info.subpass); + this._phaseID = r.getPhaseID(this._subpassID, info.phase); + } else { + this._phaseID = r.getPhaseID(this._passID, info.phase); + } } } if (this._passID === r.INVALID_ID) { @@ -683,8 +695,11 @@ export class Pass { const bufferView = this._buffers[binding] = device.createBuffer(_bufferViewInfo); // non-builtin UBO data pools, note that the effect compiler // guarantees these bindings to be consecutive, starting from 0 and non-array-typed - this._blocks[binding] = new Float32Array(this._rootBlock!, _bufferViewInfo.offset, - size / Float32Array.BYTES_PER_ELEMENT); + this._blocks[binding] = new Float32Array( + this._rootBlock!, + _bufferViewInfo.offset, + size / Float32Array.BYTES_PER_ELEMENT, + ); this._blocksInt[binding] = new Int32Array(this._blocks[binding].buffer, this._blocks[binding].byteOffset, this._blocks[binding].length); this._descriptorSet.bindBuffer(binding, bufferView); } @@ -728,8 +743,11 @@ export class Pass { const bufferView = this._buffers[binding] = device.createBuffer(_bufferViewInfo); // non-builtin UBO data pools, note that the effect compiler // guarantees these bindings to be consecutive, starting from 0 and non-array-typed - this._blocks[binding] = new Float32Array(this._rootBlock!, _bufferViewInfo.offset, - size / Float32Array.BYTES_PER_ELEMENT); + this._blocks[binding] = new Float32Array( + this._rootBlock!, + _bufferViewInfo.offset, + size / Float32Array.BYTES_PER_ELEMENT, + ); this._blocksInt[binding] = new Int32Array(this._blocks[binding].buffer, this._blocks[binding].byteOffset, this._blocks[binding].length); this._descriptorSet.bindBuffer(binding, bufferView); } @@ -778,7 +796,7 @@ export class Pass { this._blocks = target._blocks; this._blocksInt = target._blocksInt; - this._dynamics = target._dynamics; + this._dynamics = target._dynamics; this._shader = target._shader; diff --git a/cocos/rendering/custom/executor.ts b/cocos/rendering/custom/executor.ts index 574ffff1ba9..b5492e7a13c 100644 --- a/cocos/rendering/custom/executor.ts +++ b/cocos/rendering/custom/executor.ts @@ -20,7 +20,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -****************************************************************************/ + ****************************************************************************/ /** * ========================= !DO NOT CHANGE THE FOLLOWING SECTION MANUALLY! ========================= @@ -32,9 +32,43 @@ import { getPhaseID, InstancedBuffer, PipelineStateManager } from '..'; import { assert, cclegacy, RecyclePool } from '../../core'; import intersect from '../../core/geometry/intersect'; import { Sphere } from '../../core/geometry/sphere'; -import { AccessFlagBit, Attribute, Buffer, BufferInfo, BufferUsageBit, BufferViewInfo, Color, ColorAttachment, CommandBuffer, DepthStencilAttachment, DescriptorSet, DescriptorSetInfo, Device, deviceManager, Format, Framebuffer, - FramebufferInfo, GeneralBarrierInfo, InputAssemblerInfo, LoadOp, MemoryUsageBit, PipelineState, Rect, RenderPass, RenderPassInfo, Sampler, SamplerInfo, StoreOp, SurfaceTransform, Swapchain, Texture, TextureInfo, - TextureType, TextureUsageBit, Viewport } from '../../gfx'; +import { + AccessFlagBit, + Attribute, + Buffer, + BufferInfo, + BufferUsageBit, + BufferViewInfo, + Color, + ColorAttachment, + CommandBuffer, + DepthStencilAttachment, + DescriptorSet, + DescriptorSetInfo, + Device, + deviceManager, + Format, + Framebuffer, + FramebufferInfo, + GeneralBarrierInfo, + InputAssembler, + InputAssemblerInfo, + LoadOp, + MemoryUsageBit, + PipelineState, + Rect, + RenderPass, + RenderPassInfo, + Shader, + StoreOp, + SurfaceTransform, + Swapchain, + Texture, + TextureInfo, + TextureType, + TextureUsageBit, + Viewport, +} from '../../gfx'; import { legacyCC } from '../../core/global-exports'; import { Vec3 } from '../../core/math/vec3'; import { Vec4 } from '../../core/math/vec4'; @@ -46,11 +80,47 @@ import { IRenderPass, isEnableEffect, SetIndex, UBODeferredLight, UBOForwardLigh import { PipelineSceneData } from '../pipeline-scene-data'; import { PipelineInputAssemblerData } from '../render-pipeline'; import { DescriptorSetData, LayoutGraphData, PipelineLayoutData, RenderPhaseData, RenderStageData } from './layout-graph'; -import { BasicPipeline, SceneVisitor } from './pipeline'; -import { Blit, ClearView, ComputePass, ComputeSubpass, CopyPass, Dispatch, FormatView, ManagedBuffer, ManagedResource, ManagedTexture, MovePass, - RasterPass, RasterSubpass, RaytracePass, RenderData, RenderGraph, RenderGraphVisitor, RenderQueue, RenderSwapchain, ResolvePass, ResourceDesc, - ResourceGraph, ResourceGraphVisitor, ResourceTraits, SceneData, SubresourceView, ComputeView, RasterView } from './render-graph'; -import { AttachmentType, QueueHint, ResourceDimension, ResourceFlags, ResourceResidency, SceneFlags, UpdateFrequency } from './types'; +import { BasicPipeline } from './pipeline'; +import { SceneVisitor } from './scene'; +import { + Blit, + ClearView, + ComputePass, + ComputeSubpass, + ComputeView, + CopyPass, + Dispatch, + FormatView, + ManagedBuffer, + ManagedResource, + ManagedTexture, + MovePass, + RasterPass, + RasterSubpass, + RasterView, + RaytracePass, + RenderData, + RenderGraph, + RenderGraphVisitor, + RenderQueue, + RenderSwapchain, + ResolvePass, + ResourceDesc, + ResourceGraph, + ResourceGraphVisitor, + ResourceTraits, + SceneData, + SubresourceView, +} from './render-graph'; +import { + AttachmentType, + QueueHint, + ResourceDimension, + ResourceFlags, + ResourceResidency, + SceneFlags, + UpdateFrequency, +} from './types'; import { PipelineUBO } from '../pipeline-ubo'; import { RenderInfo, RenderObject, WebSceneTask, WebSceneTransversal } from './web-scene'; import { WebSceneVisitor } from './web-scene-visitor'; @@ -59,7 +129,14 @@ import { RenderShadowMapBatchedQueue } from '../render-shadow-map-batched-queue' import { PlanarShadowQueue } from '../planar-shadow-queue'; import { DefaultVisitor, depthFirstSearch, ReferenceGraphView } from './graph'; import { VectorGraphColorMap } from './effect'; -import { getDescBindingFromName, getDescriptorSetDataFromLayout, getDescriptorSetDataFromLayoutId, getRenderArea, mergeSrcToTargetDesc, updateGlobalDescBinding } from './define'; +import { + getDescBindingFromName, + getDescriptorSetDataFromLayout, + getDescriptorSetDataFromLayoutId, + getRenderArea, + mergeSrcToTargetDesc, + updateGlobalDescBinding, +} from './define'; import { RenderReflectionProbeQueue } from '../render-reflection-probe-queue'; import { builtinResMgr } from '../../asset/asset-manager/builtin-res-mgr'; import { Texture2D } from '../../asset/assets/texture-2d'; @@ -177,6 +254,8 @@ class DeviceTexture extends DeviceResource { if (info.flags & ResourceFlags.INPUT_ATTACHMENT) usageFlags |= TextureUsageBit.INPUT_ATTACHMENT; if (info.flags & ResourceFlags.SAMPLED) usageFlags |= TextureUsageBit.SAMPLED; if (info.flags & ResourceFlags.STORAGE) usageFlags |= TextureUsageBit.STORAGE; + if (info.flags & ResourceFlags.TRANSFER_SRC) usageFlags |= TextureUsageBit.TRANSFER_SRC; + if (info.flags & ResourceFlags.TRANSFER_DST) usageFlags |= TextureUsageBit.TRANSFER_DST; this._texture = context.device.createTexture(new TextureInfo( type, @@ -405,7 +484,7 @@ class DeviceRenderQueue { get renderPhase (): RenderPhaseData | null { return this._renderPhase; } get viewport (): Viewport | null { return this._viewport; } get scissor (): Rect | null { return this._scissor; } - private _sceneVisitor; + private _sceneVisitor!: WebSceneVisitor; private _blitDesc: BlitDesc | null = null; private _queueId = -1; set queueId (val) { this._queueId = val; } @@ -428,8 +507,10 @@ class DeviceRenderQueue { this._devicePass = devicePass; if (isEnableEffect()) this._phaseID = cclegacy.rendering.getPhaseID(devicePass.passID, context.renderGraph.getLayout(id) || 'default'); if (!this._sceneVisitor) { - this._sceneVisitor = new WebSceneVisitor(context.commandBuffer, - context.pipeline.pipelineSceneData); + this._sceneVisitor = new WebSceneVisitor( + context.commandBuffer, + context.pipeline.pipelineSceneData, + ); } } createBlitDesc (blit: Blit): void { @@ -535,7 +616,7 @@ class RenderPassLayoutInfo { protected _layout: PipelineLayoutData; protected _inputName: string; protected _descriptorSet: DescriptorSet | null = null; - constructor (layoutId, input: [string, ComputeView[]]) { + constructor (layoutId: number, input: [string, ComputeView[]]) { this._inputName = input[0]; this._layoutID = layoutId; const lg = context.layoutGraph; @@ -754,9 +835,11 @@ class DeviceRenderPass { // )); // } this._renderPass = device.createRenderPass(new RenderPassInfo(colors, depthStencilAttachment)); - this._framebuffer = framebuffer || device.createFramebuffer(new FramebufferInfo(this._renderPass, + this._framebuffer = framebuffer || device.createFramebuffer(new FramebufferInfo( + this._renderPass, swapchain ? [swapchain.colorTexture] : colorTexs, - swapchain ? swapchain.depthStencilTexture : depthTex)); + swapchain ? swapchain.depthStencilTexture : depthTex, + )); } get layoutName (): string { return this._layoutName; } get passID (): number { return this._passID; } @@ -821,8 +904,13 @@ class DeviceRenderPass { const pass = submodel.passes[0]; const ia = submodel.inputAssembler; const device = context.device; - const pso = PipelineStateManager.getOrCreatePipelineState(device, pass, - submodel.shaders[0], renderPass, ia); + const pso = PipelineStateManager.getOrCreatePipelineState( + device, + pass, + submodel.shaders[0], + renderPass, + ia, + ); const descData = getDescriptorSetDataFromLayoutId(pass.passID)!; mergeSrcToTargetDesc(descData.descriptorSet, context.pipeline.descriptorSet, true); profilerViewport.width = rect.width; @@ -851,10 +939,18 @@ class DeviceRenderPass { renderPassArea.width = tex.width; renderPassArea.height = tex.height; } - cmdBuff.beginRenderPass(this.renderPass, this.framebuffer, renderPassArea, - this.clearColor, this.clearDepth, this.clearStencil); - cmdBuff.bindDescriptorSet(SetIndex.GLOBAL, - context.pipeline.descriptorSet); + cmdBuff.beginRenderPass( + this.renderPass, + this.framebuffer, + renderPassArea, + this.clearColor, + this.clearDepth, + this.clearStencil, + ); + cmdBuff.bindDescriptorSet( + SetIndex.GLOBAL, + context.pipeline.descriptorSet, + ); for (const queue of this._deviceQueues) { queue.record(); } @@ -1014,7 +1110,7 @@ class GraphScene { } this.blit = null; } - init (scene, blit, sceneID): void { + init (scene: SceneData | null, blit: Blit | null, sceneID): void { this._copyScene(scene); this._copyBlit(blit); this.sceneID = sceneID; @@ -1027,8 +1123,12 @@ class DevicePreSceneTask extends WebSceneTask { protected _graphScene: GraphScene; private _cmdBuff: CommandBuffer; constructor (queue: DeviceRenderQueue, graphScene: GraphScene, visitor: SceneVisitor) { - super(context.pipelineSceneData, context.ubo, - graphScene.scene && graphScene.scene.camera ? graphScene.scene.camera : null, visitor); + super( + context.pipelineSceneData, + context.ubo, + graphScene.scene && graphScene.scene.camera ? graphScene.scene.camera : null, + visitor, + ); this._currentQueue = queue; this._graphScene = graphScene; this._renderPass = queue.devicePass.renderPass; @@ -1096,6 +1196,7 @@ class DevicePreSceneTask extends WebSceneTask { const probes = cclegacy.internal.reflectionProbeManager.getProbes(); for (let i = 0; i < probes.length; i++) { if (probes[i].hasFrameBuffer(this._currentQueue.devicePass.framebuffer)) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument this._submitInfo.reflectionProbe.gatherRenderObjects(probes[i], this.camera, this._cmdBuff); break; } @@ -1162,7 +1263,7 @@ class DevicePreSceneTask extends WebSceneTask { protected _insertRenderList (ro: RenderObject, subModelIdx: number, passIdx: number, isTransparent = false): void { const subModel = ro.model.subModels[subModelIdx]; - const pass = subModel.passes[passIdx]; + const pass: Pass = subModel.passes[passIdx]; const shader = subModel.shaders[passIdx]; const currTransparent = pass.blendState.targets[0].blend; const devicePass = this._currentQueue.devicePass; @@ -1172,7 +1273,7 @@ class DevicePreSceneTask extends WebSceneTask { if (currTransparent !== isTransparent || !(pass.phaseID & (isTransparent ? phase : this._currentQueue.phaseID))) { return; } - const hash = (0 << 30) | pass.priority << 16 | subModel.priority << 8 | passIdx; + const hash = (0 << 30) | pass.priority as number << 16 | subModel.priority as number << 8 | passIdx; const rp = context.pools.addPassInfo(); rp.priority = ro.model.priority; rp.hash = hash; @@ -1233,8 +1334,12 @@ class DeviceSceneTask extends WebSceneTask { protected _renderPass: RenderPass; protected _graphScene: GraphScene; constructor (queue: DeviceRenderQueue, graphScene: GraphScene, visitor: SceneVisitor) { - super(context.pipelineSceneData, context.ubo, - graphScene.scene && graphScene.scene.camera ? graphScene.scene.camera : null, visitor); + super( + context.pipelineSceneData, + context.ubo, + graphScene.scene && graphScene.scene.camera ? graphScene.scene.camera : null, + visitor, + ); this._currentQueue = queue; this._renderPass = this._currentQueue.devicePass.renderPass; this._graphScene = graphScene; @@ -1258,14 +1363,20 @@ class DeviceSceneTask extends WebSceneTask { : currSubmitInfo.opaqueList; for (let i = 0; i < renderList.length; ++i) { const { subModel, passIdx } = renderList[i]; - const { inputAssembler } = subModel; - const pass = subModel.passes[passIdx]; - const shader = subModel.shaders[passIdx]; - const pso = PipelineStateManager.getOrCreatePipelineState(deviceManager.gfxDevice, - pass, shader, this._renderPass, inputAssembler); + const inputAssembler: InputAssembler = subModel.inputAssembler; + const pass: Pass = subModel.passes[passIdx]; + const shader: Shader = subModel.shaders[passIdx]; + const descriptorSet: DescriptorSet = subModel.descriptorSet; + const pso = PipelineStateManager.getOrCreatePipelineState( + deviceManager.gfxDevice, + pass, + shader, + this._renderPass, + inputAssembler, + ); this.visitor.bindPipelineState(pso); this.visitor.bindDescriptorSet(SetIndex.MATERIAL, pass.descriptorSet); - this.visitor.bindDescriptorSet(SetIndex.LOCAL, subModel.descriptorSet); + this.visitor.bindDescriptorSet(SetIndex.LOCAL, descriptorSet); this.visitor.bindInputAssembler(inputAssembler); this.visitor.draw(inputAssembler); } @@ -1289,13 +1400,18 @@ class DeviceSceneTask extends WebSceneTask { const instance = instances[b]; if (!instance.count) { continue; } const shader = instance.shader!; - const pso = PipelineStateManager.getOrCreatePipelineState(deviceManager.gfxDevice, pass, - shader, this._renderPass, instance.ia); + const pso = PipelineStateManager.getOrCreatePipelineState( + deviceManager.gfxDevice, + pass, + shader, + this._renderPass, + instance.ia, + ); if (lastPSO !== pso) { this.visitor.bindPipelineState(pso); lastPSO = pso; } - const ia: any = instance.ia; + const ia: InputAssembler = instance.ia; this.visitor.bindDescriptorSet(SetIndex.LOCAL, instance.descriptorSet, res.value.dynamicOffsets); this.visitor.bindInputAssembler(ia); this.visitor.draw(ia); @@ -1320,7 +1436,7 @@ class DeviceSceneTask extends WebSceneTask { const pass = batch.passes[j]; if (((isEnableEffect()) ? pass.phaseID : pass.phase) !== this._currentQueue.phaseID) continue; const shader = batch.shaders[j]; - const inputAssembler: any = batch.inputAssembler!; + const inputAssembler: InputAssembler = batch.inputAssembler!; const pso = PipelineStateManager.getOrCreatePipelineState(deviceManager.gfxDevice, pass, shader, this._renderPass, inputAssembler); this.visitor.bindPipelineState(pso); this.visitor.bindDescriptorSet(SetIndex.MATERIAL, pass.descriptorSet); @@ -1337,14 +1453,22 @@ class DeviceSceneTask extends WebSceneTask { protected _recordShadowMap (): void { const submitMap = context.submitMap; const currSubmitInfo = submitMap.get(this.camera!)!.get(this._currentQueue.phaseID)!; - currSubmitInfo.shadowMap.get(this.graphScene.sceneID)!.recordCommandBuffer(context.device, - this._renderPass, context.commandBuffer); + currSubmitInfo.shadowMap.get(this.graphScene.sceneID)!.recordCommandBuffer( + context.device, + this._renderPass, + + context.commandBuffer, + ); } protected _recordReflectionProbe (): void { const submitMap = context.submitMap; const currSubmitInfo = submitMap.get(this.camera!)!.get(this._currentQueue.phaseID)!; - currSubmitInfo.reflectionProbe?.recordCommandBuffer(context.device, - this._renderPass, context.commandBuffer); + currSubmitInfo.reflectionProbe?.recordCommandBuffer( + context.device, + this._renderPass, + + context.commandBuffer, + ); } private _clearExtBlitDesc (desc, extResId: number[]): void { @@ -1371,12 +1495,17 @@ class DeviceSceneTask extends WebSceneTask { pass.update(); const shader = pass.getShaderVariant(); const devicePass = this._currentQueue.devicePass; - const screenIa: any = this._currentQueue.blitDesc!.screenQuad!.quadIA; + const screenIa: InputAssembler = this._currentQueue.blitDesc!.screenQuad!.quadIA!; const globalDesc = context.pipeline.descriptorSet; - let pso; + let pso: PipelineState | null = null; if (pass !== null && shader !== null && screenIa !== null) { - pso = PipelineStateManager.getOrCreatePipelineState(context.device, pass, shader, - devicePass.renderPass, screenIa); + pso = PipelineStateManager.getOrCreatePipelineState( + context.device, + pass, + shader, + devicePass.renderPass, + screenIa, + ); } if (pso) { this.visitor.bindPipelineState(pso); @@ -1397,18 +1526,22 @@ class DeviceSceneTask extends WebSceneTask { const devicePass = this._currentQueue.devicePass; const submitMap = context.submitMap; const currSubmitInfo = submitMap.get(this.camera!)!.get(this._currentQueue.phaseID)!; - currSubmitInfo.additiveLight?.recordCommandBuffer(context.device, + currSubmitInfo.additiveLight?.recordCommandBuffer( + context.device, this._renderPass, - context.commandBuffer); + context.commandBuffer, + ); } private _recordPlanarShadows (): void { const devicePass = this._currentQueue.devicePass; const submitMap = context.submitMap; const currSubmitInfo = submitMap.get(this.camera!)!.get(this._currentQueue.phaseID)!; - currSubmitInfo.planarQueue?.recordCommandBuffer(context.device, + currSubmitInfo.planarQueue?.recordCommandBuffer( + context.device, this._renderPass, - context.commandBuffer); + context.commandBuffer, + ); } protected _updateGlobal (data: RenderData): void { const devicePass = this._currentQueue.devicePass; @@ -1495,8 +1628,10 @@ class DeviceSceneTask extends WebSceneTask { if (graphSceneData.flags & SceneFlags.DEFAULT_LIGHTING) { this._recordAdditiveLights(); } - this.visitor.bindDescriptorSet(SetIndex.GLOBAL, - context.pipeline.descriptorSet); + this.visitor.bindDescriptorSet( + SetIndex.GLOBAL, + context.pipeline.descriptorSet, + ); if (graphSceneData.flags & SceneFlags.PLANAR_SHADOW) { this._recordPlanarShadows(); } @@ -1504,8 +1639,12 @@ class DeviceSceneTask extends WebSceneTask { this._recordTransparentList(); } if (graphSceneData.flags & SceneFlags.GEOMETRY) { - this.camera!.geometryRenderer?.render(devicePass.renderPass, - context.commandBuffer, context.pipeline.pipelineSceneData); + this.camera!.geometryRenderer?.render( + devicePass.renderPass, + context.commandBuffer, + + context.pipeline.pipelineSceneData, + ); } if (graphSceneData.flags & SceneFlags.UI) { this._recordUI(); @@ -1692,7 +1831,7 @@ class BlitInfo { const vbStride = Float32Array.BYTES_PER_ELEMENT * 4; const vbSize = vbStride * 4; const device = cclegacy.director.root.device; - const quadVB = device.createBuffer(new BufferInfo( + const quadVB: Buffer = device.createBuffer(new BufferInfo( BufferUsageBit.VERTEX | BufferUsageBit.TRANSFER_DST, MemoryUsageBit.DEVICE | MemoryUsageBit.HOST, vbSize, @@ -1707,7 +1846,7 @@ class BlitInfo { const ibStride = Uint8Array.BYTES_PER_ELEMENT; const ibSize = ibStride * 6; - const quadIB = device.createBuffer(new BufferInfo( + const quadIB: Buffer = device.createBuffer(new BufferInfo( BufferUsageBit.INDEX | BufferUsageBit.TRANSFER_DST, MemoryUsageBit.DEVICE, ibSize, @@ -1744,14 +1883,16 @@ class BlitInfo { } class ExecutorContext { - constructor (pipeline: BasicPipeline, + constructor ( + pipeline: BasicPipeline, ubo: PipelineUBO, device: Device, resourceGraph: ResourceGraph, renderGraph: RenderGraph, layoutGraph: LayoutGraphData, width: number, - height: number) { + height: number, + ) { this.pipeline = pipeline; this.device = device; this.commandBuffer = device.commandBuffer; @@ -1804,12 +1945,15 @@ class ExecutorContext { } export class Executor { - constructor (pipeline: BasicPipeline, + constructor ( + pipeline: BasicPipeline, ubo: PipelineUBO, device: Device, resourceGraph: ResourceGraph, layoutGraph: LayoutGraphData, - width: number, height: number) { + width: number, + height: number, + ) { context = this._context = new ExecutorContext( pipeline, ubo, diff --git a/cocos/rendering/custom/index.jsb.ts b/cocos/rendering/custom/index.jsb.ts index ce9a0e531f6..7aa8b0d0a23 100644 --- a/cocos/rendering/custom/index.jsb.ts +++ b/cocos/rendering/custom/index.jsb.ts @@ -25,7 +25,7 @@ declare const render: any; import { Pipeline, PipelineBuilder, RenderingModule } from './pipeline'; -import { DeferredPipelineBuilder, ForwardPipelineBuilder } from './builtin-pipelines'; +import { DeferredPipelineBuilder } from './builtin-pipelines'; import { CustomPipelineBuilder, TestPipelineBuilder } from './custom-pipeline'; import { Device } from '../../gfx'; import { PostProcessBuilder } from '../post-process/post-process-builder'; @@ -92,11 +92,15 @@ export function getPassID (name: string | undefined): number { return _renderModule.getPassID(name); } +export function getSubpassID (passID: number, name: string): number { + return _renderModule.getSubpassID(passID, name); +} + export function getPhaseID (passID: number, name: string | number | undefined): number { if (name === undefined) { return _renderModule.getPhaseID(passID, 'default'); } - if (typeof(name) === 'number') { + if (typeof (name) === 'number') { return _renderModule.getPhaseID(passID, name.toString()); } return _renderModule.getPhaseID(passID, name); diff --git a/cocos/rendering/custom/index.ts b/cocos/rendering/custom/index.ts index cfbd706696e..ab1c8fa240a 100644 --- a/cocos/rendering/custom/index.ts +++ b/cocos/rendering/custom/index.ts @@ -32,7 +32,7 @@ import { LayoutGraphData, loadLayoutGraphData } from './layout-graph'; import { BinaryInputArchive } from './binary-archive'; import { WebProgramLibrary } from './web-program-library'; import { Device } from '../../gfx'; -import { initializeLayoutGraphData, terminateLayoutGraphData, getCustomPassID, getCustomPhaseID } from './layout-graph-utils'; +import { initializeLayoutGraphData, terminateLayoutGraphData, getCustomPassID, getCustomPhaseID, getCustomSubpassID } from './layout-graph-utils'; import { ProgramLibrary } from './private'; import { PostProcessBuilder } from '../post-process/post-process-builder'; @@ -101,6 +101,10 @@ export function getPassID (name: string | undefined): number { return getCustomPassID(defaultLayoutGraph, name); } +export function getSubpassID (passID: number, name: string): number { + return getCustomSubpassID(defaultLayoutGraph, passID, name); +} + export function getPhaseID (passID: number, name: string | number | undefined): number { return getCustomPhaseID(defaultLayoutGraph, passID, name); } diff --git a/cocos/rendering/custom/pipeline.ts b/cocos/rendering/custom/pipeline.ts index 7bdabfe1981..c679c5796dd 100644 --- a/cocos/rendering/custom/pipeline.ts +++ b/cocos/rendering/custom/pipeline.ts @@ -30,15 +30,17 @@ /* eslint-disable max-len */ import { Material } from '../../asset/assets'; import { Camera } from '../../render-scene/scene/camera'; +import { DirectionalLight } from '../../render-scene/scene/directional-light'; import { GeometryRenderer } from '../geometry-renderer'; -import { Buffer, BufferInfo, ClearFlagBit, Color, CommandBuffer, DescriptorSet, DescriptorSetLayout, Device, DrawInfo, Format, InputAssembler, LoadOp, PipelineState, Rect, ResolveMode, Sampler, ShaderStageFlagBit, StoreOp, Swapchain, Texture, TextureInfo, Viewport } from '../../gfx'; +import { Buffer, BufferInfo, ClearFlagBit, Color, CommandBuffer, DescriptorSet, DescriptorSetLayout, Device, Format, LoadOp, ResolveMode, SampleCount, Sampler, ShaderStageFlagBit, StoreOp, Swapchain, Texture, TextureInfo, Viewport } from '../../gfx'; import { GlobalDSManager } from '../global-descriptor-set-manager'; import { Mat4, Quat, Vec2, Vec4 } from '../../core/math'; import { MacroRecord } from '../../render-scene/core/pass-utils'; import { PipelineSceneData } from '../pipeline-scene-data'; -import { AccessType, CopyPair, LightInfo, MovePair, QueueHint, ResolvePair, ResourceResidency, SceneFlags, TaskType, UpdateFrequency, UploadPair } from './types'; +import { AccessType, CopyPair, LightInfo, MovePair, QueueHint, ResolvePair, ResourceDimension, ResourceFlags, ResourceResidency, SceneFlags, UpdateFrequency, UploadPair } from './types'; import { RenderWindow } from '../../render-scene/core/render-window'; -import { Model } from '../../render-scene/scene'; +import { Light, Model } from '../../render-scene/scene'; +import { SpotLight } from '../../render-scene/scene/spot-light'; /** * @engineInternal @@ -249,6 +251,11 @@ export enum SubpassCapabilities { * @zh 支持读取当前像素任意颜色值 */ INPUT_COLOR_MRT = 1 << 2, + /** + * @en Each subpass has its own sample count. + * @zh 每个Subpass拥有不同的采样数 + */ + HETEROGENEOUS_SAMPLE_COUNT = 1 << 3, } /** @@ -368,6 +375,10 @@ export interface Setter extends RenderNode { * @param name @en descriptor name in shader. @zh 填写着色器中的描述符(descriptor)名字 */ setSampler (name: string, sampler: Sampler): void; + setBuiltinCameraConstants (camera: Camera): void; + setBuiltinShadowMapConstants (light: DirectionalLight): void; + setBuiltinDirectionalLightViewConstants (light: DirectionalLight, level?: number): void; + setBuiltinSpotLightViewConstants (light: SpotLight): void; } /** @@ -391,6 +402,16 @@ export interface RenderQueueBuilder extends Setter { camera: Camera, light: LightInfo, sceneFlags?: SceneFlags): void; + addScene (camera: Camera, sceneFlags: SceneFlags): void; + addSceneCulledByDirectionalLight ( + camera: Camera, + sceneFlags: SceneFlags, + light: DirectionalLight, + level: number): void; + addSceneCulledBySpotLight ( + camera: Camera, + sceneFlags: SceneFlags, + light: SpotLight): void; /** * @en Render a full-screen quad. * @zh 渲染全屏四边形 @@ -528,6 +549,15 @@ export interface BasicRenderPassBuilder extends Setter { showStatistics: boolean; } +export interface BasicMultisampleRenderPassBuilder extends BasicRenderPassBuilder { + resolveRenderTarget (source: string, target: string): void; + resolveDepthStencil ( + source: string, + target: string, + depthMode?: ResolveMode, + stencilMode?: ResolveMode): void; +} + /** * @en BasicPipeline * Basic pipeline provides basic rendering features which are supported on all platforms. @@ -643,6 +673,27 @@ export interface BasicPipeline extends PipelineRuntime { width: number, height: number, format?: Format): void; + addResource ( + name: string, + dimension: ResourceDimension, + format: Format, + width: number, + height: number, + depth: number, + arraySize: number, + mipLevels: number, + sampleCount: SampleCount, + flags: ResourceFlags, + residency: ResourceResidency): number; + updateResource ( + name: string, + format: Format, + width: number, + height: number, + depth: number, + arraySize: number, + mipLevels: number, + sampleCount: SampleCount): void; /** * @engineInternal * @en Begin rendering one frame @@ -690,7 +741,7 @@ export interface BasicPipeline extends PipelineRuntime { height: number, count: number, quality: number, - passName?: string): BasicRenderPassBuilder; + passName?: string): BasicMultisampleRenderPassBuilder; /** * @deprecated Method will be removed in 3.9.0 */ @@ -1054,6 +1105,17 @@ export interface RenderPassBuilder extends BasicRenderPassBuilder { setCustomShaderStages (name: string, stageFlags: ShaderStageFlagBit): void; } +export interface MultisampleRenderPassBuilder extends BasicMultisampleRenderPassBuilder { + addStorageBuffer ( + name: string, + accessType: AccessType, + slotName: string): void; + addStorageImage ( + name: string, + accessType: AccessType, + slotName: string): void; +} + /** * @en Compute pass * @zh 计算通道 @@ -1133,38 +1195,6 @@ export interface ComputePassBuilder extends Setter { setCustomShaderStages (name: string, stageFlags: ShaderStageFlagBit): void; } -/** - * @deprecated @en Not used @zh 未使用 - */ -export interface SceneVisitor { - readonly pipelineSceneData: PipelineSceneData; - setViewport (vp: Viewport): void; - setScissor (rect: Rect): void; - bindPipelineState (pso: PipelineState): void; - bindInputAssembler (ia: InputAssembler): void; - draw (info: DrawInfo): void; - - bindDescriptorSet (set: number, descriptorSet: DescriptorSet, dynamicOffsets?: number[]): void; - updateBuffer (buffer: Buffer, data: ArrayBuffer, size?: number): void; -} - -/** - * @deprecated @en Not used @zh 未使用 - */ -export interface SceneTask { - readonly taskType: TaskType; - start (): void; - join (): void; - submit (): void; -} - -/** - * @deprecated @en Not used @zh 未使用 - */ -export interface SceneTransversal { - transverse (visitor: SceneVisitor): SceneTask; -} - /** * @en Render pipeline. * @zh 渲染管线 @@ -1259,6 +1289,12 @@ export interface Pipeline extends BasicPipeline { width: number, height: number, passName: string): RenderPassBuilder; + addMultisampleRenderPass ( + width: number, + height: number, + count: number, + quality: number, + passName: string): MultisampleRenderPassBuilder; /** * @en Add compute pass * @zh 添加计算通道 @@ -1308,6 +1344,11 @@ export interface Pipeline extends BasicPipeline { * @param movePairs @en Array of move source and target @zh 移动来源与目标的数组 */ addMovePass (movePairs: MovePair[]): void; + addBuiltinGpuCullingPass ( + camera: Camera, + hzbName?: string, + light?: Light | null): void; + addBuiltinHzbGenerationPass (sourceDepthStencilName: string, targetHzbName: string): void; /** * @experimental */ diff --git a/cocos/rendering/custom/render-graph.ts b/cocos/rendering/custom/render-graph.ts index afbb675ef8d..41078871395 100644 --- a/cocos/rendering/custom/render-graph.ts +++ b/cocos/rendering/custom/render-graph.ts @@ -114,7 +114,7 @@ export class ResourceDesc { depthOrArraySize = 0; mipLevels = 0; format: Format = Format.UNKNOWN; - sampleCount: SampleCount = SampleCount.ONE; + sampleCount: SampleCount = SampleCount.X1; textureFlags: TextureFlagBit = TextureFlagBit.NONE; flags: ResourceFlags = ResourceFlags.NONE; } @@ -164,6 +164,7 @@ export class ManagedResource { export class Subpass { readonly rasterViews: Map = new Map(); readonly computeViews: Map = new Map(); + readonly resolvePairs: ResolvePair[] = []; } //================================================================= @@ -171,8 +172,6 @@ export class Subpass { //================================================================= // Graph Concept export class SubpassGraphVertex { - constructor () { - } readonly _outEdges: OutE[] = []; readonly _inEdges: OutE[] = []; } @@ -1656,6 +1655,7 @@ export class RenderGraph implements BidirectionalGraph clear (): void { // Members this.index.clear(); + this.sortedVertices.length = 0; // ComponentGraph this._names.length = 0; this._layoutNodes.length = 0; @@ -2267,4 +2267,5 @@ export class RenderGraph implements BidirectionalGraph readonly _data: RenderData[] = []; readonly _valid: boolean[] = []; readonly index: Map = new Map(); + readonly sortedVertices: number[] = []; } diff --git a/cocos/rendering/custom/scene.ts b/cocos/rendering/custom/scene.ts new file mode 100644 index 00000000000..d46cf08a273 --- /dev/null +++ b/cocos/rendering/custom/scene.ts @@ -0,0 +1,34 @@ +import { + Buffer, + DescriptorSet, + DrawInfo, + InputAssembler, + PipelineState, + Rect, + Viewport, +} from '../../gfx'; +import { PipelineSceneData } from '../pipeline-scene-data'; +import { TaskType } from './types'; + +export interface SceneVisitor { + readonly pipelineSceneData: PipelineSceneData; + setViewport (vp: Viewport): void; + setScissor (rect: Rect): void; + bindPipelineState (pso: PipelineState): void; + bindInputAssembler (ia: InputAssembler): void; + draw (info: DrawInfo | InputAssembler): void; + + bindDescriptorSet (set: number, descriptorSet: DescriptorSet, dynamicOffsets?: number[]): void; + updateBuffer (buffer: Buffer, data: ArrayBuffer, size?: number): void; +} + +export interface SceneTask { + readonly taskType: TaskType; + start (): void; + join (): void; + submit (): void; +} + +export interface SceneTransversal { + transverse (visitor: SceneVisitor): SceneTask; +} diff --git a/cocos/rendering/custom/types.ts b/cocos/rendering/custom/types.ts index c964335b4ff..d09e3b8a9fe 100644 --- a/cocos/rendering/custom/types.ts +++ b/cocos/rendering/custom/types.ts @@ -168,6 +168,8 @@ export enum ResourceFlags { DEPTH_STENCIL_ATTACHMENT = 0x20, INPUT_ATTACHMENT = 0x40, SHADING_RATE = 0x80, + TRANSFER_SRC = 0x100, + TRANSFER_DST = 0x200, } export enum TaskType { @@ -205,6 +207,7 @@ export enum SceneFlags { DRAW_INSTANCING = 0x800, DRAW_NON_INSTANCING = 0x1000, REFLECTION_PROBE = 0x2000, + GPU_DRIVEN = 0x4000, ALL = 0xFFFFFFFF, } diff --git a/cocos/rendering/custom/web-pipeline.ts b/cocos/rendering/custom/web-pipeline.ts index ec05c6e9ee2..c1bac8ca455 100644 --- a/cocos/rendering/custom/web-pipeline.ts +++ b/cocos/rendering/custom/web-pipeline.ts @@ -25,11 +25,11 @@ /* eslint-disable max-len */ import { systemInfo } from 'pal/system-info'; import { DEBUG } from 'internal:constants'; -import { Color, Buffer, DescriptorSetLayout, Device, Feature, Format, FormatFeatureBit, Sampler, Swapchain, Texture, ClearFlagBit, DescriptorSet, deviceManager, Viewport, API, CommandBuffer, Type, SamplerInfo, Filter, Address, DescriptorSetInfo, LoadOp, StoreOp, ShaderStageFlagBit, BufferInfo, TextureInfo, UniformBlock } from '../../gfx'; -import { Mat4, Quat, toRadian, Vec2, Vec3, Vec4, assert, macro, cclegacy } from '../../core'; +import { Buffer, DescriptorSetLayout, Device, Feature, Format, FormatFeatureBit, Sampler, Swapchain, Texture, ClearFlagBit, DescriptorSet, deviceManager, Viewport, API, CommandBuffer, Type, SamplerInfo, Filter, Address, DescriptorSetInfo, LoadOp, StoreOp, ShaderStageFlagBit, BufferInfo, TextureInfo, UniformBlock, ResolveMode, SampleCount, Color } from '../../gfx'; +import { Mat4, Quat, toRadian, Vec2, Vec3, Vec4, assert, macro, cclegacy, IVec4Like, IMat4Like, IVec2Like, Color as CoreColor } from '../../core'; import { AccessType, AttachmentType, CopyPair, LightInfo, LightingMode, MovePair, QueueHint, ResolvePair, ResourceDimension, ResourceFlags, ResourceResidency, SceneFlags, UpdateFrequency } from './types'; import { ComputeView, RasterView, Blit, ClearView, ComputePass, CopyPass, Dispatch, ManagedBuffer, ManagedResource, MovePass, RasterPass, RasterSubpass, RenderData, RenderGraph, RenderGraphComponent, RenderGraphValue, RenderQueue, RenderSwapchain, ResourceDesc, ResourceGraph, ResourceGraphValue, ResourceStates, ResourceTraits, SceneData, Subpass } from './render-graph'; -import { ComputePassBuilder, ComputeQueueBuilder, ComputeSubpassBuilder, BasicPipeline, PipelineBuilder, RenderPassBuilder, RenderQueueBuilder, RenderSubpassBuilder, PipelineType, BasicRenderPassBuilder, PipelineCapabilities } from './pipeline'; +import { ComputePassBuilder, ComputeQueueBuilder, ComputeSubpassBuilder, BasicPipeline, PipelineBuilder, RenderPassBuilder, RenderQueueBuilder, RenderSubpassBuilder, PipelineType, BasicRenderPassBuilder, PipelineCapabilities, BasicMultisampleRenderPassBuilder } from './pipeline'; import { PipelineSceneData } from '../pipeline-scene-data'; import { Model, Camera, ShadowType, CSMLevel, DirectionalLight, SpotLight, PCFType, Shadows } from '../../render-scene/scene'; import { Light, LightType } from '../../render-scene/scene/light'; @@ -54,6 +54,9 @@ import { getUBOTypeCount } from './utils'; import { initGlobalDescBinding } from './define'; import { createGfxDescriptorSetsAndPipelines } from './layout-graph-utils'; import { Root } from '../../root'; +import { CSMLayers, CSMShadowLayer } from '../shadow/csm-layers'; +import { Scene } from '../../scene-graph'; +import { Director } from '../../game'; const _uboVec = new Vec4(); const _uboVec3 = new Vec3(); @@ -75,32 +78,34 @@ export class WebSetter { this._lg = lg; } - protected _copyToBuffer (target: any, offset: number, type: Type): void { + protected _copyToBuffer (target: IVec4Like | Quat | IVec2Like | IMat4Like | number, offset: number, type: Type): void { assert(offset !== -1); const arr = this.getCurrConstant(); switch (type) { case Type.FLOAT4: - Vec4.toArray(arr, target, offset); + Vec4.toArray(arr, target as IVec4Like, offset); break; case Type.MAT4: - Mat4.toArray(arr, target, offset); + Mat4.toArray(arr, target as IMat4Like, offset); break; case Type.FLOAT: - arr[offset] = target; + arr[offset] = target as number; break; case Type.SAMPLER2D: break; case Type.TEXTURE2D: break; - case Type.FLOAT2: - arr[offset + 0] = target.x; - arr[offset + 1] = target.y; + case Type.FLOAT2: { + const vec2Val = target as IVec2Like; + arr[offset + 0] = vec2Val.x; + arr[offset + 1] = vec2Val.y; + } break; default: } } - protected _applyCurrConstantBuffer (name: string, target: any, type: Type, idx = 0): void { + protected _applyCurrConstantBuffer (name: string, target: IVec4Like | Quat | IVec2Like | IMat4Like | number, type: Type, idx = 0): void { const offset = this.getUniformOffset(name, type, idx); this._copyToBuffer(target, offset, type); } @@ -189,7 +194,7 @@ export class WebSetter { this._currCount += getUBOTypeCount(uniform.type) * uniform.count; } if (!this._data.constants.get(num)) { - const value = new Array(this._currCount); + const value: number[] = new Array(this._currCount); value.fill(0); this._data.constants.set(num, value); } @@ -211,7 +216,7 @@ export class WebSetter { public setColor (name: string, color: Color, idx = 0): void { this._applyCurrConstantBuffer(name, color, Type.FLOAT4, idx); } - public offsetColor (color: Color, offset: number): void { + public offsetColor (color: Color | CoreColor, offset: number): void { this._copyToBuffer(color, offset, Type.FLOAT4); } public setVec4 (name: string, vec: Vec4, idx = 0): void { @@ -249,18 +254,18 @@ export class WebSetter { const num = this._lg.attributeIndex.get(name)!; this._data.samplers.set(num, sampler); } - // public setCameraConstants (camera: Camera): void { + public setBuiltinCameraConstants (camera: Camera): void { - // } - // public setDirectionalLightProjectionConstants (light: DirectionalLight): void { + } + public setBuiltinShadowMapConstants (light: Light, numLevels?: number): void { - // } - // public setSpotLightProjectionConstants (light: SpotLight): void { + } + public setBuiltinDirectionalLightViewConstants (light: DirectionalLight): void { - // } - // public setShadowMapConstants (light: Light, numLevels?: number): void { + } + public setBuiltinSpotLightViewConstants (light: SpotLight): void { - // } + } public hasSampler (name: string): boolean { const id = this._lg.attributeIndex.get(name); if (id === undefined) { @@ -283,16 +288,18 @@ export class WebSetter { protected _data: RenderData; protected _lg: LayoutGraphData; protected _currBlock; - protected _currStage; + protected _currStage: string = ''; protected _currCount; protected _currConstant: number[] = []; } -function setShadowUBOLightView (setter: WebSetter, +function setShadowUBOLightView ( + setter: WebSetter, camera: Camera, light: Light, level: number, - layout = 'default'): void { + layout = 'default', +): void { const director = cclegacy.director; const pipeline = (director.root as Root).pipeline; const device = pipeline.device; @@ -319,9 +326,9 @@ function setShadowUBOLightView (setter: WebSetter, if (shadowInfo.type === ShadowType.ShadowMap) { let near = 0.1; let far = 0; - let matShadowView; - let matShadowProj; - let matShadowViewProj; + let matShadowView: Mat4; + let matShadowProj: Mat4; + let matShadowViewProj: Mat4; let levelCount = 0; if (mainLight.shadowFixedArea || mainLight.csmLevel === CSMLevel.LEVEL_1) { matShadowView = csmLayers.specialLayer.matShadowView; @@ -394,12 +401,21 @@ function setShadowUBOLightView (setter: WebSetter, const matViewOffset = setter.getUniformOffset('cc_matLightView', Type.MAT4); const matViewProOffset = setter.getUniformOffset('cc_matLightViewProj', Type.MAT4); if (setter.hasUniform(matViewOffset) || setter.hasUniform(matViewProOffset)) { - Mat4.invert(_matView, (light as any).node.getWorldMatrix()); + Mat4.invert(_matView, spotLight.node!.getWorldMatrix()); } if (setter.hasUniform(matViewOffset)) setter.offsetMat4(_matView, matViewOffset); if (setter.hasUniform(matViewProOffset)) { - Mat4.perspective(_mulMatView, (light as any).angle, 1.0, 0.001, (light as any).range, - true, cap.clipSpaceMinZ, cap.clipSpaceSignY, 0); + Mat4.perspective( + _mulMatView, + spotLight.angle, + 1.0, + 0.001, + spotLight.range, + true, + cap.clipSpaceMinZ, + cap.clipSpaceSignY, + 0, + ); Mat4.multiply(_matView, _mulMatView, _matView); setter.offsetMat4(_matView, matViewProOffset); } @@ -449,12 +465,12 @@ function getPCFRadius (shadowInfo: Shadows, mainLight: DirectionalLight): number function setShadowUBOView (setter: WebSetter, camera: Camera | null, layout = 'default'): void { const director = cclegacy.director; const pipeline = director.root.pipeline; - const device = pipeline.device; + const device: Device = pipeline.device; const scene = director.getScene(); - const mainLight = camera && camera.scene ? camera.scene.mainLight : scene ? scene.renderScene.mainLight : null; + const mainLight: DirectionalLight = camera && camera.scene ? camera.scene.mainLight : scene ? scene.renderScene.mainLight : null; const sceneData = pipeline.pipelineSceneData; - const shadowInfo = sceneData.shadows; - const csmLayers = sceneData.csmLayers; + const shadowInfo: Shadows = sceneData.shadows; + const csmLayers: CSMLayers = sceneData.csmLayers; const csmSupported = sceneData.csmSupported; const packing = supportsR32FloatTexture(device) ? 0.0 : 1.0; const hasCCShadow = setter.addConstant('CCShadow', layout); @@ -465,11 +481,11 @@ function setShadowUBOView (setter: WebSetter, camera: Camera | null, layout = 'd if (mainLight.shadowFixedArea || mainLight.csmLevel === CSMLevel.LEVEL_1 || !csmSupported) { if (hasCCShadow) { setter.setCurrConstant('CCShadow', layout); - const matShadowView = csmLayers.specialLayer.matShadowView; - const matShadowProj = csmLayers.specialLayer.matShadowProj; - const matShadowViewProj = csmLayers.specialLayer.matShadowViewProj; - const near = mainLight.shadowNear; - const far = mainLight.shadowFar; + const matShadowView: Mat4 = csmLayers.specialLayer.matShadowView; + const matShadowProj: Mat4 = csmLayers.specialLayer.matShadowProj; + const matShadowViewProj: Mat4 = csmLayers.specialLayer.matShadowViewProj; + const near: number = mainLight.shadowNear; + const far: number = mainLight.shadowFar; uniformOffset = setter.getUniformOffset('cc_matLightView', Type.MAT4); if (setter.hasUniform(uniformOffset)) { setter.offsetMat4(matShadowView, uniformOffset); @@ -504,8 +520,8 @@ function setShadowUBOView (setter: WebSetter, camera: Camera | null, layout = 'd const layerThreshold = getPCFRadius(shadowInfo, mainLight); setter.setCurrConstant('CCCSM', layout); for (let i = 0; i < mainLight.csmLevel; i++) { - const layer = csmLayers.layers[i]; - const matShadowView = layer.matShadowView; + const layer: CSMShadowLayer = csmLayers.layers[i]; + const matShadowView: Mat4 = layer.matShadowView; uniformOffset = setter.getUniformOffset('cc_csmViewDir0', Type.FLOAT4, i); if (setter.hasUniform(uniformOffset)) { _uboVec.set(matShadowView.m00, matShadowView.m04, matShadowView.m08, layerThreshold); @@ -591,10 +607,13 @@ function setShadowUBOView (setter: WebSetter, camera: Camera | null, layout = 'd } } -function setCameraUBOValues (setter: WebSetter, - camera: Readonly | null, cfg: Readonly, - scene: Readonly, - layoutName = 'default'): void { +function setCameraUBOValues ( + setter: WebSetter, + camera: Readonly | null, + cfg: Readonly, + scene: RenderScene | null, + layoutName = 'default', +): void { const director = cclegacy.director; const root = director.root; const pipeline = root.pipeline as WebPipeline; @@ -741,14 +760,14 @@ function setTextureUBOView (setter: WebSetter, camera: Camera | null, cfg: Reado const root = director.root; if (skybox.reflectionMap) { const texture = skybox.reflectionMap.getGFXTexture()!; - const sampler = root.device.getSampler(skybox.reflectionMap.getSamplerInfo()); + const sampler: Sampler = root.device.getSampler(skybox.reflectionMap.getSamplerInfo()); setter.setTexture('cc_environment', texture); setter.setSampler('cc_environment', sampler); } else { const envmap = skybox.envmap ? skybox.envmap : builtinResMgr.get('default-cube-texture'); if (envmap) { const texture = envmap.getGFXTexture()!; - const sampler = root.device.getSampler(envmap.getSamplerInfo()); + const sampler: Sampler = root.device.getSampler(envmap.getSamplerInfo()); setter.setTexture('cc_environment', texture); setter.setSampler('cc_environment', sampler); } @@ -756,11 +775,11 @@ function setTextureUBOView (setter: WebSetter, camera: Camera | null, cfg: Reado const diffuseMap = skybox.diffuseMap ? skybox.diffuseMap : builtinResMgr.get('default-cube-texture'); if (diffuseMap) { const texture = diffuseMap.getGFXTexture()!; - const sampler = root.device.getSampler(diffuseMap.getSamplerInfo()); + const sampler: Sampler = root.device.getSampler(diffuseMap.getSamplerInfo()); setter.setTexture('cc_diffuseMap', texture); setter.setSampler('cc_diffuseMap', sampler); } - const pointSampler = root.device.getSampler(_samplerPointInfo); + const pointSampler: Sampler = root.device.getSampler(_samplerPointInfo); if (!setter.hasSampler('cc_shadowMap')) { setter.setSampler('cc_shadowMap', pointSampler); } @@ -779,7 +798,7 @@ function getFirstChildLayoutName (lg: LayoutGraphData, parentID: number): string if (lg.numVertices() && parentID !== 0xFFFFFFFF && lg.numChildren(parentID)) { const childNodes = lg.children(parentID); if (childNodes.next().value && childNodes.next().value.target !== lg.nullVertex()) { - const ququeLayoutID = childNodes.next().value.target; + const ququeLayoutID: number = childNodes.next().value.target; return lg.getName(ququeLayoutID); } } @@ -812,14 +831,16 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild addSceneOfCamera (camera: Camera, light: LightInfo, sceneFlags = SceneFlags.NONE, name = 'Camera'): void { const sceneData = new SceneData(camera.scene, camera, sceneFlags, light); - this._renderGraph.addVertex( - RenderGraphValue.Scene, sceneData, name, '', new RenderData(), false, this._vertID, - ); + this._renderGraph.addVertex(RenderGraphValue.Scene, sceneData, name, '', new RenderData(), false, this._vertID); const layoutName = this.getLayoutName(); - const scene = cclegacy.director.getScene(); - setCameraUBOValues(this, camera, this._pipeline, - camera.scene ? camera.scene : scene ? scene.renderScene : null, - layoutName); + const scene: Scene = cclegacy.director.getScene(); + setCameraUBOValues( + this, + camera, + this._pipeline, + camera.scene || (scene ? scene.renderScene : null), + layoutName, + ); if (sceneFlags & SceneFlags.SHADOW_CASTER) { setShadowUBOLightView(this, camera, light.light!, light.level, layoutName); } else { @@ -828,33 +849,37 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild setTextureUBOView(this, camera, this._pipeline); initGlobalDescBinding(this._data, layoutName); } - // addScene (camera: Camera, sceneFlags = SceneFlags.NONE): void { - // const sceneData = new SceneData(camera.scene, camera, sceneFlags); - // this._renderGraph.addVertex( - // RenderGraphValue.Scene, sceneData, 'Scene', '', new RenderData(), false, this._vertID, - // ); - // } - // addSceneCulledByDirectionalLight (camera: Camera, sceneFlags: SceneFlags, light: DirectionalLight, level: number): void { - // const sceneData = new SceneData(camera.scene, camera, sceneFlags, new LightInfo(light, level)); - // this._renderGraph.addVertex( - // RenderGraphValue.Scene, sceneData, 'Scene', '', new RenderData(), false, this._vertID, - // ); - // } - // addSceneCulledBySpotLight (camera: Camera, sceneFlags: SceneFlags, light: SpotLight): void { - // const sceneData = new SceneData(camera.scene, camera, sceneFlags, new LightInfo(light, 0)); - // this._renderGraph.addVertex( - // RenderGraphValue.Scene, sceneData, 'Scene', '', new RenderData(), false, this._vertID, - // ); - // } + addScene (camera: Camera, sceneFlags = SceneFlags.NONE): void { + const sceneData = new SceneData(camera.scene, camera, sceneFlags); + this._renderGraph.addVertex(RenderGraphValue.Scene, sceneData, 'Scene', '', new RenderData(), false, this._vertID); + } + addSceneCulledByDirectionalLight (camera: Camera, sceneFlags: SceneFlags, light: DirectionalLight, level: number): void { + const sceneData = new SceneData(camera.scene, camera, sceneFlags, new LightInfo(light, level)); + this._renderGraph.addVertex(RenderGraphValue.Scene, sceneData, 'Scene', '', new RenderData(), false, this._vertID); + } + addSceneCulledBySpotLight (camera: Camera, sceneFlags: SceneFlags, light: SpotLight): void { + const sceneData = new SceneData(camera.scene, camera, sceneFlags, new LightInfo(light, 0)); + this._renderGraph.addVertex(RenderGraphValue.Scene, sceneData, 'Scene', '', new RenderData(), false, this._vertID); + } addFullscreenQuad (material: Material, passID: number, sceneFlags = SceneFlags.NONE, name = 'Quad'): void { this._renderGraph.addVertex( - RenderGraphValue.Blit, new Blit(material, passID, sceneFlags, null), - name, '', new RenderData(), false, this._vertID, + RenderGraphValue.Blit, + new Blit(material, passID, sceneFlags, null), + name, + '', + new RenderData(), + false, + this._vertID, ); const layoutName = this.getLayoutName(); - const scene = cclegacy.director.getScene(); - setCameraUBOValues(this, null, this._pipeline, - scene ? scene.renderScene : null, layoutName); + const scene: Scene | null = cclegacy.director.getScene(); + setCameraUBOValues( + this, + null, + this._pipeline, + scene ? scene.renderScene : null, + layoutName, + ); if (sceneFlags & SceneFlags.SHADOW_CASTER) { // setShadowUBOLightView(this, light.light!, light.level); } else { @@ -865,13 +890,23 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild } addCameraQuad (camera: Camera, material: Material, passID: number, sceneFlags = SceneFlags.NONE): void { this._renderGraph.addVertex( - RenderGraphValue.Blit, new Blit(material, passID, sceneFlags, camera), - 'CameraQuad', '', new RenderData(), false, this._vertID, + RenderGraphValue.Blit, + new Blit(material, passID, sceneFlags, camera), + 'CameraQuad', + '', + new RenderData(), + false, + this._vertID, ); const layoutName = this.getLayoutName(); - const scene = cclegacy.director.getScene(); - setCameraUBOValues(this, camera, this._pipeline, - camera.scene ? camera.scene : scene ? scene.renderScene : null, layoutName); + const scene: Scene = cclegacy.director.getScene(); + setCameraUBOValues( + this, + camera, + this._pipeline, + camera.scene || (scene ? scene.renderScene : null), + layoutName, + ); if (sceneFlags & SceneFlags.SHADOW_CASTER) { // setShadowUBOLightView(this, light.light!, light.level); } else { @@ -882,8 +917,13 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild } clearRenderTarget (name: string, color: Color = new Color()): void { this._renderGraph.addVertex( - RenderGraphValue.Clear, [new ClearView(name, ClearFlagBit.COLOR, color)], - 'ClearRenderTarget', '', new RenderData(), false, this._vertID, + RenderGraphValue.Clear, + [new ClearView(name, ClearFlagBit.COLOR, color)], + 'ClearRenderTarget', + '', + new RenderData(), + false, + this._vertID, ); } setViewport (viewport: Viewport): void { @@ -899,8 +939,14 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild } export class WebRenderSubpassBuilder extends WebSetter implements RenderSubpassBuilder { - constructor (data: RenderData, renderGraph: RenderGraph, layoutGraph: LayoutGraphData, - vertID: number, subpass: RasterSubpass, pipeline: PipelineSceneData) { + constructor ( + data: RenderData, + renderGraph: RenderGraph, + layoutGraph: LayoutGraphData, + vertID: number, + subpass: RasterSubpass, + pipeline: PipelineSceneData, + ) { super(data, layoutGraph); this._renderGraph = renderGraph; this._layoutGraph = layoutGraph; @@ -908,11 +954,12 @@ export class WebRenderSubpassBuilder extends WebSetter implements RenderSubpassB this._subpass = subpass; this._pipeline = pipeline; - const layoutName = this._renderGraph.component( - RenderGraphComponent.Layout, this._vertID, - ); + const layoutName = this._renderGraph.component(RenderGraphComponent.Layout, this._vertID); this._layoutID = layoutGraph.locateChild(layoutGraph.nullVertex(), layoutName); } + addRenderTarget (name: string, accessType: AccessType, slotName?: string | undefined, loadOp?: LoadOp | undefined, storeOp?: StoreOp | undefined, color?: Color | undefined): void { + throw new Error('Method not implemented.'); + } setCustomShaderStages (name: string, stageFlags: ShaderStageFlagBit): void { throw new Error('Method not implemented.'); } @@ -925,9 +972,7 @@ export class WebRenderSubpassBuilder extends WebSetter implements RenderSubpassB set name (name: string) { this._renderGraph.setName(this._vertID, name); } - addRenderTarget (name: string, accessType: AccessType, slotName: string, loadOp = LoadOp.CLEAR, storeOp = StoreOp.STORE, clearColor = new Color()): void { - throw new Error('Method not implemented.'); - } + addDepthStencil (name: string, accessType: AccessType, depthSlotName = '', stencilSlotName = '', loadOp = LoadOp.CLEAR, storeOp = StoreOp.STORE, depth = 1, stencil = 0, clearFlag = ClearFlagBit.DEPTH_STENCIL): void { throw new Error('Method not implemented.'); } @@ -950,9 +995,7 @@ export class WebRenderSubpassBuilder extends WebSetter implements RenderSubpassB } const queue = new RenderQueue(hint); const data = new RenderData(); - const queueID = this._renderGraph.addVertex( - RenderGraphValue.Queue, queue, '', layoutName, data, false, this._vertID, - ); + const queueID = this._renderGraph.addVertex(RenderGraphValue.Queue, queue, '', layoutName, data, false, this._vertID); return new WebRenderQueueBuilder(data, this._renderGraph, this._layoutGraph, queueID, queue, this._pipeline); } get showStatistics (): boolean { @@ -970,7 +1013,7 @@ export class WebRenderSubpassBuilder extends WebSetter implements RenderSubpassB private readonly _layoutGraph: LayoutGraphData; } -export class WebRenderPassBuilder extends WebSetter implements BasicRenderPassBuilder { +export class WebRenderPassBuilder extends WebSetter implements BasicMultisampleRenderPassBuilder { constructor (data: RenderData, renderGraph: RenderGraph, layoutGraph: LayoutGraphData, resourceGraph: ResourceGraph, vertID: number, pass: RasterPass, pipeline: PipelineSceneData) { super(data, layoutGraph); this._renderGraph = renderGraph; @@ -980,9 +1023,7 @@ export class WebRenderPassBuilder extends WebSetter implements BasicRenderPassBu this._pass = pass; this._pipeline = pipeline; - const layoutName = this._renderGraph.component( - RenderGraphComponent.Layout, this._vertID, - ); + const layoutName = this._renderGraph.component(RenderGraphComponent.Layout, this._vertID); this._layoutID = layoutGraph.locateChild(layoutGraph.nullVertex(), layoutName); } setCustomShaderStages (name: string, stageFlags: ShaderStageFlagBit): void { @@ -1009,25 +1050,44 @@ export class WebRenderPassBuilder extends WebSetter implements BasicRenderPassBu if (loadOp === LoadOp.LOAD) { clearFlag = ClearFlagBit.NONE; } - const view = new RasterView('', - AccessType.WRITE, AttachmentType.RENDER_TARGET, + const view = new RasterView( + '', + AccessType.WRITE, + + AttachmentType.RENDER_TARGET, loadOp, storeOp, clearFlag, - clearColor); + clearColor, + ); this._pass.rasterViews.set(name, view); } addDepthStencil (name: string, loadOp = LoadOp.CLEAR, storeOp = StoreOp.STORE, depth = 1, stencil = 0, clearFlag = ClearFlagBit.DEPTH_STENCIL): void { if (DEBUG) { assert(Boolean(name && this._resourceGraph.contains(name))); } - const view = new RasterView('', - AccessType.WRITE, AttachmentType.DEPTH_STENCIL, + const view = new RasterView( + '', + AccessType.WRITE, + + AttachmentType.DEPTH_STENCIL, loadOp, storeOp, clearFlag, - new Color(depth, stencil, 0, 0)); + new Color(depth, stencil, 0, 0), + ); this._pass.rasterViews.set(name, view); + } + resolveRenderTarget (source: string, target: string): void { + + } + resolveDepthStencil ( + source: string, + target: string, + depthMode?: ResolveMode, + stencilMode?: ResolveMode, + ): void { + } private _addComputeResource (name: string, accessType: AccessType, slotName: string): void { const view = new ComputeView(slotName); @@ -1064,9 +1124,7 @@ export class WebRenderPassBuilder extends WebSetter implements BasicRenderPassBu this._pass.subpassGraph.addVertex(name, new Subpass()); const subpass = new RasterSubpass(subpassID, 1, 0); const data = new RenderData(); - const vertID = this._renderGraph.addVertex( - RenderGraphValue.RasterSubpass, subpass, name, layoutName, data, false, - ); + const vertID = this._renderGraph.addVertex(RenderGraphValue.RasterSubpass, subpass, name, layoutName, data, false); const result = new WebRenderSubpassBuilder(data, this._renderGraph, this._layoutGraph, vertID, subpass, this._pipeline); return result; } @@ -1077,34 +1135,51 @@ export class WebRenderPassBuilder extends WebSetter implements BasicRenderPassBu } const queue = new RenderQueue(hint); const data = new RenderData(); - const queueID = this._renderGraph.addVertex( - RenderGraphValue.Queue, queue, '', layoutName, data, false, this._vertID, - ); + const queueID = this._renderGraph.addVertex(RenderGraphValue.Queue, queue, '', layoutName, data, false, this._vertID); return new WebRenderQueueBuilder(data, this._renderGraph, this._layoutGraph, queueID, queue, this._pipeline); } addFullscreenQuad (material: Material, passID: number, sceneFlags = SceneFlags.NONE, name = 'FullscreenQuad'): void { const queue = new RenderQueue(QueueHint.RENDER_TRANSPARENT); const queueId = this._renderGraph.addVertex( - RenderGraphValue.Queue, queue, - 'Queue', '', new RenderData(), - false, this._vertID, + RenderGraphValue.Queue, + queue, + 'Queue', + '', + new RenderData(), + false, + this._vertID, ); this._renderGraph.addVertex( - RenderGraphValue.Blit, new Blit(material, passID, sceneFlags, null), - name, '', new RenderData(), false, queueId, + RenderGraphValue.Blit, + new Blit(material, passID, sceneFlags, null), + name, + '', + new RenderData(), + false, + queueId, ); } addCameraQuad (camera: Camera, material: Material, passID: number, sceneFlags: SceneFlags, name = 'CameraQuad'): void { const queue = new RenderQueue(QueueHint.RENDER_TRANSPARENT); const queueId = this._renderGraph.addVertex( - RenderGraphValue.Queue, queue, - 'Queue', '', new RenderData(), false, this._vertID, + RenderGraphValue.Queue, + queue, + 'Queue', + '', + new RenderData(), + false, + this._vertID, ); this._renderGraph.addVertex( - RenderGraphValue.Blit, new Blit(material, passID, sceneFlags, camera), - name, '', new RenderData(), false, queueId, + RenderGraphValue.Blit, + new Blit(material, passID, sceneFlags, camera), + name, + '', + new RenderData(), + false, + queueId, ); } setViewport (viewport: Viewport): void { @@ -1153,7 +1228,15 @@ export class WebComputeQueueBuilder extends WebSetter implements ComputeQueueBui this._renderGraph.addVertex( RenderGraphValue.Dispatch, new Dispatch(material, passID, threadGroupCountX, threadGroupCountY, threadGroupCountZ), - name, '', new RenderData(), false, this._vertID, + name, + + '', + + new RenderData(), + + false, + + this._vertID, ); } private readonly _renderGraph: RenderGraph; @@ -1172,9 +1255,7 @@ export class WebComputePassBuilder extends WebSetter implements ComputePassBuild this._pass = pass; this._pipeline = pipeline; - const layoutName = this._renderGraph.component( - RenderGraphComponent.Layout, this._vertID, - ); + const layoutName = this._renderGraph.component(RenderGraphComponent.Layout, this._vertID); this._layoutID = layoutGraph.locateChild(layoutGraph.nullVertex(), layoutName); } setCustomShaderStages (name: string, stageFlags: ShaderStageFlagBit): void { @@ -1208,9 +1289,7 @@ export class WebComputePassBuilder extends WebSetter implements ComputePassBuild } const queue = new RenderQueue(); const data = new RenderData(); - const queueID = this._renderGraph.addVertex( - RenderGraphValue.Queue, queue, '', layoutName, data, false, this._vertID, - ); + const queueID = this._renderGraph.addVertex(RenderGraphValue.Queue, queue, '', layoutName, data, false, this._vertID); return new WebComputeQueueBuilder(data, this._renderGraph, this._layoutGraph, queueID, queue, this._pipeline); } private readonly _renderGraph: RenderGraph; @@ -1302,10 +1381,13 @@ export class WebPipeline implements BasicPipeline { if (renderWindow.swapchain === null) { assert(renderWindow.framebuffer.colorTextures.length === 1 && renderWindow.framebuffer.colorTextures[0] !== null); + desc.sampleCount = renderWindow.framebuffer.colorTextures[0].info.samples; return this._resourceGraph.addVertex( ResourceGraphValue.Framebuffer, renderWindow.framebuffer, - name, desc, + name, + + desc, new ResourceTraits(ResourceResidency.EXTERNAL), new ResourceStates(), new SamplerInfo(), @@ -1314,7 +1396,9 @@ export class WebPipeline implements BasicPipeline { return this._resourceGraph.addVertex( ResourceGraphValue.Swapchain, new RenderSwapchain(renderWindow.swapchain), - name, desc, + name, + + desc, new ResourceTraits(ResourceResidency.BACKBUFFER), new ResourceStates(), new SamplerInfo(), @@ -1365,6 +1449,39 @@ export class WebPipeline implements BasicPipeline { desc.width = width; desc.height = height; } + addResource (name: string, dimension: ResourceDimension, format: Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: SampleCount, flags: ResourceFlags, residency: ResourceResidency): number { + const desc = new ResourceDesc(); + desc.dimension = dimension; + desc.width = width; + desc.height = height; + desc.depthOrArraySize = dimension === ResourceDimension.TEXTURE3D ? depth : arraySize; + desc.mipLevels = mipLevels; + desc.format = format; + desc.sampleCount = sampleCount; + desc.flags = flags; + return this._resourceGraph.addVertex( + ResourceGraphValue.Managed, + new ManagedResource(), + name, + + desc, + new ResourceTraits(residency), + new ResourceStates(), + new SamplerInfo(Filter.LINEAR, Filter.LINEAR, Filter.NONE, Address.CLAMP, Address.CLAMP, Address.CLAMP), + ); + } + updateResource (name: string, format: Format, width: number, height: number, depth: number, arraySize: number, mipLevels: number, sampleCount: SampleCount): void { + const resId = this.resourceGraph.vertex(name); + const desc = this.resourceGraph.getDesc(resId); + desc.width = width; + desc.height = height; + desc.depthOrArraySize = desc.dimension === ResourceDimension.TEXTURE3D ? depth : arraySize; + desc.mipLevels = mipLevels; + if (format !== Format.UNKNOWN) { + desc.format = format; + } + desc.sampleCount = sampleCount; + } public containsResource (name: string): boolean { return this._resourceGraph.contains(name); } @@ -1618,7 +1735,9 @@ export class WebPipeline implements BasicPipeline { return this._resourceGraph.addVertex( ResourceGraphValue.ManagedBuffer, new ManagedBuffer(), - name, desc, + name, + + desc, new ResourceTraits(residency), new ResourceStates(), new SamplerInfo(), @@ -1632,12 +1751,15 @@ export class WebPipeline implements BasicPipeline { desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; + desc.sampleCount = SampleCount.X1; desc.flags = ResourceFlags.COLOR_ATTACHMENT | ResourceFlags.SAMPLED; return this._resourceGraph.addVertex( ResourceGraphValue.Managed, new ManagedResource(), - name, desc, + name, + + desc, new ResourceTraits(residency), new ResourceStates(), new SamplerInfo(Filter.LINEAR, Filter.LINEAR, Filter.NONE, Address.CLAMP, Address.CLAMP, Address.CLAMP), @@ -1651,11 +1773,14 @@ export class WebPipeline implements BasicPipeline { desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; + desc.sampleCount = SampleCount.X1; desc.flags = ResourceFlags.DEPTH_STENCIL_ATTACHMENT | ResourceFlags.SAMPLED; return this._resourceGraph.addVertex( ResourceGraphValue.Managed, new ManagedResource(), - name, desc, + name, + + desc, new ResourceTraits(residency), new ResourceStates(), new SamplerInfo(Filter.POINT, Filter.POINT, Filter.NONE), @@ -1673,7 +1798,9 @@ export class WebPipeline implements BasicPipeline { return this._resourceGraph.addVertex( ResourceGraphValue.Managed, new ManagedResource(), - name, desc, + name, + + desc, new ResourceTraits(residency), new ResourceStates(), new SamplerInfo(Filter.POINT, Filter.POINT, Filter.NONE), @@ -1692,7 +1819,9 @@ export class WebPipeline implements BasicPipeline { return this._resourceGraph.addVertex( ResourceGraphValue.Managed, new ManagedResource(), - name, desc, + name, + + desc, new ResourceTraits(residency), new ResourceStates(), new SamplerInfo(Filter.LINEAR, Filter.LINEAR, Filter.NONE, Address.CLAMP, Address.CLAMP, Address.CLAMP), @@ -1724,8 +1853,15 @@ export class WebPipeline implements BasicPipeline { throw new Error('Cannot run without creating rendergraph'); } if (!this._executor) { - this._executor = new Executor(this, this._pipelineUBO, this._device, - this._resourceGraph, this.layoutGraph, this.width, this.height); + this._executor = new Executor( + this, + this._pipelineUBO, + this._device, + this._resourceGraph, + this.layoutGraph, + this.width, + this.height, + ); } this._executor.resize(this.width, this.height); this._executor.execute(this._renderGraph); @@ -1762,7 +1898,7 @@ export class WebPipeline implements BasicPipeline { this.execute(); this.endFrame(); } - addRenderPassImpl (width: number, height: number, layoutName: string, count = 1, quality = 0): BasicRenderPassBuilder { + addRenderPassImpl (width: number, height: number, layoutName: string, count = 1, quality = 0): BasicMultisampleRenderPassBuilder { if (DEBUG) { const stageId = this.layoutGraph.locateChild(this.layoutGraph.nullVertex(), layoutName); assert(stageId !== 0xFFFFFFFF); @@ -1778,9 +1914,7 @@ export class WebPipeline implements BasicPipeline { pass.quality = quality; const data = new RenderData(); - const vertID = this._renderGraph!.addVertex( - RenderGraphValue.RasterPass, pass, name, layoutName, data, false, - ); + const vertID = this._renderGraph!.addVertex(RenderGraphValue.RasterPass, pass, name, layoutName, data, false); const result = new WebRenderPassBuilder(data, this._renderGraph!, this._layoutGraph, this._resourceGraph, vertID, pass, this._pipelineSceneData); this._updateRasterPassConstants(result, width, height, isEnableEffect() ? layoutName : 'default'); initGlobalDescBinding(data, layoutName); @@ -1789,7 +1923,7 @@ export class WebPipeline implements BasicPipeline { addRenderPass (width: number, height: number, layoutName = 'default'): BasicRenderPassBuilder { return this.addRenderPassImpl(width, height, layoutName); } - addMultisampleRenderPass (width: number, height: number, count: number, quality: number, layoutName = 'default'): BasicRenderPassBuilder { + addMultisampleRenderPass (width: number, height: number, count: number, quality: number, layoutName = 'default'): BasicMultisampleRenderPassBuilder { assert(count > 1); return this.addRenderPassImpl(width, height, layoutName, count, quality); } @@ -1815,8 +1949,8 @@ export class WebPipeline implements BasicPipeline { } protected _updateRasterPassConstants (setter: WebSetter, width: number, height: number, layoutName = 'default'): void { - const director = cclegacy.director; - const root = director.root; + const director: Director = cclegacy.director; + const root: Root = director.root!; const shadingWidth = width; const shadingHeight = height; const pipeline = root.pipeline as WebPipeline; @@ -1843,7 +1977,7 @@ export class WebPipeline implements BasicPipeline { if (debugView) { if (setter.hasUniform(uniformOffset)) { const debugPackVec: number[] = [debugView.singleMode as number, 0.0, 0.0, 0.0]; - for (let i = DebugViewCompositeType.DIRECT_DIFFUSE as number; i < DebugViewCompositeType.MAX_BIT_COUNT; i++) { + for (let i = DebugViewCompositeType.DIRECT_DIFFUSE as number; i < (DebugViewCompositeType.MAX_BIT_COUNT as number); i++) { const idx = i >> 3; const bit = i % 8; debugPackVec[idx + 1] += (debugView.isCompositeModeEnabled(i) ? 1.0 : 0.0) * (10.0 ** bit); diff --git a/cocos/rendering/custom/web-scene-visitor.ts b/cocos/rendering/custom/web-scene-visitor.ts index 81f3d187c15..04f4e94bb19 100644 --- a/cocos/rendering/custom/web-scene-visitor.ts +++ b/cocos/rendering/custom/web-scene-visitor.ts @@ -24,7 +24,7 @@ import { PipelineState, DescriptorSet, InputAssembler, DrawInfo, Buffer, CommandBuffer, Rect, Viewport } from '../../gfx'; import { PipelineSceneData } from '../pipeline-scene-data'; -import { SceneVisitor } from './pipeline'; +import { SceneVisitor } from './scene'; export class WebSceneVisitor implements SceneVisitor { protected _pipelineSceneData: PipelineSceneData; @@ -51,7 +51,7 @@ export class WebSceneVisitor implements SceneVisitor { public bindInputAssembler (ia: InputAssembler): void { this._commandBuffer.bindInputAssembler(ia); } - public draw (info: DrawInfo): void { + public draw (info: DrawInfo | InputAssembler): void { this._commandBuffer.draw(info); } public updateBuffer (buffer: Buffer, data: ArrayBuffer, size?: number): void { diff --git a/cocos/rendering/custom/web-scene.ts b/cocos/rendering/custom/web-scene.ts index 7a4c6a6150f..ea0272151da 100644 --- a/cocos/rendering/custom/web-scene.ts +++ b/cocos/rendering/custom/web-scene.ts @@ -28,7 +28,7 @@ import { RenderScene, scene } from '../../render-scene'; import { Camera, Model, ShadowType, SKYBOX_FLAG } from '../../render-scene/scene'; import { IRenderObject, IRenderPass, UBOShadow } from '../define'; import { PipelineSceneData } from '../pipeline-scene-data'; -import { SceneTask, SceneTransversal, SceneVisitor } from './pipeline'; +import { SceneTask, SceneTransversal, SceneVisitor } from './scene'; import { TaskType } from './types'; import { PipelineUBO } from '../pipeline-ubo'; diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index 4e9a2c3d98c..bf1218beb9c 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -1410,7 +1410,8 @@ cocos_source_files( cocos/renderer/pipeline/custom/LayoutGraphTypes.h cocos/renderer/pipeline/custom/LayoutGraphUtils.cpp cocos/renderer/pipeline/custom/LayoutGraphUtils.h - cocos/renderer/pipeline/custom/NativeDefaultScene.cpp + cocos/renderer/pipeline/custom/NativeBuiltinUtils.cpp + cocos/renderer/pipeline/custom/NativeBuiltinUtils.h cocos/renderer/pipeline/custom/NativeExecutor.cpp cocos/renderer/pipeline/custom/NativeFactory.cpp cocos/renderer/pipeline/custom/NativeFwd.h @@ -1422,10 +1423,13 @@ cocos_source_files( cocos/renderer/pipeline/custom/NativePools.cpp cocos/renderer/pipeline/custom/NativeProgramLibrary.cpp cocos/renderer/pipeline/custom/NativeRenderGraph.cpp + cocos/renderer/pipeline/custom/NativeRenderGraphUtils.cpp + cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h cocos/renderer/pipeline/custom/NativeRenderQueue.cpp cocos/renderer/pipeline/custom/NativeRenderingModule.cpp cocos/renderer/pipeline/custom/NativeResourceGraph.cpp cocos/renderer/pipeline/custom/NativeSceneCulling.cpp + cocos/renderer/pipeline/custom/NativeSetter.cpp cocos/renderer/pipeline/custom/NativeTypes.cpp cocos/renderer/pipeline/custom/NativeTypes.h cocos/renderer/pipeline/custom/NativeUtils.cpp diff --git a/native/cocos/core/assets/RenderTexture.cpp b/native/cocos/core/assets/RenderTexture.cpp index 79224297f73..564e94cb923 100644 --- a/native/cocos/core/assets/RenderTexture.cpp +++ b/native/cocos/core/assets/RenderTexture.cpp @@ -36,7 +36,7 @@ gfx::RenderPassInfo getDefaultRenderPassInfo(gfx::Device *device) { gfx::RenderPassInfo info; info.colorAttachments.push_back({ gfx::Format::RGBA8, - gfx::SampleCount::ONE, + gfx::SampleCount::X1, gfx::LoadOp::CLEAR, gfx::StoreOp::STORE, device->getGeneralBarrier({ diff --git a/native/cocos/renderer/frame-graph/FrameGraph.cpp b/native/cocos/renderer/frame-graph/FrameGraph.cpp index 25b14f79e09..594d16a0c9b 100644 --- a/native/cocos/renderer/frame-graph/FrameGraph.cpp +++ b/native/cocos/renderer/frame-graph/FrameGraph.cpp @@ -426,7 +426,7 @@ void FrameGraph::computeStoreActionAndMemoryless() { const gfx::TextureInfo &textureDesc = static_cast *>(renderTarget)->get().getDesc(); renderTarget->_memoryless = renderTarget->_neverLoaded && renderTarget->_neverStored; - renderTarget->_memorylessMSAA = textureDesc.samples != gfx::SampleCount::ONE && renderTarget->_writerCount < 2; + renderTarget->_memorylessMSAA = textureDesc.samples != gfx::SampleCount::X1 && renderTarget->_writerCount < 2; } } diff --git a/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp b/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp index 204df36fafa..7689387fd31 100644 --- a/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp +++ b/native/cocos/renderer/gfx-agent/CommandBufferAgent.cpp @@ -383,6 +383,27 @@ void CommandBufferAgent::updateBuffer(Buffer *buff, const void *data, uint32_t s }); } +void CommandBufferAgent::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + Texture *actorSrcTexture = nullptr; + Texture *actorDstTexture = nullptr; + if (srcTexture) actorSrcTexture = static_cast(srcTexture)->getActor(); + if (dstTexture) actorDstTexture = static_cast(dstTexture)->getActor(); + + auto *actorRegions = _messageQueue->allocate(count); + memcpy(actorRegions, regions, count * sizeof(TextureCopy)); + + ENQUEUE_MESSAGE_5( + _messageQueue, CommandBufferBlitTexture, + actor, getActor(), + srcTexture, actorSrcTexture, + dstTexture, actorDstTexture, + regions, actorRegions, + count, count, + { + actor->resolveTexture(srcTexture, dstTexture, regions, count); + }); +} + void CommandBufferAgent::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { Texture *actorSrcTexture = nullptr; Texture *actorDstTexture = nullptr; diff --git a/native/cocos/renderer/gfx-agent/CommandBufferAgent.h b/native/cocos/renderer/gfx-agent/CommandBufferAgent.h index 95ddf92a57f..b3cf37ff0e8 100644 --- a/native/cocos/renderer/gfx-agent/CommandBufferAgent.h +++ b/native/cocos/renderer/gfx-agent/CommandBufferAgent.h @@ -61,6 +61,7 @@ class CC_DLL CommandBufferAgent final : public Agent { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override; void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const *buffers, uint32_t bufferBarrierCount, const TextureBarrier *const *textureBarriers, const Texture *const *textures, uint32_t textureBarrierCount) override; diff --git a/native/cocos/renderer/gfx-agent/DeviceAgent.cpp b/native/cocos/renderer/gfx-agent/DeviceAgent.cpp index 16fe3f531e7..872fb3bf849 100644 --- a/native/cocos/renderer/gfx-agent/DeviceAgent.cpp +++ b/native/cocos/renderer/gfx-agent/DeviceAgent.cpp @@ -455,5 +455,9 @@ void DeviceAgent::frameSync() { }); } +SampleCount DeviceAgent::getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + return _actor->getMaxSampleCount(format, usage, flags); +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-agent/DeviceAgent.h b/native/cocos/renderer/gfx-agent/DeviceAgent.h index cbbb9693467..ce11e0feb5b 100644 --- a/native/cocos/renderer/gfx-agent/DeviceAgent.h +++ b/native/cocos/renderer/gfx-agent/DeviceAgent.h @@ -106,7 +106,7 @@ class CC_DLL DeviceAgent final : public Agent { void presentSignal(); void enableAutoBarrier(bool en) override; - + SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const override; protected: static DeviceAgent *instance; diff --git a/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp b/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp index 0c54378d084..8b3f0191408 100644 --- a/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp +++ b/native/cocos/renderer/gfx-agent/FramebufferAgent.cpp @@ -57,6 +57,9 @@ void FramebufferAgent::doInit(const FramebufferInfo &info) { if (info.depthStencilTexture) { actorInfo.depthStencilTexture = static_cast(info.depthStencilTexture)->getActor(); } + if (info.depthStencilResolveTexture) { + actorInfo.depthStencilResolveTexture = static_cast(info.depthStencilResolveTexture)->getActor(); + } actorInfo.renderPass = static_cast(info.renderPass)->getActor(); ENQUEUE_MESSAGE_2( diff --git a/native/cocos/renderer/gfx-base/GFXCommandBuffer.h b/native/cocos/renderer/gfx-base/GFXCommandBuffer.h index c16065c74b2..00a6d46e2aa 100644 --- a/native/cocos/renderer/gfx-base/GFXCommandBuffer.h +++ b/native/cocos/renderer/gfx-base/GFXCommandBuffer.h @@ -63,6 +63,7 @@ class CC_DLL CommandBuffer : public GFXObject, public RefCounted { virtual void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) = 0; virtual void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) = 0; virtual void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) = 0; + virtual void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) = 0; virtual void execute(CommandBuffer *const *cmdBuffs, uint32_t count) = 0; virtual void dispatch(const DispatchInfo &info) = 0; virtual void beginQuery(QueryPool *queryPool, uint32_t id) = 0; diff --git a/native/cocos/renderer/gfx-base/GFXDef-common.h b/native/cocos/renderer/gfx-base/GFXDef-common.h index 943cc1242c1..ab5c7bd810f 100644 --- a/native/cocos/renderer/gfx-base/GFXDef-common.h +++ b/native/cocos/renderer/gfx-base/GFXDef-common.h @@ -175,9 +175,12 @@ enum class Feature : uint32_t { COMPUTE_SHADER, // @deprecated INPUT_ATTACHMENT_BENEFIT, + SUBPASS_COLOR_INPUT, SUBPASS_DEPTH_STENCIL_INPUT, RASTERIZATION_ORDER_NOCOHERENT, + + MULTI_SAMPLE_RESOLVE_DEPTH_STENCIL, // resolve depth stencil COUNT, }; CC_ENUM_CONVERSION_OPERATOR(Feature); @@ -472,9 +475,10 @@ CC_ENUM_BITWISE_OPERATORS(TextureUsageBit); enum class TextureFlagBit : uint32_t { NONE = 0, GEN_MIPMAP = 0x1, // Generate mipmaps using bilinear filter - GENERAL_LAYOUT = 0x2, // For inout framebuffer attachments + GENERAL_LAYOUT = 0x2, // @deprecated, For inout framebuffer attachments EXTERNAL_OES = 0x4, // External oes texture EXTERNAL_NORMAL = 0x8, // External normal texture + LAZILY_ALLOCATED = 0x10 // Try lazily allocated mode. }; using TextureFlags = TextureFlagBit; CC_ENUM_BITWISE_OPERATORS(TextureFlagBit); @@ -492,10 +496,13 @@ using FormatFeature = FormatFeatureBit; CC_ENUM_BITWISE_OPERATORS(FormatFeatureBit); enum class SampleCount : uint32_t { - ONE, // Single sample - MULTIPLE_PERFORMANCE, // Multiple samples prioritizing performance over quality - MULTIPLE_BALANCE, // Multiple samples leveraging both quality and performance - MULTIPLE_QUALITY, // Multiple samples prioritizing quality over performance + X1 = 0x01, + X2 = 0x02, + X4 = 0x04, + X8 = 0x08, + X16 = 0x10, + X32 = 0x20, + X64 = 0x40 }; CC_ENUM_CONVERSION_OPERATOR(SampleCount); @@ -1064,7 +1071,7 @@ struct ALIGNAS(8) TextureInfo { TextureFlags flags{TextureFlagBit::NONE}; uint32_t layerCount{1}; uint32_t levelCount{1}; - SampleCount samples{SampleCount::ONE}; + SampleCount samples{SampleCount::X1}; uint32_t depth{1}; void *externalRes{nullptr}; // CVPixelBuffer for Metal, EGLImage for GLES #if CC_CPU_ARCH == CC_CPU_ARCH_32 @@ -1272,7 +1279,7 @@ struct InputAssemblerInfo { struct ALIGNAS(8) ColorAttachment { Format format{Format::UNKNOWN}; - SampleCount sampleCount{SampleCount::ONE}; + SampleCount sampleCount{SampleCount::X1}; LoadOp loadOp{LoadOp::CLEAR}; StoreOp storeOp{StoreOp::STORE}; GeneralBarrier *barrier{nullptr}; @@ -1284,7 +1291,7 @@ using ColorAttachmentList = ccstd::vector; struct ALIGNAS(8) DepthStencilAttachment { Format format{Format::UNKNOWN}; - SampleCount sampleCount{SampleCount::ONE}; + SampleCount sampleCount{SampleCount::X1}; LoadOp depthLoadOp{LoadOp::CLEAR}; StoreOp depthStoreOp{StoreOp::STORE}; LoadOp stencilLoadOp{LoadOp::CLEAR}; @@ -1327,6 +1334,7 @@ using SubpassDependencyList = ccstd::vector; struct RenderPassInfo { ColorAttachmentList colorAttachments; DepthStencilAttachment depthStencilAttachment; + DepthStencilAttachment depthStencilResolveAttachment; SubpassInfoList subpasses; SubpassDependencyList dependencies; @@ -1386,6 +1394,7 @@ struct FramebufferInfo { RenderPass *renderPass{nullptr}; TextureList colorTextures; Texture *depthStencilTexture{nullptr}; // @ts-nullable + Texture *depthStencilResolveTexture{nullptr}; // @ts-nullable EXPOSE_COPY_FN(FramebufferInfo) }; diff --git a/native/cocos/renderer/gfx-base/GFXDef.cpp b/native/cocos/renderer/gfx-base/GFXDef.cpp index c7e35253f44..00a9bc6873e 100644 --- a/native/cocos/renderer/gfx-base/GFXDef.cpp +++ b/native/cocos/renderer/gfx-base/GFXDef.cpp @@ -107,6 +107,7 @@ ccstd::hash_t Hasher::operator()(const RenderPassInfo &info) con ccstd::hash_t seed = 4; ccstd::hash_combine(seed, info.colorAttachments); ccstd::hash_combine(seed, info.depthStencilAttachment); + ccstd::hash_combine(seed, info.depthStencilResolveAttachment); ccstd::hash_combine(seed, info.subpasses); ccstd::hash_combine(seed, info.dependencies); return seed; @@ -115,6 +116,7 @@ ccstd::hash_t Hasher::operator()(const RenderPassInfo &info) con bool operator==(const RenderPassInfo &lhs, const RenderPassInfo &rhs) { return lhs.colorAttachments == rhs.colorAttachments && lhs.depthStencilAttachment == rhs.depthStencilAttachment && + lhs.depthStencilResolveAttachment == rhs.depthStencilResolveAttachment && lhs.subpasses == rhs.subpasses && lhs.dependencies == rhs.dependencies; } @@ -122,19 +124,17 @@ bool operator==(const RenderPassInfo &lhs, const RenderPassInfo &rhs) { template <> ccstd::hash_t Hasher::operator()(const FramebufferInfo &info) const { // render pass is mostly irrelevant - ccstd::hash_t seed; + ccstd::hash_t seed = static_cast(info.colorTextures.size()) + + static_cast(info.depthStencilTexture != nullptr) + + static_cast(info.depthStencilResolveTexture != nullptr); if (info.depthStencilTexture) { - seed = (static_cast(info.colorTextures.size()) + 1) * 3 + 1; - ccstd::hash_combine(seed, info.depthStencilTexture); - ccstd::hash_combine(seed, info.depthStencilTexture->getRaw()); - ccstd::hash_combine(seed, info.depthStencilTexture->getHash()); - } else { - seed = static_cast(info.colorTextures.size()) * 3 + 1; + ccstd::hash_combine(seed, info.depthStencilTexture->getObjectID()); + } + if (info.depthStencilResolveTexture) { + ccstd::hash_combine(seed, info.depthStencilResolveTexture->getObjectID()); } for (auto *colorTexture : info.colorTextures) { - ccstd::hash_combine(seed, colorTexture); - ccstd::hash_combine(seed, colorTexture->getRaw()); - ccstd::hash_combine(seed, colorTexture->getHash()); + ccstd::hash_combine(seed, colorTexture->getObjectID()); } ccstd::hash_combine(seed, info.renderPass->getHash()); return seed; @@ -149,6 +149,10 @@ bool operator==(const FramebufferInfo &lhs, const FramebufferInfo &rhs) { res = lhs.depthStencilTexture == rhs.depthStencilTexture; } + if (res) { + res = lhs.depthStencilResolveTexture == rhs.depthStencilResolveTexture; + } + if (res) { for (size_t i = 0; i < lhs.colorTextures.size(); ++i) { res = lhs.colorTextures[i]->getRaw() == rhs.colorTextures[i]->getRaw() && diff --git a/native/cocos/renderer/gfx-base/GFXDevice.cpp b/native/cocos/renderer/gfx-base/GFXDevice.cpp index c8e8805d26a..a19e4da5198 100644 --- a/native/cocos/renderer/gfx-base/GFXDevice.cpp +++ b/native/cocos/renderer/gfx-base/GFXDevice.cpp @@ -154,7 +154,7 @@ DefaultResource::DefaultResource(Device *device) { if (device->getCapabilities().max3DTextureSize >= 2) { _texture3D = device->createTexture({TextureType::TEX3D, TextureUsageBit::STORAGE | TextureUsageBit::SAMPLED | TextureUsageBit::TRANSFER_DST, - Format::RGBA8, 2, 2, TextureFlagBit::NONE, 1, 1, SampleCount::ONE, 2}); + Format::RGBA8, 2, 2, TextureFlagBit::NONE, 1, 1, SampleCount::X1, 2}); BufferTextureCopy region = {0, 0, 0, {0, 0, 0}, {2, 2, 2}, {0, 0, 1}}; device->copyBuffersToTexture(&bufferData, _texture3D, ®ion, 1); } diff --git a/native/cocos/renderer/gfx-base/GFXDevice.h b/native/cocos/renderer/gfx-base/GFXDevice.h index 9ab7df85557..e59e8c5041e 100644 --- a/native/cocos/renderer/gfx-base/GFXDevice.h +++ b/native/cocos/renderer/gfx-base/GFXDevice.h @@ -122,6 +122,12 @@ class CC_DLL Device : public RefCounted { void registerOnAcquireCallback(ExecuteMethod &&execute); virtual void enableAutoBarrier(bool en) { _options.enableBarrierDeduce = en; } + virtual SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + std::ignore = format; + std::ignore = usage; + std::ignore = flags; + return SampleCount::X1; + }; protected: static Device *instance; diff --git a/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp b/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp index 1fd8b6cce16..dfbdd20430c 100644 --- a/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp +++ b/native/cocos/renderer/gfx-base/GFXFramebuffer.cpp @@ -44,6 +44,7 @@ void Framebuffer::initialize(const FramebufferInfo &info) { _renderPass = info.renderPass; _colorTextures = info.colorTextures; _depthStencilTexture = info.depthStencilTexture; + _depthStencilResolveTexture = info.depthStencilResolveTexture; doInit(info); } @@ -54,6 +55,7 @@ void Framebuffer::destroy() { _renderPass = nullptr; _colorTextures.clear(); _depthStencilTexture = nullptr; + _depthStencilResolveTexture = nullptr; } } // namespace gfx diff --git a/native/cocos/renderer/gfx-base/GFXFramebuffer.h b/native/cocos/renderer/gfx-base/GFXFramebuffer.h index 01a8b3a925b..21125fc1607 100644 --- a/native/cocos/renderer/gfx-base/GFXFramebuffer.h +++ b/native/cocos/renderer/gfx-base/GFXFramebuffer.h @@ -45,6 +45,7 @@ class CC_DLL Framebuffer : public GFXObject, public RefCounted { inline RenderPass *getRenderPass() const { return _renderPass; } inline const TextureList &getColorTextures() const { return _colorTextures; } inline Texture *getDepthStencilTexture() const { return _depthStencilTexture; } + inline Texture *getDepthStencilResolveTexture() const { return _depthStencilResolveTexture; } protected: virtual void doInit(const FramebufferInfo &info) = 0; @@ -56,6 +57,7 @@ class CC_DLL Framebuffer : public GFXObject, public RefCounted { TextureList _colorTextures; // weak reference Texture *_depthStencilTexture{nullptr}; + Texture *_depthStencilResolveTexture{nullptr}; }; } // namespace gfx diff --git a/native/cocos/renderer/gfx-base/GFXRenderPass.cpp b/native/cocos/renderer/gfx-base/GFXRenderPass.cpp index 7dff13380dd..91cb468c246 100644 --- a/native/cocos/renderer/gfx-base/GFXRenderPass.cpp +++ b/native/cocos/renderer/gfx-base/GFXRenderPass.cpp @@ -44,8 +44,8 @@ ccstd::hash_t RenderPass::computeHash() { for (const ColorAttachment &ca : _colorAttachments) { ccstd::hash_combine(seed, ca); } - const auto &ds = _depthStencilAttachment; - ccstd::hash_combine(seed, ds); + ccstd::hash_combine(seed, _depthStencilAttachment); + ccstd::hash_combine(seed, _depthStencilResolveAttachment); ccstd::hash_combine(seed, _subpasses); return seed; @@ -58,6 +58,7 @@ ccstd::hash_t RenderPass::computeHash(const RenderPassInfo &info) { void RenderPass::initialize(const RenderPassInfo &info) { _colorAttachments = info.colorAttachments; _depthStencilAttachment = info.depthStencilAttachment; + _depthStencilResolveAttachment = info.depthStencilResolveAttachment; _subpasses = info.subpasses; _dependencies = info.dependencies; _hash = computeHash(); diff --git a/native/cocos/renderer/gfx-base/GFXRenderPass.h b/native/cocos/renderer/gfx-base/GFXRenderPass.h index 12d606ecf6a..f51502c6326 100644 --- a/native/cocos/renderer/gfx-base/GFXRenderPass.h +++ b/native/cocos/renderer/gfx-base/GFXRenderPass.h @@ -42,6 +42,7 @@ class CC_DLL RenderPass : public GFXObject, public RefCounted { inline const ColorAttachmentList &getColorAttachments() const { return _colorAttachments; } inline const DepthStencilAttachment &getDepthStencilAttachment() const { return _depthStencilAttachment; } + inline const DepthStencilAttachment &getDepthStencilResolveAttachment() const { return _depthStencilResolveAttachment; } inline const SubpassInfoList &getSubpasses() const { return _subpasses; } inline const SubpassDependencyList &getDependencies() const { return _dependencies; } inline ccstd::hash_t getHash() const { return _hash; } @@ -54,6 +55,7 @@ class CC_DLL RenderPass : public GFXObject, public RefCounted { ColorAttachmentList _colorAttachments; DepthStencilAttachment _depthStencilAttachment; + DepthStencilAttachment _depthStencilResolveAttachment; SubpassInfoList _subpasses; SubpassDependencyList _dependencies; ccstd::hash_t _hash = 0; diff --git a/native/cocos/renderer/gfx-base/GFXTexture.cpp b/native/cocos/renderer/gfx-base/GFXTexture.cpp index d8b6a7cde05..0f1a7c2c14d 100644 --- a/native/cocos/renderer/gfx-base/GFXTexture.cpp +++ b/native/cocos/renderer/gfx-base/GFXTexture.cpp @@ -128,11 +128,11 @@ void Texture::updateTextureInfo(const SwapchainTextureInfo &info, Texture *out) out->_info.layerCount = 1; out->_info.levelCount = 1; out->_info.depth = 1; - out->_info.samples = SampleCount::ONE; + out->_info.samples = SampleCount::X1; out->_info.flags = TextureFlagBit::NONE; - out->_info.usage = GFX_FORMAT_INFOS[toNumber(info.format)].hasDepth + out->_info.usage = TextureUsageBit::SAMPLED | (GFX_FORMAT_INFOS[toNumber(info.format)].hasDepth ? TextureUsageBit::DEPTH_STENCIL_ATTACHMENT - : TextureUsageBit::COLOR_ATTACHMENT; + : TextureUsageBit::COLOR_ATTACHMENT); out->_swapchain = info.swapchain; out->_size = formatSize(info.format, info.width, info.height, 1); out->_hash = computeHash(out); diff --git a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp index 8db04e5f6fc..8c2e17a36b1 100644 --- a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.cpp @@ -99,6 +99,9 @@ void EmptyCommandBuffer::blitTexture(Texture *srcTexture, Texture *dstTexture, c void EmptyCommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { } +void EmptyCommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { +} + void EmptyCommandBuffer::dispatch(const DispatchInfo &info) { } diff --git a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h index f83d684b098..d429d23f61c 100644 --- a/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h +++ b/native/cocos/renderer/gfx-empty/EmptyCommandBuffer.h @@ -52,6 +52,7 @@ class CC_DLL EmptyCommandBuffer final : public CommandBuffer { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override; void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const *buffers, uint32_t bufferCount, const TextureBarrier *const *textureBarriers, const Texture *const *textures, uint32_t textureBarrierCount) override; diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp index 5ee07a69a7c..daaf4efc6e9 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.cpp @@ -316,6 +316,10 @@ void GLES2CommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, c // should not copy texture in a secondary command buffer } +void GLES2CommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + // should not copy texture in a secondary command buffer +} + void GLES2CommandBuffer::blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) { GLES2CmdBlitTexture *cmd = _cmdAllocator->blitTextureCmdPool.alloc(); if (srcTexture) cmd->gpuTextureSrc = static_cast(srcTexture)->gpuTexture(); diff --git a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h index 20e948ecbcf..06185861895 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2CommandBuffer.h @@ -64,6 +64,7 @@ class CC_GLES2_API GLES2CommandBuffer : public CommandBuffer { void updateBuffer(Buffer *buff, const void *data, uint32_t size) override; void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override {} diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp index 2d7b38666fd..1d9ca68f441 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.cpp @@ -574,22 +574,13 @@ void cmdFuncGLES2CreateTexture(GLES2Device *device, GLES2GPUTexture *gpuTexture) gpuTexture->glFormat = mapGLFormat(gpuTexture->format); gpuTexture->glType = formatToGLType(gpuTexture->format); gpuTexture->glInternalFmt = mapGLInternalFormat(gpuTexture->format); + gpuTexture->glSamples = static_cast(gpuTexture->samples); - if (gpuTexture->samples > SampleCount::ONE) { - if (device->constantRegistry()->mMSRT != MSRTSupportLevel::NONE) { - GLint maxSamples; - glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSamples); - - auto requestedSampleCount = static_cast(gpuTexture->samples); - gpuTexture->glSamples = std::min(maxSamples, requestedSampleCount); - - // skip multi-sampled attachment resources if we can use auto resolve - if (gpuTexture->usage == TextureUsageBit::COLOR_ATTACHMENT) { - gpuTexture->memoryless = true; - return; - } - } else { - gpuTexture->glSamples = 1; // fallback to single sample if the extensions is not available + if (gpuTexture->samples > SampleCount::X1) { + if (device->constantRegistry()->mMSRT != MSRTSupportLevel::NONE && + hasFlag(gpuTexture->flags, TextureFlagBit::LAZILY_ALLOCATED)) { + gpuTexture->memoryAllocated = false; + return; } } @@ -810,7 +801,7 @@ void cmdFuncGLES2DestroyTexture(GLES2Device *device, GLES2GPUTexture *gpuTexture } void cmdFuncGLES2ResizeTexture(GLES2Device *device, GLES2GPUTexture *gpuTexture) { - if (gpuTexture->memoryless || gpuTexture->glTarget == GL_TEXTURE_EXTERNAL_OES) return; + if (!gpuTexture->memoryAllocated || gpuTexture->glTarget == GL_TEXTURE_EXTERNAL_OES) return; if (gpuTexture->glSamples <= 1) { switch (gpuTexture->type) { @@ -3042,6 +3033,12 @@ void cmdFuncGLES2ExecuteCmds(GLES2Device *device, GLES2CmdPackage *cmdPackage) { } } +GLint cmdFuncGLES2GetMaxSampleCount() { + GLint maxSamples = 1; + GL_CHECK(glGetIntegerv(GL_MAX_SAMPLES_EXT, &maxSamples)); + return maxSamples; +} + void GLES2GPUBlitManager::initialize() { _gpuShader.name = "Blit Pass"; _gpuShader.blocks.push_back({ diff --git a/native/cocos/renderer/gfx-gles2/GLES2Commands.h b/native/cocos/renderer/gfx-gles2/GLES2Commands.h index e87736708f9..670b8e3ae34 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Commands.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Commands.h @@ -246,5 +246,7 @@ void cmdFuncGLES2BlitTexture(GLES2Device *device, void cmdFuncGLES2ExecuteCmds(GLES2Device *device, GLES2CmdPackage *cmdPackage); +GLint cmdFuncGLES2GetMaxSampleCount(); + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-gles2/GLES2Device.cpp b/native/cocos/renderer/gfx-gles2/GLES2Device.cpp index 77404c2c066..38d0864da4b 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Device.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Device.cpp @@ -176,6 +176,7 @@ bool GLES2Device::doInit(const DeviceInfo & /*info*/) { } } #endif + _features[toNumber(Feature::MULTI_SAMPLE_RESOLVE_DEPTH_STENCIL)] = false; // not implement yet. ccstd::string compressedFmts; if (getFormatFeatures(Format::ETC_RGB8) != FormatFeature::NONE) { @@ -534,5 +535,12 @@ void GLES2Device::copyTextureToBuffers(Texture *src, uint8_t *const *buffers, co cmdFuncGLES2CopyTextureToBuffers(this, static_cast(src)->gpuTexture(), buffers, region, count); } +SampleCount GLES2Device::getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + std::ignore = format; + std::ignore = usage; + std::ignore = flags; + return static_cast(cmdFuncGLES2GetMaxSampleCount()); +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-gles2/GLES2Device.h b/native/cocos/renderer/gfx-gles2/GLES2Device.h index 44867f653a8..0b7269005f0 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Device.h +++ b/native/cocos/renderer/gfx-gles2/GLES2Device.h @@ -95,7 +95,7 @@ class CC_GLES2_API GLES2Device final : public Device { // check the specified format is texture-exclusive (no renderbuffers allowed) inline bool isTextureExclusive(const Format &format) { return _textureExclusive[static_cast(format)]; }; - + SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const override; protected: static GLES2Device *instance; diff --git a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h index 31057eec95b..99ce522f08d 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h +++ b/native/cocos/renderer/gfx-gles2/GLES2GPUObjects.h @@ -118,10 +118,10 @@ struct GLES2GPUTexture { uint32_t size{0}; uint32_t arrayLayer{1}; uint32_t mipLevel{1}; - SampleCount samples{SampleCount::ONE}; + SampleCount samples{SampleCount::X1}; TextureFlags flags{TextureFlagBit::NONE}; bool isPowerOf2{false}; - bool memoryless{false}; + bool memoryAllocated{true}; // false if swapchain image or implicit ms render buffer. GLenum glTarget{0}; GLenum glInternalFmt{0}; GLenum glFormat{0}; diff --git a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp index 6336745e101..1c3832849a8 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.cpp @@ -149,6 +149,10 @@ void GLES2PrimaryCommandBuffer::copyBuffersToTexture(const uint8_t *const *buffe } } +void GLES2PrimaryCommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + copyTexture(srcTexture, dstTexture, regions, count); +} + void GLES2PrimaryCommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { GLES2GPUTexture *gpuTextureSrc = nullptr; GLES2GPUTexture *gpuTextureDst = nullptr; diff --git a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h index 358b3de968f..2a3411c9eef 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h +++ b/native/cocos/renderer/gfx-gles2/GLES2PrimaryCommandBuffer.h @@ -46,6 +46,7 @@ class CC_GLES2_API GLES2PrimaryCommandBuffer final : public GLES2CommandBuffer { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; protected: diff --git a/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp b/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp index ad127f1557c..2656dff1b46 100644 --- a/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp +++ b/native/cocos/renderer/gfx-gles2/GLES2Texture.cpp @@ -59,7 +59,7 @@ void GLES2Texture::doInit(const TextureInfo & /*info*/) { cmdFuncGLES2CreateTexture(GLES2Device::getInstance(), _gpuTexture); - if (!_gpuTexture->memoryless) { + if (_gpuTexture->memoryAllocated) { GLES2Device::getInstance()->getMemoryStatus().textureSize += _size; CC_PROFILE_MEMORY_INC(Texture, _size); } @@ -72,7 +72,7 @@ void GLES2Texture::doInit(const TextureViewInfo &info) { void GLES2Texture::doDestroy() { if (_gpuTexture) { if (!_isTextureView) { - if (!_gpuTexture->memoryless) { + if (_gpuTexture->memoryAllocated) { GLES2Device::getInstance()->getMemoryStatus().textureSize -= _size; CC_PROFILE_MEMORY_DEC(Texture, _size); } @@ -85,7 +85,7 @@ void GLES2Texture::doDestroy() { } void GLES2Texture::doResize(uint32_t width, uint32_t height, uint32_t size) { - if (!_gpuTexture->memoryless) { + if (_gpuTexture->memoryAllocated) { GLES2Device::getInstance()->getMemoryStatus().textureSize -= _size; CC_PROFILE_MEMORY_DEC(Texture, _size); } @@ -97,7 +97,7 @@ void GLES2Texture::doResize(uint32_t width, uint32_t height, uint32_t size) { GLES2Device::getInstance()->framebufferHub()->update(_gpuTexture); - if (!_gpuTexture->memoryless) { + if (_gpuTexture->memoryAllocated) { GLES2Device::getInstance()->getMemoryStatus().textureSize += size; CC_PROFILE_MEMORY_INC(Texture, size); } @@ -135,7 +135,7 @@ void GLES2Texture::doInit(const SwapchainTextureInfo & /*info*/) { _gpuTexture->samples = _info.samples; _gpuTexture->flags = _info.flags; _gpuTexture->size = _size; - _gpuTexture->memoryless = true; + _gpuTexture->memoryAllocated = false; _gpuTexture->swapchain = static_cast(_swapchain)->gpuSwapchain(); } diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp index 6066660b980..706dd795a59 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.cpp @@ -303,6 +303,10 @@ void GLES3CommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, c // should not copy texture in a secondary command buffer } +void GLES3CommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + // should not resolve texture in a secondary command buffer +} + void GLES3CommandBuffer::blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) { GLES3CmdBlitTexture *cmd = _cmdAllocator->blitTextureCmdPool.alloc(); if (srcTexture) cmd->gpuTextureSrc = static_cast(srcTexture)->gpuTexture(); diff --git a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h index 594a8e059f4..d42b50d43bc 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3CommandBuffer.h @@ -64,6 +64,7 @@ class CC_GLES3_API GLES3CommandBuffer : public CommandBuffer { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override; void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const * /*buffers*/, uint32_t bufferBarrierCount, const TextureBarrier *const *textureBarriers, const Texture *const * /*textures*/, uint32_t textureBarrierCount) override; diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp index a4ba060a41e..afddfc2d1a7 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.cpp @@ -491,6 +491,18 @@ GLenum formatToGLType(Format format) { } } +GLenum getTextureTarget(TextureType type) { + switch (type) { + case TextureType::TEX2D: return GL_TEXTURE_2D; + case TextureType::TEX2D_ARRAY: return GL_TEXTURE_2D_ARRAY; + case TextureType::TEX3D: return GL_TEXTURE_3D; + case TextureType::CUBE: return GL_TEXTURE_CUBE_MAP; + default: + CC_ABORT(); + return GL_NONE; + } +} + uint32_t glComponentCount(GLenum glType) { switch (glType) { case GL_FLOAT_MAT2: @@ -575,17 +587,6 @@ const GLenum GL_MEMORY_ACCESS[] = { GL_WRITE_ONLY, GL_READ_WRITE, }; - -const GLint GL_SAMPLE_COUNT[] = { - 1, - 2, -#if CC_PLATFORM == CC_PLATFORM_ANDROID || CC_PLATFORM == CC_PLATFORM_IOS - 4, -#else - 8, -#endif - 16, -}; } // namespace void cmdFuncGLES3CreateBuffer(GLES3Device *device, GLES3GPUBuffer *gpuBuffer) { @@ -800,31 +801,77 @@ void cmdFuncGLES3ResizeBuffer(GLES3Device *device, GLES3GPUBuffer *gpuBuffer) { } } -void cmdFuncGLES3CreateTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture) { - static ccstd::vector supportedSampleCounts; +static void renderBufferStorage(GLES3Device *device, GLES3GPUTexture *gpuTexture) { + CC_ASSERT(gpuTexture->type == TextureType::TEX2D); + GLuint &glRenderbuffer = device->stateCache()->glRenderbuffer; + if (gpuTexture->glRenderbuffer != glRenderbuffer) { + GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, gpuTexture->glRenderbuffer)); + glRenderbuffer = gpuTexture->glRenderbuffer; + } + if (gpuTexture->glSamples > 1) { + GL_CHECK(glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, gpuTexture->glSamples, gpuTexture->glInternalFmt, gpuTexture->width, gpuTexture->height)); + } else { + GL_CHECK(glRenderbufferStorage(GL_RENDERBUFFER, gpuTexture->glInternalFmt, gpuTexture->width, gpuTexture->height)); + } +} + +static void textureStorage(GLES3Device *device, GLES3GPUTexture *gpuTexture) { + GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; + + if (gpuTexture->glTexture != glTexture) { + GL_CHECK(glBindTexture(gpuTexture->glTarget, gpuTexture->glTexture)); + glTexture = gpuTexture->glTexture; + } + uint32_t w = gpuTexture->width; + uint32_t h = gpuTexture->height; + uint32_t d = gpuTexture->type == TextureType::TEX2D_ARRAY ? gpuTexture->arrayLayer : gpuTexture->depth; + + switch (gpuTexture->type) { + case TextureType::CUBE: + CC_ASSERT(gpuTexture->glSamples <= 1); + case TextureType::TEX2D: + if (gpuTexture->glSamples > 1 && !gpuTexture->immutable && device->constantRegistry()->glMinorVersion >= 1) { + gpuTexture->glTarget = GL_TEXTURE_2D_MULTISAMPLE; + GL_CHECK(glTexStorage2DMultisample(gpuTexture->glTarget, gpuTexture->glSamples, gpuTexture->glInternalFmt, w, h, GL_FALSE)); + } else { + GL_CHECK(glTexStorage2D(gpuTexture->glTarget, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h)); + } + break; + case TextureType::TEX3D: + CC_ASSERT(gpuTexture->glSamples <= 1); + case TextureType::TEX2D_ARRAY: + if (gpuTexture->glSamples > 1 && !gpuTexture->immutable && device->constantRegistry()->glMinorVersion >= 1) { + gpuTexture->glTarget = GL_TEXTURE_2D_MULTISAMPLE_ARRAY; + GL_CHECK(glTexStorage3DMultisample(gpuTexture->glTarget, gpuTexture->glSamples, gpuTexture->glInternalFmt, w, h, d, GL_FALSE)); + } else { + GL_CHECK(glTexStorage3D(gpuTexture->glTarget, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h, d)); + } + break; + default: + break; + } +} +static bool useRenderBuffer(const GLES3Device *device, Format format, TextureUsage usage) { + return !device->isTextureExclusive(format) && + hasAllFlags(TextureUsage::COLOR_ATTACHMENT | TextureUsage::DEPTH_STENCIL_ATTACHMENT, usage); +} + +void cmdFuncGLES3CreateTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture) { gpuTexture->glInternalFmt = mapGLInternalFormat(gpuTexture->format); gpuTexture->glFormat = mapGLFormat(gpuTexture->format); gpuTexture->glType = formatToGLType(gpuTexture->format); - if (gpuTexture->samples > SampleCount::ONE) { - GLint supportedSampleCountCount = 0; - GL_CHECK(glGetInternalformativ(GL_RENDERBUFFER, gpuTexture->glInternalFmt, GL_SAMPLES, 1, &supportedSampleCountCount)); - supportedSampleCounts.resize(supportedSampleCountCount); - GL_CHECK(glGetInternalformativ(GL_RENDERBUFFER, gpuTexture->glInternalFmt, GL_SAMPLES, supportedSampleCountCount, supportedSampleCounts.data())); - - auto requestedSampleCount = GL_SAMPLE_COUNT[toNumber(gpuTexture->samples)]; - for (GLint sampleCount : supportedSampleCounts) { - if (sampleCount <= requestedSampleCount) { - gpuTexture->glSamples = sampleCount; - break; - } - } + bool supportRenderBufferMS = device->constantRegistry()->mMSRT > MSRTSupportLevel::NONE; + gpuTexture->useRenderBuffer = useRenderBuffer(device, gpuTexture->format, gpuTexture->usage) && + (gpuTexture->glSamples <= 1 || supportRenderBufferMS); - // skip multi-sampled attachment resources if we can use auto resolve - if (device->constantRegistry()->mMSRT != MSRTSupportLevel::NONE && - gpuTexture->usage == TextureUsageBit::COLOR_ATTACHMENT) { - gpuTexture->memoryless = true; + if (gpuTexture->glSamples > 1) { + // Allocate render buffer when binding a framebuffer if the MSRT extension is not present. + if (gpuTexture->useRenderBuffer && + hasFlag(gpuTexture->flags, TextureFlagBit::LAZILY_ALLOCATED)) { + gpuTexture->glTarget = GL_RENDERBUFFER; + gpuTexture->memoryAllocated = false; return; } } @@ -838,97 +885,18 @@ void cmdFuncGLES3CreateTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture) return; } - if (!device->isTextureExclusive(gpuTexture->format) && (gpuTexture->glSamples > 1 || hasAllFlags(TextureUsage::COLOR_ATTACHMENT | TextureUsage::DEPTH_STENCIL_ATTACHMENT, gpuTexture->usage))) { - switch (gpuTexture->type) { - case TextureType::TEX2D: { - gpuTexture->glTarget = GL_RENDERBUFFER; - GL_CHECK(glGenRenderbuffers(1, &gpuTexture->glRenderbuffer)); - if (gpuTexture->size > 0) { - GLuint &glRenderbuffer = device->stateCache()->glRenderbuffer; - if (gpuTexture->glRenderbuffer != glRenderbuffer) { - GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, gpuTexture->glRenderbuffer)); - glRenderbuffer = gpuTexture->glRenderbuffer; - } - if (gpuTexture->glSamples > 1) { - GL_CHECK(glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, gpuTexture->glSamples, gpuTexture->glInternalFmt, gpuTexture->width, gpuTexture->height)); - } else { - GL_CHECK(glRenderbufferStorage(GL_RENDERBUFFER, gpuTexture->glInternalFmt, gpuTexture->width, gpuTexture->height)); - } - } - break; - } - default: - CC_ABORT(); - break; - } + if (gpuTexture->size == 0) { + return; + } + + if (gpuTexture->useRenderBuffer) { + gpuTexture->glTarget = GL_RENDERBUFFER; + GL_CHECK(glGenRenderbuffers(1, &gpuTexture->glRenderbuffer)); + renderBufferStorage(device, gpuTexture); } else { - switch (gpuTexture->type) { - case TextureType::TEX2D: { - gpuTexture->glTarget = GL_TEXTURE_2D; - GL_CHECK(glGenTextures(1, &gpuTexture->glTexture)); - if (gpuTexture->size > 0) { - GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; - if (gpuTexture->glTexture != glTexture) { - GL_CHECK(glBindTexture(GL_TEXTURE_2D, gpuTexture->glTexture)); - glTexture = gpuTexture->glTexture; - } - uint32_t w = gpuTexture->width; - uint32_t h = gpuTexture->height; - GL_CHECK(glTexStorage2D(GL_TEXTURE_2D, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h)); - } - break; - } - case TextureType::TEX2D_ARRAY: { - gpuTexture->glTarget = GL_TEXTURE_2D_ARRAY; - GL_CHECK(glGenTextures(1, &gpuTexture->glTexture)); - if (gpuTexture->size > 0) { - GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; - if (gpuTexture->glTexture != glTexture) { - GL_CHECK(glBindTexture(GL_TEXTURE_2D_ARRAY, gpuTexture->glTexture)); - glTexture = gpuTexture->glTexture; - } - uint32_t w = gpuTexture->width; - uint32_t h = gpuTexture->height; - uint32_t d = gpuTexture->arrayLayer; - GL_CHECK(glTexStorage3D(GL_TEXTURE_2D_ARRAY, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h, d)); - } - break; - } - case TextureType::TEX3D: { - gpuTexture->glTarget = GL_TEXTURE_3D; - GL_CHECK(glGenTextures(1, &gpuTexture->glTexture)); - if (gpuTexture->size > 0) { - GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; - if (gpuTexture->glTexture != glTexture) { - GL_CHECK(glBindTexture(GL_TEXTURE_3D, gpuTexture->glTexture)); - glTexture = gpuTexture->glTexture; - } - uint32_t w = gpuTexture->width; - uint32_t h = gpuTexture->height; - uint32_t d = gpuTexture->depth; - GL_CHECK(glTexStorage3D(GL_TEXTURE_3D, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h, d)); - } - break; - } - case TextureType::CUBE: { - gpuTexture->glTarget = GL_TEXTURE_CUBE_MAP; - GL_CHECK(glGenTextures(1, &gpuTexture->glTexture)); - if (gpuTexture->size > 0) { - GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; - if (gpuTexture->glTexture != glTexture) { - GL_CHECK(glBindTexture(GL_TEXTURE_CUBE_MAP, gpuTexture->glTexture)); - glTexture = gpuTexture->glTexture; - } - uint32_t w = gpuTexture->width; - uint32_t h = gpuTexture->height; - GL_CHECK(glTexStorage2D(GL_TEXTURE_CUBE_MAP, gpuTexture->mipLevel, gpuTexture->glInternalFmt, w, h)); - } - break; - } - default: - CC_ABORT(); - break; - } + gpuTexture->glTarget = getTextureTarget(gpuTexture->type); + GL_CHECK(glGenTextures(1, &gpuTexture->glTexture)); + textureStorage(device, gpuTexture); } } @@ -957,36 +925,18 @@ void cmdFuncGLES3DestroyTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture } void cmdFuncGLES3ResizeTexture(GLES3Device *device, GLES3GPUTexture *gpuTexture) { - if (gpuTexture->memoryless || hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_OES) || + if (!gpuTexture->memoryAllocated || + hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_OES) || hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_NORMAL)) { return; } - if (gpuTexture->glSamples <= 1) { + if (!gpuTexture->useRenderBuffer) { // immutable by default cmdFuncGLES3DestroyTexture(device, gpuTexture); cmdFuncGLES3CreateTexture(device, gpuTexture); - } else { - switch (gpuTexture->type) { - case TextureType::TEX2D: { - if (gpuTexture->size > 0) { - GLuint &glRenderbuffer = device->stateCache()->glRenderbuffer; - if (gpuTexture->glRenderbuffer != glRenderbuffer) { - GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, gpuTexture->glRenderbuffer)); - glRenderbuffer = gpuTexture->glRenderbuffer; - } - if (gpuTexture->glSamples > 1) { - GL_CHECK(glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER, gpuTexture->glSamples, gpuTexture->glInternalFmt, gpuTexture->width, gpuTexture->height)); - } else { - GL_CHECK(glRenderbufferStorage(GL_RENDERBUFFER, gpuTexture->glInternalFmt, gpuTexture->width, gpuTexture->height)); - } - } - break; - } - default: - CC_ABORT(); - break; - } + } else if (gpuTexture->size > 0){ + renderBufferStorage(device, gpuTexture); } } @@ -1450,6 +1400,10 @@ void cmdFuncGLES3CreateRenderPass(GLES3Device * /*device*/, GLES3GPURenderPass * } for (auto &resolve : sub.resolves) { + if (resolve == INVALID_BINDING) { + gpuRenderPass->resolves.emplace_back(resolve); + continue; + } auto &index = gpuRenderPass->indices[resolve]; if (index == INVALID_BINDING) { index = static_cast(gpuRenderPass->resolves.size()); @@ -1458,6 +1412,7 @@ void cmdFuncGLES3CreateRenderPass(GLES3Device * /*device*/, GLES3GPURenderPass * } gpuRenderPass->depthStencil = sub.depthStencil; + gpuRenderPass->depthStencilResolve = sub.depthStencilResolve; } } @@ -1514,187 +1469,168 @@ void cmdFuncGLES3DestroyInputAssembler(GLES3Device *device, GLES3GPUInputAssembl gpuInputAssembler->glVAOs.clear(); } -static GLES3GPUFramebuffer::GLFramebufferInfo doCreateFramebuffer(GLES3Device *device, - const ccstd::vector &attachments, const uint32_t *colors, size_t colorCount, - const GLES3GPUTextureView *depthStencilView, - const uint32_t *resolves = nullptr, - const GLES3GPUTextureView *depthStencilResolveView = nullptr, - GLbitfield *resolveMask = nullptr) { - static ccstd::vector drawBuffers; - GLES3GPUStateCache *cache = device->stateCache(); - GLES3GPUFramebuffer::GLFramebufferInfo res; - - GL_CHECK(glGenFramebuffers(1, &res.glFramebuffer)); - if (cache->glDrawFramebuffer != res.glFramebuffer) { - GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, res.glFramebuffer)); - cache->glDrawFramebuffer = res.glFramebuffer; - } - - drawBuffers.clear(); - - auto supportLevel = device->constantRegistry()->mMSRT; - bool autoResolve = supportLevel > MSRTSupportLevel::LEVEL1 || (supportLevel != MSRTSupportLevel::NONE && colorCount <= 1); - - for (size_t j = 0; j < colorCount; ++j) { - GLES3GPUTextureView *gpuColorTextureView = attachments[colors[j]]; - GLES3GPUTextureView *gpuResolveTextureView = resolves ? attachments[resolves[j]] : nullptr; - GLES3GPUTexture *gpuColorTexture = gpuColorTextureView->gpuTexture; - GLES3GPUTexture *gpuResolveTexture = resolves ? gpuResolveTextureView->gpuTexture : nullptr; - - drawBuffers.push_back(static_cast(GL_COLOR_ATTACHMENT0 + j)); - - if (gpuResolveTexture) { - if (autoResolve) { - GL_CHECK(glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, static_cast(GL_COLOR_ATTACHMENT0 + j), - gpuResolveTexture->glTarget, gpuResolveTexture->glTexture, - gpuResolveTextureView->baseLevel, gpuColorTexture->glSamples)); +static GLES3GPUSwapchain *getSwapchainIfExists(const ccstd::vector &textureViews, const uint32_t *indices, size_t count) { + GLES3GPUSwapchain *swapchain{nullptr}; + if (indices) { + for (size_t i = 0; i < count; ++i) { + if (indices[i] == INVALID_BINDING) { continue; } - *resolveMask |= GL_COLOR_BUFFER_BIT; // fallback to blit-based manual resolve - } - if (gpuColorTexture) { - if (gpuColorTexture->glTexture) { - GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, static_cast(GL_COLOR_ATTACHMENT0 + j), - gpuColorTexture->glTarget, gpuColorTexture->glTexture, gpuColorTextureView->baseLevel)); - } else { - GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, static_cast(GL_COLOR_ATTACHMENT0 + j), - gpuColorTexture->glTarget, gpuColorTexture->glRenderbuffer)); + auto *colorTexture = textureViews[indices[i]]->gpuTexture; + if (colorTexture->swapchain) { + swapchain = colorTexture->swapchain; } } - res.width = std::min(res.width, gpuColorTexture->width); - res.height = std::min(res.height, gpuColorTexture->height); } + return swapchain; +} - GLES3GPUTexture *depthStencil = depthStencilView ? depthStencilView->gpuTexture : nullptr; - GLES3GPUTexture *depthStencilResolve = depthStencilResolveView ? depthStencilResolveView->gpuTexture : nullptr; - if (depthStencil) { - bool hasStencil = GFX_FORMAT_INFOS[static_cast(depthStencil->format)].hasStencil; - GLenum glAttachment = hasStencil ? GL_DEPTH_STENCIL_ATTACHMENT : GL_DEPTH_ATTACHMENT; - if (depthStencil->glTexture) { - GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, glAttachment, depthStencil->glTarget, depthStencil->glTexture, depthStencilView->baseLevel)); - } else if (depthStencil->glRenderbuffer) { - GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, glAttachment, depthStencil->glTarget, depthStencil->glRenderbuffer)); - } - - // fallback to blit-based manual resolve - if (depthStencilResolve) *resolveMask |= hasStencil ? GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT : GL_DEPTH_BUFFER_BIT; - res.width = std::min(res.width, depthStencil->width >> depthStencilView->baseLevel); - res.height = std::min(res.height, depthStencil->height >> depthStencilView->baseLevel); +static GLbitfield getColorBufferMask(Format format) { + GLbitfield mask = 0U; + const FormatInfo &info = GFX_FORMAT_INFOS[toNumber(format)]; + if (info.hasDepth || info.hasStencil) { + if (info.hasDepth) mask |= GL_DEPTH_BUFFER_BIT; + if (info.hasStencil) mask |= GL_STENCIL_BUFFER_BIT; + } else { + mask = GL_COLOR_BUFFER_BIT; } + return mask; +} - // register to framebuffer caches - if (colorCount == 1) device->framebufferCacheMap()->registerExternal(res.glFramebuffer, attachments[colors[0]]->gpuTexture, 0); - if (depthStencil) device->framebufferCacheMap()->registerExternal(res.glFramebuffer, depthStencilView->gpuTexture, 0); +static void doResolve(GLES3Device *device, GLES3GPUFramebuffer *gpuFbo) { + device->context()->makeCurrent(gpuFbo->resolveFramebuffer.swapchain, gpuFbo->framebuffer.swapchain); + auto *cache = device->stateCache(); + auto width = gpuFbo->width; + auto height = gpuFbo->height; - GL_CHECK(glDrawBuffers(utils::toUint(drawBuffers.size()), drawBuffers.data())); + if (cache->glReadFramebuffer != gpuFbo->framebuffer.handle) { + GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, gpuFbo->framebuffer.handle)); + cache->glReadFramebuffer = gpuFbo->framebuffer.handle; + } - GLenum status; - GL_CHECK(status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER)); - if (status != GL_FRAMEBUFFER_COMPLETE) { - switch (status) { - case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: - CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_ATTACHMENT"); - break; - case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: - CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"); - break; - case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: - CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_DIMENSIONS"); - break; - case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: - CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"); - break; - case GL_FRAMEBUFFER_UNSUPPORTED: - CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_UNSUPPORTED"); - break; - default: - CC_LOG_ERROR("checkFramebufferStatus() - %x", status); - break; - } + if (cache->glDrawFramebuffer != gpuFbo->resolveFramebuffer.handle) { + GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, gpuFbo->resolveFramebuffer.handle)); + cache->glDrawFramebuffer = gpuFbo->resolveFramebuffer.handle; } - return res; -} + gpuFbo->resolveFramebuffer.processLoad(GL_DRAW_FRAMEBUFFER); -static GLES3GPUSwapchain *getSwapchainIfExists(const ccstd::vector &textureViews, const uint32_t *indices, size_t count) { - GLES3GPUSwapchain *swapchain{nullptr}; - if (indices) { - size_t offscreenCount{0}; - for (size_t i = 0; i < count; ++i) { - auto *colorTexture = textureViews[indices[i]]->gpuTexture; - if (colorTexture->swapchain) { - swapchain = colorTexture->swapchain; - } else { - ++offscreenCount; + if (!gpuFbo->colorBlitPairs.empty()) { + auto resolveColorNum = gpuFbo->resolveFramebuffer.colors.size(); + std::vector drawBuffers(resolveColorNum, GL_NONE); + for (auto &[src, dst] : gpuFbo->colorBlitPairs) { + drawBuffers[dst] = GL_COLOR_ATTACHMENT0 + dst; + GL_CHECK(glReadBuffer(GL_COLOR_ATTACHMENT0 + src)); + if (gpuFbo->resolveFramebuffer.handle != 0) { + GL_CHECK(glDrawBuffers(resolveColorNum, drawBuffers.data())); } + + GL_CHECK(glBlitFramebuffer( + 0, 0, width, height, + 0, 0, width, height, + GL_COLOR_BUFFER_BIT, GL_NEAREST)); + drawBuffers[dst] = GL_NONE; } - CC_ASSERT(!offscreenCount || offscreenCount == count); } - return swapchain; + if (gpuFbo->dsResolveMask != 0 && gpuFbo->resolveFramebuffer.handle != 0) { + GL_CHECK(glBlitFramebuffer( + 0, 0, width, height, + 0, 0, width, height, + gpuFbo->dsResolveMask, GL_NEAREST)); + } + + gpuFbo->framebuffer.processStore(GL_READ_FRAMEBUFFER); + gpuFbo->resolveFramebuffer.processStore(GL_DRAW_FRAMEBUFFER); } -static void doCreateFramebufferInstance(GLES3Device *device, GLES3GPUFramebuffer *gpuFBO, const ccstd::vector &colors, - uint32_t depthStencil, GLES3GPUFramebuffer::Framebuffer *outFBO, - const uint32_t *resolves = nullptr, uint32_t depthStencilResolve = INVALID_BINDING) { - GLES3GPUSwapchain *swapchain{getSwapchainIfExists(gpuFBO->gpuColorViews, colors.data(), colors.size())}; - if (!swapchain) { - const GLES3GPUTextureView *depthStencilTextureView = nullptr; - if (depthStencil != INVALID_BINDING) { - depthStencilTextureView = depthStencil < gpuFBO->gpuColorViews.size() - ? gpuFBO->gpuColorViews[depthStencil] - : gpuFBO->gpuDepthStencilView; - } - const GLES3GPUTextureView *depthStencilResolveTextureView = nullptr; - if (depthStencilResolve != INVALID_BINDING) { - depthStencilResolveTextureView = depthStencilResolve < gpuFBO->gpuColorViews.size() - ? gpuFBO->gpuColorViews[depthStencilResolve] - : gpuFBO->gpuDepthStencilView; - } - - outFBO->framebuffer.initialize(doCreateFramebuffer(device, gpuFBO->gpuColorViews, colors.data(), utils::toUint(colors.size()), - depthStencilTextureView, resolves, depthStencilResolveTextureView, &outFBO->resolveMask)); - if (outFBO->resolveMask) { - size_t resolveCount = outFBO->resolveMask & GL_COLOR_BUFFER_BIT ? utils::toUint(colors.size()) : 0U; - GLES3GPUSwapchain *resolveSwapchain{getSwapchainIfExists(gpuFBO->gpuColorViews, resolves, resolveCount)}; - if (!resolveSwapchain) { - outFBO->resolveFramebuffer.initialize(doCreateFramebuffer(device, gpuFBO->gpuColorViews, resolves, resolveCount, depthStencilResolveTextureView)); +void cmdFuncGLES3CreateFramebuffer(GLES3Device *device, GLES3GPUFramebuffer *gpuFBO) { + const auto *renderPass = gpuFBO->gpuRenderPass; + const auto &colors = renderPass->colors; + const auto &resolves = renderPass->resolves; + const auto &indices = renderPass->indices; + const auto depthStencil = renderPass->depthStencil; + const auto depthStencilResolve = renderPass->depthStencilResolve; + + gpuFBO->framebuffer.initialize(getSwapchainIfExists(gpuFBO->gpuColorViews, colors.data(), colors.size())); + gpuFBO->resolveFramebuffer.initialize(getSwapchainIfExists(gpuFBO->gpuColorViews, resolves.data(), resolves.size())); + + auto supportLevel = device->constantRegistry()->mMSRT; + /* + * LEVEL0 does ont support on-chip resolve + * LEVEL1 only support COLOR_ATTACHMENT0 + * LEVEL2 support COLOR_ATTACHMENT(i) + DEPTH_STENCIL + */ + uint32_t supportCount = supportLevel > MSRTSupportLevel::LEVEL1 ? 255 : static_cast(supportLevel); + constexpr bool useDsResolve = true; + + uint32_t resolveColorIndex = 0; + for (uint32_t i = 0; i < colors.size(); ++i) { + const auto &attachmentIndex = colors[i]; + const auto &colorIndex = indices[attachmentIndex]; + const auto &resolveIndex = resolves.empty() ? INVALID_BINDING : resolves[attachmentIndex]; + + const auto &desc = renderPass->colorAttachments[attachmentIndex]; + const auto *view = gpuFBO->gpuColorViews[attachmentIndex]; + CC_ASSERT(view != nullptr); + + // need to resolve + if (view->gpuTexture->glSamples > 1 && resolveIndex != INVALID_BINDING) { + const auto &resolveDesc = renderPass->colorAttachments[resolveIndex]; + const auto *resolveView = gpuFBO->gpuColorViews[resolveIndex]; + CC_ASSERT(resolveView != nullptr); + bool lazilyAllocated = hasFlag(view->gpuTexture->flags, TextureFlagBit::LAZILY_ALLOCATED); + + if (lazilyAllocated && // MS attachment should be memoryless + resolveView->gpuTexture->swapchain == nullptr && // not back buffer + i < supportCount) { // extension limit + gpuFBO->framebuffer.bindColorMultiSample(resolveView, colorIndex, view->gpuTexture->glSamples, resolveDesc); } else { - outFBO->resolveFramebuffer.initialize(resolveSwapchain); + // implicit MS not supported, fallback to MS Renderbuffer + gpuFBO->colorBlitPairs.emplace_back(colorIndex, resolveColorIndex); + gpuFBO->framebuffer.bindColor(view, colorIndex, desc); + gpuFBO->resolveFramebuffer.bindColor(resolveView, resolveColorIndex++, resolveDesc); } + continue; } - } else { - outFBO->framebuffer.initialize(swapchain); + gpuFBO->framebuffer.bindColor(view, colorIndex, desc); } -} -void cmdFuncGLES3CreateFramebuffer(GLES3Device *device, GLES3GPUFramebuffer *gpuFBO) { - const auto &colors = gpuFBO->gpuRenderPass->colors; - const auto &resolves = gpuFBO->gpuRenderPass->resolves; - const auto &depthStencil = gpuFBO->gpuRenderPass->depthStencil; + if (depthStencil != INVALID_BINDING) { + const auto &desc = renderPass->depthStencilAttachment; + const auto *view = gpuFBO->gpuDepthStencilView; + CC_ASSERT(view != nullptr); - doCreateFramebufferInstance(device, gpuFBO, colors, depthStencil, &gpuFBO->frameBuffer, resolves.empty() ? nullptr : resolves.data()); -} + if (view->gpuTexture->glSamples > 1 && depthStencilResolve != INVALID_BINDING) { + const auto &resolveDesc = renderPass->depthStencilResolveAttachment; + const auto *resolveView = gpuFBO->gpuDepthStencilResolveView; + bool lazilyAllocated = hasFlag(view->gpuTexture->flags, TextureFlagBit::LAZILY_ALLOCATED); -void GLES3GPUFramebuffer::GLFramebuffer::destroy(GLES3GPUStateCache *cache, GLES3GPUFramebufferCacheMap *framebufferCacheMap) { - if (swapchain) { - swapchain = nullptr; - } else { - if (cache->glDrawFramebuffer == _glFramebuffer) { - GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0)); - cache->glDrawFramebuffer = 0; + if (lazilyAllocated && // MS attachment should be memoryless + resolveView->gpuTexture->swapchain == nullptr && // not back buffer + supportCount > 1 && // extension limit + useDsResolve) { // enable ds resolve + gpuFBO->framebuffer.bindDepthStencilMultiSample(resolveView, view->gpuTexture->glSamples, resolveDesc); + } else { + // implicit MS not supported, fallback to MS Renderbuffer + gpuFBO->dsResolveMask = getColorBufferMask(desc.format); + gpuFBO->framebuffer.bindDepthStencil(view, desc); + gpuFBO->resolveFramebuffer.bindDepthStencil(resolveView, resolveDesc); + } + } else { + gpuFBO->framebuffer.bindDepthStencil(view, desc); } - GL_CHECK(glDeleteFramebuffers(1, &_glFramebuffer)); - framebufferCacheMap->unregisterExternal(_glFramebuffer); - _glFramebuffer = 0U; } + + gpuFBO->framebuffer.finalize(device->stateCache()); + gpuFBO->resolveFramebuffer.finalize(device->stateCache()); } void cmdFuncGLES3DestroyFramebuffer(GLES3Device *device, GLES3GPUFramebuffer *gpuFBO) { auto *cache = device->stateCache(); auto *framebufferCacheMap = device->framebufferCacheMap(); - gpuFBO->frameBuffer.framebuffer.destroy(cache, framebufferCacheMap); - gpuFBO->frameBuffer.resolveFramebuffer.destroy(cache, framebufferCacheMap); + gpuFBO->framebuffer.destroy(cache, framebufferCacheMap); + gpuFBO->resolveFramebuffer.destroy(cache, framebufferCacheMap); } void completeBarrier(GLES3GPUGeneralBarrier *barrier) { @@ -1856,7 +1792,6 @@ void cmdFuncGLES3Query(GLES3Device * /*device*/, GLES3QueryPool *queryPool, GLES void cmdFuncGLES3BeginRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRenderPass, GLES3GPUFramebuffer *gpuFramebuffer, const Rect *renderArea, const Color *clearColors, float clearDepth, uint32_t clearStencil) { - ccstd::vector invalidAttachments; GLES3GPUStateCache *cache = device->stateCache(); GLES3ObjectCache &gfxStateCache = cache->gfxStateCache; gfxStateCache.subpassIdx = 0; @@ -1868,14 +1803,18 @@ void cmdFuncGLES3BeginRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRen gfxStateCache.clearStencil = clearStencil; if (gpuFramebuffer && gpuRenderPass) { - auto &instance = gpuFramebuffer->frameBuffer; + auto &framebuffer = gpuFramebuffer->framebuffer; + auto &resolveFramebuffer = gpuFramebuffer->resolveFramebuffer; + if (gpuFramebuffer->resolveFramebuffer.isActive()) { + device->context()->makeCurrent(resolveFramebuffer.swapchain, framebuffer.swapchain); + } else { + device->context()->makeCurrent(framebuffer.swapchain); + } - GLuint glFramebuffer = instance.framebuffer.getFramebuffer(); - device->context()->makeCurrent(instance.framebuffer.swapchain, instance.framebuffer.swapchain); - if (cache->glDrawFramebuffer != glFramebuffer) { - GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, glFramebuffer)); - cache->glDrawFramebuffer = glFramebuffer; + if (cache->glDrawFramebuffer != framebuffer.handle) { + GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer.handle)); + cache->glDrawFramebuffer = framebuffer.handle; } if (cache->viewport.left != renderArea->x || @@ -1895,38 +1834,27 @@ void cmdFuncGLES3BeginRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRen } GLbitfield glClears = 0; - invalidAttachments.clear(); - float fColors[4]{}; bool maskSet = false; auto performLoadOp = [&](uint32_t attachmentIndex, uint32_t glAttachmentIndex) { const ColorAttachment &colorAttachment = gpuRenderPass->colorAttachments[attachmentIndex]; - if (colorAttachment.format != Format::UNKNOWN) { - switch (colorAttachment.loadOp) { - case LoadOp::LOAD: break; // GL default behaviour - case LoadOp::CLEAR: { - if (!maskSet && cache->bs.targets[0].blendColorMask != ColorMask::ALL) { - GL_CHECK(glColorMask(true, true, true, true)); - maskSet = true; - } + if (colorAttachment.format != Format::UNKNOWN && colorAttachment.loadOp == LoadOp::CLEAR) { + if (!maskSet && cache->bs.targets[0].blendColorMask != ColorMask::ALL) { + GL_CHECK(glColorMask(true, true, true, true)); + maskSet = true; + } - const Color &color = clearColors[attachmentIndex]; - if (glFramebuffer) { - fColors[0] = color.x; - fColors[1] = color.y; - fColors[2] = color.z; - fColors[3] = color.w; - GL_CHECK(glClearBufferfv(GL_COLOR, glAttachmentIndex, fColors)); - } else { - GL_CHECK(glClearColor(color.x, color.y, color.z, color.w)); - glClears |= GL_COLOR_BUFFER_BIT; - } - } break; - case LoadOp::DISCARD: - // invalidate fbo - invalidAttachments.push_back(glFramebuffer ? GL_COLOR_ATTACHMENT0 + glAttachmentIndex : GL_COLOR); - break; + const Color &color = clearColors[attachmentIndex]; + if (framebuffer.handle) { + fColors[0] = color.x; + fColors[1] = color.y; + fColors[2] = color.z; + fColors[3] = color.w; + GL_CHECK(glClearBufferfv(GL_COLOR, glAttachmentIndex, fColors)); + } else { + GL_CHECK(glClearColor(color.x, color.y, color.z, color.w)); + glClears |= GL_COLOR_BUFFER_BIT; } } }; @@ -1940,43 +1868,25 @@ void cmdFuncGLES3BeginRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRen depthLoadOp = stencilLoadOp = gpuRenderPass->colorAttachments[attachmentIndex].loadOp; hasStencils = GFX_FORMAT_INFOS[toNumber(gpuRenderPass->colorAttachments[attachmentIndex].format)].hasStencil; } - switch (gpuRenderPass->depthStencilAttachment.depthLoadOp) { - case LoadOp::LOAD: break; // GL default behaviour - case LoadOp::CLEAR: - if (!cache->dss.depthWrite) { - GL_CHECK(glDepthMask(true)); - } - GL_CHECK(glClearDepthf(clearDepth)); - glClears |= GL_DEPTH_BUFFER_BIT; - break; - case LoadOp::DISCARD: - invalidAttachments.push_back(glFramebuffer ? GL_DEPTH_ATTACHMENT : GL_DEPTH); - break; + if (gpuRenderPass->depthStencilAttachment.depthLoadOp == LoadOp::CLEAR) { + if (!cache->dss.depthWrite) { + GL_CHECK(glDepthMask(true)); + } + GL_CHECK(glClearDepthf(clearDepth)); + glClears |= GL_DEPTH_BUFFER_BIT; } - if (hasStencils) { - switch (gpuRenderPass->depthStencilAttachment.depthLoadOp) { - case LoadOp::LOAD: break; // GL default behaviour - case LoadOp::CLEAR: { - if (!cache->dss.stencilWriteMaskFront) { - GL_CHECK(glStencilMaskSeparate(GL_FRONT, 0xffffffff)); - } - if (!cache->dss.stencilWriteMaskBack) { - GL_CHECK(glStencilMaskSeparate(GL_BACK, 0xffffffff)); - } - GL_CHECK(glClearStencil(clearStencil)); - glClears |= GL_STENCIL_BUFFER_BIT; - } break; - case LoadOp::DISCARD: - invalidAttachments.push_back(glFramebuffer ? GL_STENCIL_ATTACHMENT : GL_STENCIL); - break; + if (hasStencils && gpuRenderPass->depthStencilAttachment.depthLoadOp == LoadOp::CLEAR) { + if (!cache->dss.stencilWriteMaskFront) { + GL_CHECK(glStencilMaskSeparate(GL_FRONT, 0xffffffff)); + } + if (!cache->dss.stencilWriteMaskBack) { + GL_CHECK(glStencilMaskSeparate(GL_BACK, 0xffffffff)); } + GL_CHECK(glClearStencil(clearStencil)); + glClears |= GL_STENCIL_BUFFER_BIT; } } - if (!invalidAttachments.empty()) { - GL_CHECK(glInvalidateFramebuffer(GL_DRAW_FRAMEBUFFER, utils::toUint(invalidAttachments.size()), invalidAttachments.data())); - } - if (glClears) { GL_CHECK(glClear(glClears)); } @@ -2010,6 +1920,8 @@ void cmdFuncGLES3BeginRenderPass(GLES3Device *device, GLES3GPURenderPass *gpuRen performLoadOp(i, indices[i]); } performDepthStencilLoadOp(gpuRenderPass->depthStencil); + + framebuffer.processLoad(GL_DRAW_FRAMEBUFFER); } } @@ -2031,113 +1943,14 @@ void cmdFuncGLES3EndRenderPass(GLES3Device *device) { GLES3GPUStateCache *cache = device->stateCache(); GLES3ObjectCache &gfxStateCache = cache->gfxStateCache; - GLES3GPURenderPass *gpuRenderPass = gfxStateCache.gpuRenderPass; GLES3GPUFramebuffer *gpuFramebuffer = gfxStateCache.gpuFramebuffer; - const auto &instance = gpuFramebuffer->frameBuffer; - const SubpassInfo &subpass = gpuRenderPass->subpasses[gfxStateCache.subpassIdx]; - - GLuint glFramebuffer = instance.framebuffer.getFramebuffer(); - GLuint glResolveFramebuffer = instance.resolveFramebuffer.getFramebuffer(); - GLenum invalidateTarget = GL_DRAW_FRAMEBUFFER; - - auto performStoreOp = [&](uint32_t attachmentIndex, uint32_t glAttachmentIndex) { - const ColorAttachment &colorAttachment = gpuRenderPass->colorAttachments[attachmentIndex]; - if (colorAttachment.format != Format::UNKNOWN) { - switch (colorAttachment.storeOp) { - case StoreOp::STORE: break; - case StoreOp::DISCARD: - // invalidate fbo - invalidAttachments.push_back(glFramebuffer ? GL_COLOR_ATTACHMENT0 + glAttachmentIndex : GL_COLOR); - break; - } - } - }; - - auto performDepthStencilStoreOp = [&](uint32_t attachmentIndex) { - if (attachmentIndex != INVALID_BINDING) { - StoreOp depthStoreOp = gpuRenderPass->depthStencilAttachment.depthStoreOp; - StoreOp stencilStoreOp = gpuRenderPass->depthStencilAttachment.stencilStoreOp; - bool hasStencils = GFX_FORMAT_INFOS[toNumber(gpuRenderPass->depthStencilAttachment.format)].hasStencil; - if (attachmentIndex < gpuRenderPass->colorAttachments.size()) { - depthStoreOp = stencilStoreOp = gpuRenderPass->colorAttachments[attachmentIndex].storeOp; - hasStencils = GFX_FORMAT_INFOS[toNumber(gpuRenderPass->colorAttachments[attachmentIndex].format)].hasStencil; - } - switch (gpuRenderPass->depthStencilAttachment.depthStoreOp) { - case StoreOp::STORE: break; - case StoreOp::DISCARD: - invalidAttachments.push_back(glFramebuffer ? GL_DEPTH_ATTACHMENT : GL_DEPTH); - break; - } - if (hasStencils) { - switch (gpuRenderPass->depthStencilAttachment.stencilStoreOp) { - case StoreOp::STORE: break; - case StoreOp::DISCARD: - invalidAttachments.push_back(glFramebuffer ? GL_STENCIL_ATTACHMENT : GL_STENCIL); - break; - } - } - } - - if (!invalidAttachments.empty()) { - GL_CHECK(glInvalidateFramebuffer(invalidateTarget, utils::toUint(invalidAttachments.size()), invalidAttachments.data())); - } - }; - - if (instance.resolveMask) { - device->context()->makeCurrent(instance.resolveFramebuffer.swapchain, instance.framebuffer.swapchain); - - if (cache->glReadFramebuffer != glFramebuffer) { - GL_CHECK(glBindFramebuffer(GL_READ_FRAMEBUFFER, glFramebuffer)); - cache->glReadFramebuffer = glFramebuffer; - } - - if (cache->glDrawFramebuffer != glResolveFramebuffer) { - GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, glResolveFramebuffer)); - cache->glDrawFramebuffer = glResolveFramebuffer; - } - - if (instance.resolveMask & GL_COLOR_BUFFER_BIT) { - for (uint32_t i = 0; i < subpass.colors.size(); ++i) { - auto attachment = static_cast(GL_COLOR_ATTACHMENT0 + i); - GL_CHECK(glReadBuffer(attachment)); - GL_CHECK(glDrawBuffers(1, &attachment)); - - GLES3GPUTexture *srcTex = gpuFramebuffer->gpuColorViews[subpass.colors[i]]->gpuTexture; - GLES3GPUTexture *dstTex = gpuFramebuffer->gpuColorViews[subpass.resolves[i]]->gpuTexture; - - ensureScissorRect(cache, 0, 0, dstTex->width, dstTex->height); - GL_CHECK(glBlitFramebuffer( - 0, 0, srcTex->width, srcTex->height, - 0, 0, dstTex->width, dstTex->height, - GL_COLOR_BUFFER_BIT, GL_NEAREST)); - } - } - - if (instance.resolveMask & GL_DEPTH_BUFFER_BIT) { - GLES3GPUTexture *srcTex = subpass.depthStencil < gpuFramebuffer->gpuColorViews.size() - ? gpuFramebuffer->gpuColorViews[subpass.depthStencil]->gpuTexture - : gpuFramebuffer->gpuDepthStencilView->gpuTexture; - GLES3GPUTexture *dstTex = subpass.depthStencilResolve < gpuFramebuffer->gpuColorViews.size() - ? gpuFramebuffer->gpuColorViews[subpass.depthStencilResolve]->gpuTexture - : gpuFramebuffer->gpuDepthStencilView->gpuTexture; - - ensureScissorRect(cache, 0, 0, dstTex->width, dstTex->height); - GL_CHECK(glBlitFramebuffer( - 0, 0, srcTex->width, srcTex->height, - 0, 0, dstTex->width, dstTex->height, - instance.resolveMask & (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT), GL_NEAREST)); - } - - invalidateTarget = GL_READ_FRAMEBUFFER; + if (gpuFramebuffer->resolveFramebuffer.isActive()) { + doResolve(device, gpuFramebuffer); + } else { + gpuFramebuffer->framebuffer.processStore(GL_DRAW_FRAMEBUFFER); } - const auto &attachments = gpuRenderPass->colorAttachments; - const auto &indices = gpuRenderPass->indices; - for (uint32_t i = 0; i < attachments.size(); ++i) { - performStoreOp(i, indices[i]); - } - performDepthStencilStoreOp(gpuRenderPass->depthStencil); // if (device->constantRegistry()->mFBF == FBFSupportLevel::NON_COHERENT_EXT) { // GL_CHECK(glFramebufferFetchBarrierEXT()); // } else if (device->constantRegistry()->mFBF == FBFSupportLevel::NON_COHERENT_QCOM) { @@ -2362,6 +2175,10 @@ void cmdFuncGLES3BindState(GLES3Device *device, GLES3GPUPipelineState *gpuPipeli const GLES3GPUUniformBuffer &glBuffer = gpuPipelineState->gpuShader->glBuffers[j]; const GLES3GPUDescriptorSet *gpuDescriptorSet = gpuDescriptorSets[glBuffer.set]; + if (gpuDescriptorSet == nullptr) { + continue; + } + const uint32_t descriptorIndex = gpuDescriptorSet->descriptorIndices->at(glBuffer.binding); const GLES3GPUDescriptor &gpuDescriptor = gpuDescriptorSet->gpuDescriptors[descriptorIndex]; @@ -2817,7 +2634,7 @@ uint8_t *funcGLES3PixelBufferPick(const uint8_t *buffer, Format format, uint32_t } void cmdFuncGLES3CopyBuffersToTexture(GLES3Device *device, const uint8_t *const *buffers, GLES3GPUTexture *gpuTexture, const BufferTextureCopy *regions, uint32_t count) { - if (gpuTexture->memoryless) return; + if (!gpuTexture->memoryAllocated) return; GLuint &glTexture = device->stateCache()->glTextures[device->stateCache()->texUint]; if (glTexture != gpuTexture->glTexture) { @@ -3065,15 +2882,7 @@ void cmdFuncGLES3BlitTexture(GLES3Device *device, GLES3GPUTexture *gpuTextureSrc const TextureBlit *regions, uint32_t count, Filter filter) { GLES3GPUStateCache *cache = device->stateCache(); - GLbitfield mask = 0U; - const FormatInfo &info = GFX_FORMAT_INFOS[toNumber(gpuTextureSrc->format)]; - if (info.hasDepth || info.hasStencil) { - if (info.hasDepth) mask |= GL_DEPTH_BUFFER_BIT; - if (info.hasStencil) mask |= GL_STENCIL_BUFFER_BIT; - } else { - mask = GL_COLOR_BUFFER_BIT; - } - + GLbitfield mask = getColorBufferMask(gpuTextureSrc->format); for (uint32_t i = 0U; i < count; ++i) { const TextureBlit ®ion = regions[i]; @@ -3184,6 +2993,180 @@ void cmdFuncGLES3ExecuteCmds(GLES3Device *device, GLES3CmdPackage *cmdPackage) { } } +void GLES3GPUFramebufferObject::initialize(GLES3GPUSwapchain *swc) { + swapchain = swc; +} + +void GLES3GPUFramebufferObject::bindColor(const GLES3GPUTextureView *texture, uint32_t colorIndex, const ColorAttachment &attachment) { + bindColorMultiSample(texture, colorIndex, 1, attachment); +} + +void GLES3GPUFramebufferObject::bindColorMultiSample(const GLES3GPUTextureView *texture, uint32_t colorIndex, GLint samples, const ColorAttachment &attachment) { + if (colorIndex >= colors.size()) { + colors.resize(colorIndex + 1); + } + bool isDefaultFb = swapchain != nullptr; + + if (attachment.loadOp == LoadOp::DISCARD) { + loadInvalidates.emplace_back(isDefaultFb ? GL_COLOR : GL_COLOR_ATTACHMENT0 + colorIndex); + } + if (attachment.storeOp == StoreOp::DISCARD) { + storeInvalidates.emplace_back(isDefaultFb ? GL_COLOR : GL_COLOR_ATTACHMENT0 + colorIndex); + } + colors[colorIndex] = {texture, samples}; +} + +void GLES3GPUFramebufferObject::bindDepthStencil(const GLES3GPUTextureView *texture, const DepthStencilAttachment &attachment) { + bindDepthStencilMultiSample(texture, 1, attachment); +} + +void GLES3GPUFramebufferObject::bindDepthStencilMultiSample(const GLES3GPUTextureView *texture, GLint samples, const DepthStencilAttachment &attachment) { + const FormatInfo &info = GFX_FORMAT_INFOS[toNumber(texture->gpuTexture->format)]; + + bool isDefaultFb = swapchain != nullptr; + bool hasDepth = info.hasDepth; + bool hasStencil = info.hasStencil; + + dsAttachment = hasDepth && hasStencil ? GL_DEPTH_STENCIL_ATTACHMENT : + hasDepth ? GL_DEPTH_ATTACHMENT : GL_STENCIL_ATTACHMENT; + + if (hasDepth) { + auto att = isDefaultFb ? GL_DEPTH : GL_DEPTH_ATTACHMENT; + if (attachment.depthLoadOp == LoadOp::DISCARD) { + loadInvalidates.emplace_back(att); + } + if (attachment.depthStoreOp == StoreOp::DISCARD) { + storeInvalidates.emplace_back(att); + } + } + if (hasStencil) { + auto att = isDefaultFb ? GL_STENCIL : GL_STENCIL_ATTACHMENT; + if (attachment.stencilLoadOp == LoadOp::DISCARD) { + loadInvalidates.emplace_back(att); + } + if (attachment.stencilStoreOp == StoreOp::DISCARD) { + storeInvalidates.emplace_back(att); + } + } + + depthStencil.first = texture; + depthStencil.second = samples; +} + +bool GLES3GPUFramebufferObject::isActive() const { + return swapchain != nullptr || (handle != 0); +} + +void GLES3GPUFramebufferObject::processLoad(GLenum target) { + if (!loadInvalidates.empty()) { + GL_CHECK(glInvalidateFramebuffer(target, utils::toUint(loadInvalidates.size()), loadInvalidates.data())); + } +} + +void GLES3GPUFramebufferObject::processStore(GLenum target) { + if (!storeInvalidates.empty()) { + GL_CHECK(glInvalidateFramebuffer(target, utils::toUint(storeInvalidates.size()), storeInvalidates.data())); + } +} + +void GLES3GPUFramebufferObject::finalize(GLES3GPUStateCache *cache) { + if (swapchain != nullptr) { + return; + } + + if (colors.empty() && dsAttachment == GL_NONE) { + return; + } + + GL_CHECK(glGenFramebuffers(1, &handle)); + GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, handle)); + cache->glDrawFramebuffer = handle; + + auto bindAttachment = [](GLenum attachment, GLint samples, const GLES3GPUTextureView *view) { + auto *texture = view->gpuTexture; + if (samples > 1) { + CC_ASSERT(view->gpuTexture->glTexture != 0); + GL_CHECK(glFramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, + attachment, + GL_TEXTURE_2D, + texture->glTexture, + view->baseLevel, + static_cast(samples))); + return; + } + + if (texture->useRenderBuffer) { + /* + * Renderbuffer is not allocated if using lazily allocated flag. + * If the attachment does not meet the implicit MS condition, renderbuffer should be allocated here. + */ + if (view->gpuTexture->glRenderbuffer == 0) { + GL_CHECK(glGenRenderbuffers(1, &view->gpuTexture->glRenderbuffer)); + renderBufferStorage(GLES3Device::getInstance(), texture); + } + GL_CHECK(glFramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment, texture->glTarget, texture->glRenderbuffer)); + } else { + GL_CHECK(glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, attachment, texture->glTarget, texture->glTexture, view->baseLevel)); + } + }; + + ccstd::vector drawBuffers(colors.size(), GL_NONE); + for (uint32_t i = 0; i < colors.size(); ++i) { + const auto &[view, samples] = colors[i]; + auto att = static_cast(GL_COLOR_ATTACHMENT0 + i); + drawBuffers[i] = att; + bindAttachment(att, samples, view); + } + + if (depthStencil.first != nullptr) { + const auto &[view, samples] = depthStencil; + bindAttachment(dsAttachment, samples, view); + } + + if (!drawBuffers.empty()) { + GL_CHECK(glDrawBuffers(drawBuffers.size(), drawBuffers.data())); + } + + GLenum status; + GL_CHECK(status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER)); + if (status != GL_FRAMEBUFFER_COMPLETE) { + switch (status) { + case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: + CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_ATTACHMENT"); + break; + case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: + CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"); + break; + case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS: + CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_DIMENSIONS"); + break; + case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: + CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_INCOMPLETE_MULTISAMPLE"); + break; + case GL_FRAMEBUFFER_UNSUPPORTED: + CC_LOG_ERROR("checkFramebufferStatus() - FRAMEBUFFER_UNSUPPORTED"); + break; + default: + CC_LOG_ERROR("checkFramebufferStatus() - %x", status); + break; + } + } +} + +void GLES3GPUFramebufferObject::destroy(GLES3GPUStateCache *cache, GLES3GPUFramebufferCacheMap *framebufferCacheMap) { + if (swapchain) { + swapchain = nullptr; + } else { + if (cache->glDrawFramebuffer == handle) { + GL_CHECK(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0)); + cache->glDrawFramebuffer = 0; + } + GL_CHECK(glDeleteFramebuffers(1, &handle)); + framebufferCacheMap->unregisterExternal(handle); + handle = 0U; + } +} + void GLES3GPUFramebufferHub::update(GLES3GPUTexture *texture) { auto &pool = _framebuffers[texture]; for (auto *framebuffer : pool) { @@ -3192,5 +3175,16 @@ void GLES3GPUFramebufferHub::update(GLES3GPUTexture *texture) { } } +GLint cmdFuncGLES3GetMaxSampleCount(const GLES3Device *device, Format format, TextureUsage usage, TextureFlags flags) { + std::ignore = flags; + + auto internalFormat = mapGLInternalFormat(format); + auto target = useRenderBuffer(device, format, usage) ? GL_RENDERBUFFER : GL_TEXTURE_2D_MULTISAMPLE; + + GLint maxSamples = 1; + GL_CHECK(glGetInternalformativ(target, internalFormat, GL_SAMPLES, 1, &maxSamples)); + return maxSamples; +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-gles3/GLES3Commands.h b/native/cocos/renderer/gfx-gles3/GLES3Commands.h index 7108e4ecee1..c9d612550de 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Commands.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Commands.h @@ -312,5 +312,7 @@ void cmdFuncGLES3Dispatch(GLES3Device *device, const GLES3GPUDispatchInfo &info) void cmdFuncGLES3MemoryBarrier(GLES3Device *device, GLbitfield barriers, GLbitfield barriersByRegion); +GLint cmdFuncGLES3GetMaxSampleCount(const GLES3Device *device, Format format, TextureUsage usage, TextureFlags flags); + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-gles3/GLES3Device.cpp b/native/cocos/renderer/gfx-gles3/GLES3Device.cpp index c8de3ad8f35..79bc6937af8 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Device.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Device.cpp @@ -121,7 +121,6 @@ bool GLES3Device::doInit(const DeviceInfo & /*info*/) { ccstd::string fbfLevelStr = "NONE"; // PVRVFrame has issues on their support -//#if CC_PLATFORM != CC_PLATFORM_WINDOWS if (checkExtension("framebuffer_fetch")) { ccstd::string nonCoherent = "framebuffer_fetch_non"; @@ -153,17 +152,20 @@ bool GLES3Device::doInit(const DeviceInfo & /*info*/) { _features[toNumber(Feature::SUBPASS_DEPTH_STENCIL_INPUT)] = true; fbfLevelStr += "_DEPTH_STENCIL"; } -//#endif + ccstd::string msaaLevelStr = "NONE"; #if CC_PLATFORM != CC_PLATFORM_WINDOWS || ALLOW_MULTISAMPLED_RENDER_TO_TEXTURE_ON_DESKTOP if (checkExtension("multisampled_render_to_texture")) { + msaaLevelStr = "MSRT1"; if (checkExtension("multisampled_render_to_texture2")) { _gpuConstantRegistry->mMSRT = MSRTSupportLevel::LEVEL2; + msaaLevelStr = "MSRT2"; } else { _gpuConstantRegistry->mMSRT = MSRTSupportLevel::LEVEL1; } } #endif + _features[toNumber(Feature::MULTI_SAMPLE_RESOLVE_DEPTH_STENCIL)] = true; ccstd::string compressedFmts; @@ -242,6 +244,7 @@ bool GLES3Device::doInit(const DeviceInfo & /*info*/) { CC_LOG_INFO("VERSION: %s", _version.c_str()); CC_LOG_INFO("COMPRESSED_FORMATS: %s", compressedFmts.c_str()); CC_LOG_INFO("FRAMEBUFFER_FETCH: %s", fbfLevelStr.c_str()); + CC_LOG_INFO("MULTI_SAMPLE_RENDER_TO_TEXTURE: %s", msaaLevelStr.c_str()); if (_xr) { _xr->initializeGLESData(pfnGLES3wLoadProc(), GLES3Device::getInstance()->context()); @@ -610,5 +613,9 @@ void GLES3Device::getQueryPoolResults(QueryPool *queryPool) { cmdBuff->getQueryPoolResults(queryPool); } +SampleCount GLES3Device::getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + return static_cast(cmdFuncGLES3GetMaxSampleCount(this, format, usage, flags)); +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-gles3/GLES3Device.h b/native/cocos/renderer/gfx-gles3/GLES3Device.h index 5eed7ca400f..cba5ba99a0c 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Device.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Device.h @@ -95,8 +95,8 @@ class CC_GLES3_API GLES3Device final : public Device { return _stagingBuffer; } - inline bool isTextureExclusive(const Format &format) { return _textureExclusive[static_cast(format)]; }; - + inline bool isTextureExclusive(const Format &format) const { return _textureExclusive[static_cast(format)]; }; + SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const override; protected: static GLES3Device *instance; diff --git a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp index 0eb96c3b3c5..1b4b8e0f19f 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.cpp @@ -41,10 +41,25 @@ GLES3Framebuffer::~GLES3Framebuffer() { destroy(); } +void GLES3Framebuffer::updateExtent() { + if (!_colorTextures.empty()) { + const auto *tex = _colorTextures[0]; + _gpuFBO->width = tex->getWidth(); + _gpuFBO->height = tex->getHeight(); + return; + } + if (_depthStencilTexture != nullptr) { + _gpuFBO->width = _depthStencilTexture->getWidth(); + _gpuFBO->height = _depthStencilTexture->getHeight(); + return; + } +} + void GLES3Framebuffer::doInit(const FramebufferInfo & /*info*/) { _gpuFBO = ccnew GLES3GPUFramebuffer; - _gpuFBO->gpuRenderPass = static_cast(_renderPass)->gpuRenderPass(); + updateExtent(); + _gpuFBO->gpuRenderPass = static_cast(_renderPass)->gpuRenderPass(); _gpuFBO->gpuColorViews.resize(_colorTextures.size()); for (size_t i = 0; i < _colorTextures.size(); ++i) { auto *colorTexture = static_cast(_colorTextures.at(i)); @@ -58,6 +73,12 @@ void GLES3Framebuffer::doInit(const FramebufferInfo & /*info*/) { GLES3Device::getInstance()->framebufferHub()->connect(depthTexture->gpuTexture(), _gpuFBO); } + if (_depthStencilResolveTexture) { + auto *depthTexture = static_cast(_depthStencilResolveTexture); + _gpuFBO->gpuDepthStencilResolveView = depthTexture->gpuTextureView(); + GLES3Device::getInstance()->framebufferHub()->connect(depthTexture->gpuTexture(), _gpuFBO); + } + cmdFuncGLES3CreateFramebuffer(GLES3Device::getInstance(), _gpuFBO); } @@ -73,6 +94,10 @@ void GLES3Framebuffer::doDestroy() { auto *depthTexture = static_cast(_depthStencilTexture); GLES3Device::getInstance()->framebufferHub()->disengage(depthTexture->gpuTexture(), _gpuFBO); } + if (_depthStencilResolveTexture) { + auto *depthTexture = static_cast(_depthStencilResolveTexture); + GLES3Device::getInstance()->framebufferHub()->disengage(depthTexture->gpuTexture(), _gpuFBO); + } delete _gpuFBO; _gpuFBO = nullptr; diff --git a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h index 50abda51bcb..15620265e8b 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3Framebuffer.h @@ -42,6 +42,7 @@ class CC_GLES3_API GLES3Framebuffer final : public Framebuffer { protected: void doInit(const FramebufferInfo &info) override; void doDestroy() override; + void updateExtent(); GLES3GPUFramebuffer *_gpuFBO = nullptr; }; diff --git a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h index 7c1317f2847..169767fe082 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h +++ b/native/cocos/renderer/gfx-gles3/GLES3GPUObjects.h @@ -130,10 +130,11 @@ struct GLES3GPUTexture { uint32_t size{0}; uint32_t arrayLayer{1}; uint32_t mipLevel{1}; - SampleCount samples{SampleCount::ONE}; TextureFlags flags{TextureFlagBit::NONE}; + bool immutable{true}; bool isPowerOf2{false}; - bool memoryless{false}; + bool useRenderBuffer{false}; + bool memoryAllocated{true}; // false if swapchain image or implicit ms render buffer. GLenum glTarget{0}; GLenum glInternalFmt{0}; GLenum glFormat{0}; @@ -320,63 +321,63 @@ struct GLES3GPUGeneralBarrier { GLbitfield glBarriersByRegion = 0U; }; -using DrawBuffer = std::vector; +using DrawBuffer = ccstd::vector; struct GLES3GPURenderPass { ColorAttachmentList colorAttachments; DepthStencilAttachment depthStencilAttachment; + DepthStencilAttachment depthStencilResolveAttachment; SubpassInfoList subpasses; SubpassDependencyList dependencies; - std::vector colors; - std::vector resolves; + ccstd::vector colors; + ccstd::vector resolves; uint32_t depthStencil = INVALID_BINDING; - std::vector indices; // offsets to GL_COLOR_ATTACHMENT_0 - std::vector drawBuffers; + uint32_t depthStencilResolve = INVALID_BINDING; + ccstd::vector indices; // offsets to GL_COLOR_ATTACHMENT_0 + ccstd::vector drawBuffers; }; class GLES3GPUFramebufferCacheMap; -class GLES3GPUFramebuffer final { -public: - GLES3GPURenderPass *gpuRenderPass{nullptr}; - GLES3GPUTextureViewList gpuColorViews; - GLES3GPUTextureView *gpuDepthStencilView{nullptr}; +struct GLES3GPUFramebufferObject { + void initialize(GLES3GPUSwapchain *swc = nullptr); - struct GLFramebufferInfo { - GLuint glFramebuffer{0U}; - uint32_t width{UINT_MAX}; - uint32_t height{UINT_MAX}; - }; - struct GLFramebuffer { - inline void initialize(GLES3GPUSwapchain *sc) { swapchain = sc; } - inline void initialize(const GLFramebufferInfo &info) { - _glFramebuffer = info.glFramebuffer; - _width = info.width; - _height = info.height; - } - inline GLuint getFramebuffer() const { return swapchain ? swapchain->glFramebuffer : _glFramebuffer; } - inline uint32_t getWidth() const { return swapchain ? swapchain->gpuColorTexture->width : _width; } - inline uint32_t getHeight() const { return swapchain ? swapchain->gpuColorTexture->height : _height; } + void bindColor(const GLES3GPUTextureView *texture, uint32_t colorIndex, const ColorAttachment &attachment); + void bindColorMultiSample(const GLES3GPUTextureView *texture, uint32_t colorIndex, GLint samples, const ColorAttachment &attachment); + void bindDepthStencil(const GLES3GPUTextureView *texture, const DepthStencilAttachment &attachment); + void bindDepthStencilMultiSample(const GLES3GPUTextureView *texture, GLint samples, const DepthStencilAttachment &attachment); - void destroy(GLES3GPUStateCache *cache, GLES3GPUFramebufferCacheMap *framebufferCacheMap); + bool isActive() const; + void finalize(GLES3GPUStateCache *cache); + void processLoad(GLenum target); + void processStore(GLenum target); + void destroy(GLES3GPUStateCache *cache, GLES3GPUFramebufferCacheMap *framebufferCacheMap); - GLES3GPUSwapchain *swapchain{nullptr}; + using Reference = std::pair; - private: - GLuint _glFramebuffer{0U}; - uint32_t _width{0U}; - uint32_t _height{0U}; - }; + GLuint handle{0}; + GLES3GPUSwapchain *swapchain{nullptr}; - struct Framebuffer { - GLFramebuffer framebuffer; + ccstd::vector colors; + Reference depthStencil{nullptr, 1}; + GLenum dsAttachment{GL_NONE}; - // for blit-based manual resolving - GLbitfield resolveMask{0U}; - GLFramebuffer resolveFramebuffer; - }; + ccstd::vector loadInvalidates; + ccstd::vector storeInvalidates; +}; - // one per subpass, if not using FBF - Framebuffer frameBuffer; +class GLES3GPUFramebuffer final { +public: + GLES3GPURenderPass *gpuRenderPass{nullptr}; + GLES3GPUTextureViewList gpuColorViews; + GLES3GPUTextureView *gpuDepthStencilView{nullptr}; + GLES3GPUTextureView *gpuDepthStencilResolveView{nullptr}; + + uint32_t width{UINT_MAX}; + uint32_t height{UINT_MAX}; + GLbitfield dsResolveMask = 0; + std::vector> colorBlitPairs; + GLES3GPUFramebufferObject framebuffer; + GLES3GPUFramebufferObject resolveFramebuffer; }; struct GLES3GPUDescriptorSetLayout { diff --git a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp index a4892670923..c409f6023a8 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.cpp @@ -138,6 +138,10 @@ void GLES3PrimaryCommandBuffer::copyBuffersToTexture(const uint8_t *const *buffe } } +void GLES3PrimaryCommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + copyTexture(srcTexture, dstTexture, regions, count); +} + void GLES3PrimaryCommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { GLES3GPUTexture *gpuTextureSrc = nullptr; GLES3GPUTexture *gpuTextureDst = nullptr; diff --git a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h index 79d82f6bd31..3ae09735302 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h +++ b/native/cocos/renderer/gfx-gles3/GLES3PrimaryCommandBuffer.h @@ -49,6 +49,7 @@ class CC_GLES3_API GLES3PrimaryCommandBuffer final : public GLES3CommandBuffer { void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const * /*buffers*/, uint32_t bufferBarrierCount, const TextureBarrier *const *textureBarriers, const Texture *const * /*textures*/, uint32_t textureBarrierCount) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void beginQuery(QueryPool *queryPool, uint32_t id) override; void endQuery(QueryPool *queryPool, uint32_t id) override; void resetQueryPool(QueryPool *queryPool) override; diff --git a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp index 2029f901eb3..76f8328171a 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3RenderPass.cpp @@ -44,6 +44,7 @@ void GLES3RenderPass::doInit(const RenderPassInfo & /*info*/) { _gpuRenderPass = ccnew GLES3GPURenderPass; _gpuRenderPass->colorAttachments = _colorAttachments; _gpuRenderPass->depthStencilAttachment = _depthStencilAttachment; + _gpuRenderPass->depthStencilResolveAttachment = _depthStencilResolveAttachment; _gpuRenderPass->subpasses = _subpasses; _gpuRenderPass->dependencies = _dependencies; @@ -59,14 +60,17 @@ void GLES3RenderPass::doInit(const RenderPassInfo & /*info*/) { if (_depthStencilAttachment.format != Format::UNKNOWN) { subpass.depthStencil = colorCount; } + if (_depthStencilResolveAttachment.format != Format::UNKNOWN) { + subpass.depthStencil = colorCount + 1; + } } else { // unify depth stencil index for (auto &subpass : _gpuRenderPass->subpasses) { - if (subpass.depthStencil != INVALID_BINDING && subpass.depthStencil > colorCount) { + if (subpass.depthStencil != INVALID_BINDING && subpass.depthStencil >= colorCount) { subpass.depthStencil = colorCount; } - if (subpass.depthStencilResolve != INVALID_BINDING && subpass.depthStencilResolve > colorCount) { - subpass.depthStencilResolve = colorCount; + if (subpass.depthStencilResolve != INVALID_BINDING && subpass.depthStencil >= colorCount) { + subpass.depthStencilResolve = colorCount + 1; } } } diff --git a/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp b/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp index a4c729b6788..286ef62b78f 100644 --- a/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp +++ b/native/cocos/renderer/gfx-gles3/GLES3Texture.cpp @@ -52,7 +52,7 @@ void GLES3Texture::doInit(const TextureInfo & /*info*/) { _gpuTexture->depth = _info.depth; _gpuTexture->arrayLayer = _info.layerCount; _gpuTexture->mipLevel = _info.levelCount; - _gpuTexture->samples = _info.samples; + _gpuTexture->glSamples = static_cast(_info.samples); _gpuTexture->flags = _info.flags; _gpuTexture->size = _size; _gpuTexture->isPowerOf2 = math::isPowerOfTwo(_info.width) && math::isPowerOfTwo(_info.height); @@ -71,7 +71,7 @@ void GLES3Texture::doInit(const TextureInfo & /*info*/) { cmdFuncGLES3CreateTexture(GLES3Device::getInstance(), _gpuTexture); - if (!_gpuTexture->memoryless) { + if (_gpuTexture->memoryAllocated) { GLES3Device::getInstance()->getMemoryStatus().textureSize += _size; CC_PROFILE_MEMORY_INC(Texture, _size); } @@ -101,7 +101,7 @@ void GLES3Texture::doDestroy() { CC_SAFE_DELETE(_gpuTextureView); if (_gpuTexture) { if (!_isTextureView) { - if (!_gpuTexture->memoryless) { + if (_gpuTexture->memoryAllocated) { GLES3Device::getInstance()->getMemoryStatus().textureSize -= _size; CC_PROFILE_MEMORY_DEC(Texture, _size); } @@ -115,7 +115,7 @@ void GLES3Texture::doDestroy() { } void GLES3Texture::doResize(uint32_t width, uint32_t height, uint32_t size) { - if (!_isTextureView && !_gpuTexture->memoryless) { + if (!_isTextureView && _gpuTexture->memoryAllocated) { GLES3Device::getInstance()->getMemoryStatus().textureSize -= _size; CC_PROFILE_MEMORY_DEC(Texture, _size); } @@ -129,7 +129,7 @@ void GLES3Texture::doResize(uint32_t width, uint32_t height, uint32_t size) { GLES3Device::getInstance()->framebufferHub()->update(_gpuTexture); - if (!_isTextureView && !_gpuTexture->memoryless) { + if (!_isTextureView && _gpuTexture->memoryAllocated) { GLES3Device::getInstance()->getMemoryStatus().textureSize += size; CC_PROFILE_MEMORY_INC(Texture, size); } @@ -164,10 +164,10 @@ void GLES3Texture::doInit(const SwapchainTextureInfo & /*info*/) { _gpuTexture->depth = _info.depth; _gpuTexture->arrayLayer = _info.layerCount; _gpuTexture->mipLevel = _info.levelCount; - _gpuTexture->samples = _info.samples; + _gpuTexture->glSamples = static_cast(_info.samples); _gpuTexture->flags = _info.flags; _gpuTexture->size = _size; - _gpuTexture->memoryless = true; + _gpuTexture->memoryAllocated = false; _gpuTexture->swapchain = static_cast(_swapchain)->gpuSwapchain(); _gpuTextureView = ccnew GLES3GPUTextureView; createTextureView(); diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h index 7567af5316f..bb38f1530cd 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.h @@ -73,6 +73,7 @@ class CCMTLCommandBuffer final : public CommandBuffer { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override; void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const *buffers, uint32_t bufferBarrierCount, const TextureBarrier *const *textureBarriers, const Texture *const *textures, uint32_t textureBarrierCount) override; diff --git a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm index 0779591c601..84cd6f958e0 100644 --- a/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm +++ b/native/cocos/renderer/gfx-metal/MTLCommandBuffer.mm @@ -237,6 +237,15 @@ of this software and associated engine source code (the "Software"), a limited, if(color >= colorAttachments.size()) { continue; // depthStencil as output } + if (subpasses[i].resolves.size() > j) { + uint32_t resolve = subpasses[i].resolves[j]; + auto *resolveTex = static_cast(colorTextures[resolve]); + mtlRenderPassDescriptor.colorAttachments[color].resolveTexture = resolveTex->getMTLTexture(); + mtlRenderPassDescriptor.colorAttachments[color].resolveLevel = 0; + mtlRenderPassDescriptor.colorAttachments[color].resolveSlice = 0; + mtlRenderPassDescriptor.colorAttachments[color].resolveDepthPlane = 0; + mtlRenderPassDescriptor.colorAttachments[color].storeAction = MTLStoreActionMultisampleResolve; + } if (visited[color]) continue; auto *ccMtlTexture = static_cast(colorTextures[color]); @@ -255,17 +264,6 @@ of this software and associated engine source code (the "Software"), a limited, mtlRenderPassDescriptor.colorAttachments[color].storeAction = mu::isFramebufferFetchSupported() ? mu::toMTLStoreAction(colorAttachments[color].storeOp) : MTLStoreActionStore; visited[color] = true; _colorAppearedBefore.set(color); - if (subpasses[i].resolves.size() > j) { - uint32_t resolve = subpasses[i].resolves[j]; - auto *resolveTex = static_cast(colorTextures[resolve]); - if (resolveTex->textureInfo().samples == SampleCount::ONE) - continue; - mtlRenderPassDescriptor.colorAttachments[color].resolveTexture = resolveTex->getMTLTexture(); - mtlRenderPassDescriptor.colorAttachments[color].resolveLevel = 0; - mtlRenderPassDescriptor.colorAttachments[color].resolveSlice = 0; - mtlRenderPassDescriptor.colorAttachments[color].resolveDepthPlane = 0; - mtlRenderPassDescriptor.colorAttachments[color].storeAction = MTLStoreActionMultisampleResolve; - } } } updateDepthStencilState(ccMtlRenderPass->getCurrentSubpassIndex(), mtlRenderPassDescriptor); @@ -388,19 +386,13 @@ of this software and associated engine source code (the "Software"), a limited, } if (subpass.depthStencilResolve != INVALID_BINDING) { - const CCMTLTexture *dsResolveTex = nullptr; - if (subpass.depthStencilResolve >= colorTextures.size()) { - dsResolveTex = static_cast(curFBO->getDepthStencilTexture()); - } else { - dsResolveTex = static_cast(colorTextures[subpass.depthStencilResolve]); - } - descriptor.depthAttachment.resolveTexture = dsResolveTex->getMTLTexture(); + descriptor.depthAttachment.resolveTexture = static_cast(curFBO->getDepthStencilTexture())->getMTLTexture(); descriptor.depthAttachment.resolveLevel = 0; descriptor.depthAttachment.resolveSlice = 0; descriptor.depthAttachment.resolveDepthPlane = 0; descriptor.depthAttachment.storeAction = subpass.depthResolveMode == ResolveMode::NONE ? MTLStoreActionMultisampleResolve : MTLStoreActionStoreAndMultisampleResolve; - descriptor.stencilAttachment.resolveTexture = dsResolveTex->getMTLTexture(); + descriptor.stencilAttachment.resolveTexture = static_cast(curFBO->getDepthStencilResolveTexture())->getMTLTexture(); descriptor.stencilAttachment.resolveLevel = 0; descriptor.stencilAttachment.resolveSlice = 0; descriptor.stencilAttachment.resolveDepthPlane = 0; @@ -919,6 +911,10 @@ of this software and associated engine source code (the "Software"), a limited, } } +void CCMTLCommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + // not supported. +} + void CCMTLCommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { ccstd::vector blitRegions(count); for (uint32_t i = 0; i < count; ++i) { diff --git a/native/cocos/renderer/gfx-metal/MTLDevice.h b/native/cocos/renderer/gfx-metal/MTLDevice.h index b76443f1bd6..14064a3f308 100644 --- a/native/cocos/renderer/gfx-metal/MTLDevice.h +++ b/native/cocos/renderer/gfx-metal/MTLDevice.h @@ -62,7 +62,7 @@ class CCMTLDevice final : public Device { using Device::createRenderPass; using Device::createShader; using Device::createTexture; - + void frameSync() override; void acquire(Swapchain *const *swapchains, uint32_t count) override; @@ -88,6 +88,8 @@ class CCMTLDevice final : public Device { _swapchains.erase(iter); } } + + inline CCMTLGPUDeviceObject* gpuObject() const { return _gpuDeviceObj; } protected: static CCMTLDevice *_instance; @@ -114,6 +116,7 @@ class CCMTLDevice final : public Device { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *dst, const BufferTextureCopy *regions, uint32_t count) override; void copyTextureToBuffers(Texture *src, uint8_t *const *buffers, const BufferTextureCopy *region, uint32_t count) override; void getQueryPoolResults(QueryPool *queryPool) override; + SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const override; void onMemoryWarning(); void initFormatFeatures(uint32_t family); diff --git a/native/cocos/renderer/gfx-metal/MTLDevice.mm b/native/cocos/renderer/gfx-metal/MTLDevice.mm index db0ceef627d..186a152bcda 100644 --- a/native/cocos/renderer/gfx-metal/MTLDevice.mm +++ b/native/cocos/renderer/gfx-metal/MTLDevice.mm @@ -73,7 +73,7 @@ of this software and associated engine source code (the "Software"), a limited, bool CCMTLDevice::doInit(const DeviceInfo &info) { _gpuDeviceObj = ccnew CCMTLGPUDeviceObject; - + _currentFrameIndex = 0; id mtlDevice = MTLCreateSystemDefaultDevice(); @@ -87,7 +87,7 @@ of this software and associated engine source code (the "Software"), a limited, } _mtlFeatureSet = mu::highestSupportedFeatureSet(mtlDevice); _version = std::to_string(_mtlFeatureSet); - + const auto gpuFamily = mu::getGPUFamily(MTLFeatureSet(_mtlFeatureSet)); _indirectDrawSupported = mu::isIndirectDrawSupported(gpuFamily); _caps.maxVertexAttributes = mu::getMaxVertexAttributes(gpuFamily); @@ -139,13 +139,15 @@ of this software and associated engine source code (the "Software"), a limited, _features[toNumber(Feature::SUBPASS_DEPTH_STENCIL_INPUT)] = false; _features[toNumber(Feature::RASTERIZATION_ORDER_NOCOHERENT)] = true; + _features[toNumber(Feature::MULTI_SAMPLE_RESOLVE_DEPTH_STENCIL)] = [mtlDevice supportsFamily: MTLGPUFamilyApple3]; + QueueInfo queueInfo; queueInfo.type = QueueType::GRAPHICS; _queue = createQueue(queueInfo); QueryPoolInfo queryPoolInfo{QueryType::OCCLUSION, DEFAULT_MAX_QUERY_OBJECTS, true}; _queryPool = createQueryPool(queryPoolInfo); - + CommandBufferInfo cmdBuffInfo; cmdBuffInfo.type = CommandBufferType::PRIMARY; cmdBuffInfo.queue = _queue; @@ -527,5 +529,22 @@ of this software and associated engine source code (the "Software"), a limited, _formatFeatures[toNumber(Format::RGB10A2)] |= FormatFeature::VERTEX_ATTRIBUTE; } +SampleCount CCMTLDevice::getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + const SampleCount sampleCounts[] = { + SampleCount::X64, + SampleCount::X32, + SampleCount::X16, + SampleCount::X8, + SampleCount::X4, + SampleCount::X2, + }; + for (auto sampleCount : sampleCounts) { + if ([_mtlDevice supportsTextureSampleCount: static_cast(sampleCount)]) { + return sampleCount; + } + } + return SampleCount::X1; +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-metal/MTLPipelineState.mm b/native/cocos/renderer/gfx-metal/MTLPipelineState.mm index 7bd26adbae7..447ca460e19 100644 --- a/native/cocos/renderer/gfx-metal/MTLPipelineState.mm +++ b/native/cocos/renderer/gfx-metal/MTLPipelineState.mm @@ -333,7 +333,7 @@ of this software and associated engine source code (the "Software"), a limited, } } - SampleCount sample = SampleCount::ONE; + SampleCount sample = SampleCount::X1; Format depthStencilFormat; if (depthStencilTexIndex != INVALID_BINDING && depthStencilTexIndex < _renderPass->getColorAttachments().size()) { sample = _renderPass->getColorAttachments()[depthStencilTexIndex].sampleCount; diff --git a/native/cocos/renderer/gfx-metal/MTLTexture.h b/native/cocos/renderer/gfx-metal/MTLTexture.h index 65eaf60e101..38a48205a57 100644 --- a/native/cocos/renderer/gfx-metal/MTLTexture.h +++ b/native/cocos/renderer/gfx-metal/MTLTexture.h @@ -72,6 +72,8 @@ class CCMTLTexture final : public Texture { bool _isArray = false; bool _isPVRTC = false; + bool _allocateMemory = true; // allocate device memory by metal driver. + id _mtlTexture = nil; id _mtlTextureView = nil; }; diff --git a/native/cocos/renderer/gfx-metal/MTLTexture.mm b/native/cocos/renderer/gfx-metal/MTLTexture.mm index 5812ca53e10..edab24a636a 100644 --- a/native/cocos/renderer/gfx-metal/MTLTexture.mm +++ b/native/cocos/renderer/gfx-metal/MTLTexture.mm @@ -144,8 +144,10 @@ of this software and associated engine source code (the "Software"), a limited, return; } - CCMTLDevice::getInstance()->getMemoryStatus().textureSize += _size; - CC_PROFILE_MEMORY_INC(Texture, _size); + if (_allocateMemory) { + CCMTLDevice::getInstance()->getMemoryStatus().textureSize += _size; + CC_PROFILE_MEMORY_INC(Texture, _size); + } } void CCMTLTexture::doInit(const TextureViewInfo &info) { @@ -223,27 +225,15 @@ of this software and associated engine source code (the "Software"), a limited, descriptor.mipmapLevelCount = _info.levelCount; descriptor.arrayLength = _info.type == TextureType::CUBE ? 1 : _info.layerCount; - if (hasAllFlags(TextureUsage::COLOR_ATTACHMENT | TextureUsage::INPUT_ATTACHMENT, _info.usage) && mu::isImageBlockSupported()) { -#if MEMLESS_ON - // mac SDK mem_less unavailable before 11.0 - #if MAC_MEMORY_LESS_TEXTURE_SUPPORT || CC_PLATFORM == CC_PLATFORM_IOS - //xcode OS version warning - if (@available(macOS 11.0, *)) { + descriptor.storageMode = MTLStorageModePrivate; + if (@available(macos 11.0, ios 10.0, *)) { + bool memoryless = hasFlag(_info.flags, TextureFlagBit::LAZILY_ALLOCATED) && + hasFlag(_info.usage, TextureUsageBit::COLOR_ATTACHMENT) && + hasFlag(_info.usage, TextureUsageBit::DEPTH_STENCIL_ATTACHMENT); + if (memoryless) { descriptor.storageMode = MTLStorageModeMemoryless; - } else { - descriptor.storageMode = MTLStorageModePrivate; + _allocateMemory = false; } - #else - descriptor.storageMode = MTLStorageModePrivate; - #endif -#else - descriptor.storageMode = MTLStorageModePrivate; -#endif - } else if (hasFlag(_info.usage, TextureUsage::COLOR_ATTACHMENT) || - hasFlag(_info.usage, TextureUsage::DEPTH_STENCIL_ATTACHMENT) || - hasFlag(_info.usage, TextureUsage::INPUT_ATTACHMENT) || - hasFlag(_info.usage, TextureUsage::STORAGE)) { - descriptor.storageMode = MTLStorageModePrivate; } id mtlDevice = id(CCMTLDevice::getInstance()->getMTLDevice()); @@ -262,8 +252,9 @@ of this software and associated engine source code (the "Software"), a limited, void CCMTLTexture::doDestroy() { //decrease only non-swapchain tex and have had been inited. - if (!_swapchain && _mtlTexture) { + if (!_swapchain && _mtlTexture && _allocateMemory) { CCMTLDevice::getInstance()->getMemoryStatus().textureSize -= _size; + CC_PROFILE_MEMORY_DEC(Texture, _size); } if (_swapchain) { @@ -281,8 +272,6 @@ of this software and associated engine source code (the "Software"), a limited, _mtlTexture = nil; } - CC_PROFILE_MEMORY_DEC(Texture, _size); - std::function destroyFunc = [mtlTexure]() { if (mtlTexure) { //TODO_Zeqiang: [mac12 | ios15, ...) validate here @@ -319,7 +308,7 @@ of this software and associated engine source code (the "Software"), a limited, // texture is a wrapper of drawable when _swapchain is active, drawable is not a resource alloc by gfx, // but the system so skip here. - if (!_swapchain) { + if (!_swapchain && _allocateMemory) { CCMTLDevice::getInstance()->getMemoryStatus().textureSize -= oldSize; CCMTLDevice::getInstance()->getMemoryStatus().textureSize += size; CC_PROFILE_MEMORY_DEC(Texture, oldSize); diff --git a/native/cocos/renderer/gfx-metal/MTLUtils.mm b/native/cocos/renderer/gfx-metal/MTLUtils.mm index 18869415bba..d2864e9b917 100644 --- a/native/cocos/renderer/gfx-metal/MTLUtils.mm +++ b/native/cocos/renderer/gfx-metal/MTLUtils.mm @@ -847,17 +847,7 @@ void main() { } NSUInteger mu::toMTLSampleCount(SampleCount count) { - //TODO_Zeqiang: query from device. - switch (count) { - case SampleCount::ONE: return 1; - case SampleCount::MULTIPLE_PERFORMANCE: return 2; - case SampleCount::MULTIPLE_BALANCE: return 4; - case SampleCount::MULTIPLE_QUALITY: - return 8; - // case SampleCount::X16: return 16; - // case SampleCount::X32: return 32; - // case SampleCount::X64: return 64; - } + return static_cast(count); } MTLSamplerAddressMode mu::toMTLSamplerAddressMode(Address mode) { diff --git a/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp b/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp index abae1798305..bab7e3c6ca5 100644 --- a/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp +++ b/native/cocos/renderer/gfx-validator/CommandBufferValidator.cpp @@ -418,6 +418,41 @@ void CommandBufferValidator::copyBuffersToTexture(const uint8_t *const *buffers, _actor->copyBuffersToTexture(buffers, textureValidator->getActor(), regions, count); } +void CommandBufferValidator::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + CC_ASSERT(isInited()); + CC_ASSERT(srcTexture && static_cast(srcTexture)->isInited()); + CC_ASSERT(dstTexture && static_cast(dstTexture)->isInited()); + const auto &srcInfo = srcTexture->getInfo(); + const auto &dstInfo = dstTexture->getInfo(); + + CC_ASSERT(srcInfo.format == dstInfo.format); + CC_ASSERT(srcInfo.format != Format::DEPTH_STENCIL && + srcInfo.format != Format::DEPTH); + + CC_ASSERT(srcInfo.samples > SampleCount::X1 && + dstInfo.samples == SampleCount::X1); + + CC_ASSERT(!_insideRenderPass); + + for (uint32_t i = 0; i < count; ++i) { + const auto ®ion = regions[i]; + CC_ASSERT(region.srcOffset.x + region.extent.width <= srcInfo.width); + CC_ASSERT(region.srcOffset.y + region.extent.height <= srcInfo.height); + CC_ASSERT(region.srcOffset.z + region.extent.depth <= srcInfo.depth); + + CC_ASSERT(region.dstOffset.x + region.extent.width <= dstInfo.width); + CC_ASSERT(region.dstOffset.y + region.extent.height <= dstInfo.height); + CC_ASSERT(region.dstOffset.z + region.extent.depth <= dstInfo.depth); + } + + Texture *actorSrcTexture = nullptr; + Texture *actorDstTexture = nullptr; + if (srcTexture) actorSrcTexture = static_cast(srcTexture)->getActor(); + if (dstTexture) actorDstTexture = static_cast(dstTexture)->getActor(); + + _actor->resolveTexture(actorSrcTexture, actorDstTexture, regions, count); +} + void CommandBufferValidator::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { CC_ASSERT(isInited()); CC_ASSERT(srcTexture && static_cast(srcTexture)->isInited()); @@ -453,9 +488,9 @@ void CommandBufferValidator::blitTexture(Texture *srcTexture, Texture *dstTextur CC_ASSERT(srcTexture && static_cast(srcTexture)->isInited()); CC_ASSERT(dstTexture && static_cast(dstTexture)->isInited()); // Blit on multisampled texture is not allowed. - CC_ASSERT(srcTexture->getInfo().samples == SampleCount::ONE); + CC_ASSERT(srcTexture->getInfo().samples == SampleCount::X1); // blit on multisampled texture is not allowed. - CC_ASSERT(dstTexture->getInfo().samples == SampleCount::ONE); + CC_ASSERT(dstTexture->getInfo().samples == SampleCount::X1); // Command 'blitTexture' must be recorded outside render passes. CC_ASSERT(!_insideRenderPass); diff --git a/native/cocos/renderer/gfx-validator/CommandBufferValidator.h b/native/cocos/renderer/gfx-validator/CommandBufferValidator.h index f7b0ee52748..3ec70240be2 100644 --- a/native/cocos/renderer/gfx-validator/CommandBufferValidator.h +++ b/native/cocos/renderer/gfx-validator/CommandBufferValidator.h @@ -58,6 +58,7 @@ class CC_DLL CommandBufferValidator final : public Agent { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override; void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const *buffers, uint32_t bufferBarrierCount, const TextureBarrier *const *textureBarriers, const Texture *const *textures, uint32_t textureBarrierCount) override; diff --git a/native/cocos/renderer/gfx-validator/DeviceValidator.cpp b/native/cocos/renderer/gfx-validator/DeviceValidator.cpp index f44d42aee1c..ff97a9910a1 100644 --- a/native/cocos/renderer/gfx-validator/DeviceValidator.cpp +++ b/native/cocos/renderer/gfx-validator/DeviceValidator.cpp @@ -352,5 +352,9 @@ void DeviceValidator::frameSync() { _actor->frameSync(); } +SampleCount DeviceValidator::getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + return _actor->getMaxSampleCount(format, usage, flags); +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-validator/DeviceValidator.h b/native/cocos/renderer/gfx-validator/DeviceValidator.h index 111737a0869..4122d715e75 100644 --- a/native/cocos/renderer/gfx-validator/DeviceValidator.h +++ b/native/cocos/renderer/gfx-validator/DeviceValidator.h @@ -95,7 +95,7 @@ class CC_DLL DeviceValidator final : public Agent { inline uint64_t currentFrame() const { return _currentFrame; } void enableAutoBarrier(bool enable) override; - + SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const override; protected: static DeviceValidator *instance; diff --git a/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp b/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp index bf6c868d479..8c4166bbb8e 100644 --- a/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp +++ b/native/cocos/renderer/gfx-validator/FramebufferValidator.cpp @@ -54,6 +54,9 @@ void FramebufferValidator::doInit(const FramebufferInfo &info) { if (info.renderPass->getDepthStencilAttachment().format != Format::UNKNOWN) { CC_ASSERT(info.depthStencilTexture); } + if (info.renderPass->getDepthStencilResolveAttachment().format != Format::UNKNOWN) { + CC_ASSERT(info.depthStencilResolveTexture); + } for (uint32_t i = 0U; i < info.colorTextures.size(); ++i) { const auto &desc = info.renderPass->getColorAttachments()[i]; @@ -67,6 +70,11 @@ void FramebufferValidator::doInit(const FramebufferInfo &info) { CC_ASSERT(hasFlag(info.depthStencilTexture->getInfo().usage, TextureUsageBit::DEPTH_STENCIL_ATTACHMENT)); CC_ASSERT(info.depthStencilTexture->getFormat() == info.renderPass->getDepthStencilAttachment().format); } + if (info.depthStencilResolveTexture) { + CC_ASSERT(static_cast(info.depthStencilResolveTexture)->isInited()); + CC_ASSERT(hasFlag(info.depthStencilResolveTexture->getInfo().usage, TextureUsageBit::DEPTH_STENCIL_ATTACHMENT)); + CC_ASSERT(info.depthStencilResolveTexture->getFormat() == info.renderPass->getDepthStencilResolveAttachment().format); + } /////////// execute /////////// @@ -79,6 +87,9 @@ void FramebufferValidator::doInit(const FramebufferInfo &info) { if (info.depthStencilTexture) { actorInfo.depthStencilTexture = static_cast(info.depthStencilTexture)->getActor(); } + if (info.depthStencilResolveTexture) { + actorInfo.depthStencilResolveTexture = static_cast(info.depthStencilResolveTexture)->getActor(); + } actorInfo.renderPass = static_cast(info.renderPass)->getActor(); _actor->initialize(actorInfo); diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp index fb62c102e02..7aefa9312fc 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.cpp @@ -168,15 +168,17 @@ void CCVKCommandBuffer::beginRenderPass(RenderPass *renderPass, Framebuffer *fbo } ccstd::vector &clearValues = _curGPURenderPass->clearValues; - bool depthEnabled = _curGPURenderPass->depthStencilAttachment.format != Format::UNKNOWN; - size_t attachmentCount = depthEnabled ? clearValues.size() - 1 : clearValues.size(); - + size_t attachmentCount = _curGPURenderPass->colorAttachments.size(); for (size_t i = 0U; i < attachmentCount; ++i) { clearValues[i].color = {{colors[i].x, colors[i].y, colors[i].z, colors[i].w}}; } - if (depthEnabled) { + + if (_curGPURenderPass->depthStencilAttachment.format != Format::UNKNOWN) { clearValues[attachmentCount].depthStencil = {depth, stencil}; } + if (_curGPURenderPass->depthStencilResolveAttachment.format != Format::UNKNOWN) { + clearValues[attachmentCount + 1].depthStencil = {depth, stencil}; + } Rect safeArea{ std::min(renderArea.x, static_cast(_curGPUFBO->width)), @@ -516,6 +518,50 @@ void CCVKCommandBuffer::copyBuffersToTexture(const uint8_t *const *buffers, Text cmdFuncCCVKCopyBuffersToTexture(CCVKDevice::getInstance(), buffers, static_cast(texture)->gpuTexture(), regions, count, _gpuCommandBuffer); } +void CCVKCommandBuffer::resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { + VkImageAspectFlags srcAspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + VkImageAspectFlags dstAspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + VkImage srcImage = VK_NULL_HANDLE; + VkImage dstImage = VK_NULL_HANDLE; + + auto getImage = [](Texture * texture) -> auto { + CCVKGPUTexture *gpuTexture = static_cast(texture)->gpuTexture(); + return gpuTexture->swapchain ? std::pair{gpuTexture->aspectMask, gpuTexture->swapchainVkImages[gpuTexture->swapchain->curImageIndex]} : std::pair{gpuTexture->aspectMask, gpuTexture->vkImage}; + }; + + std::tie(srcAspectMask, srcImage) = getImage(srcTexture); + std::tie(dstAspectMask, dstImage) = getImage(dstTexture); + + ccstd::vector resolveRegions(count); + for (uint32_t i = 0U; i < count; ++i) { + const TextureCopy ®ion = regions[i]; + auto &resolveRegion = resolveRegions[i]; + + resolveRegion.srcSubresource.aspectMask = srcAspectMask; + resolveRegion.srcSubresource.mipLevel = region.srcSubres.mipLevel; + resolveRegion.srcSubresource.baseArrayLayer = region.srcSubres.baseArrayLayer; + resolveRegion.srcSubresource.layerCount = region.srcSubres.layerCount; + + resolveRegion.dstSubresource.aspectMask = dstAspectMask; + resolveRegion.dstSubresource.mipLevel = region.dstSubres.mipLevel; + resolveRegion.dstSubresource.baseArrayLayer = region.dstSubres.baseArrayLayer; + resolveRegion.dstSubresource.layerCount = region.dstSubres.layerCount; + + resolveRegion.srcOffset.x = region.srcOffset.x; + resolveRegion.srcOffset.y = region.srcOffset.y; + resolveRegion.srcOffset.z = region.srcOffset.z; + + resolveRegion.dstOffset.x = region.dstOffset.x; + resolveRegion.dstOffset.y = region.dstOffset.y; + resolveRegion.dstOffset.z = region.dstOffset.z; + + resolveRegion.extent.width = region.extent.width; + resolveRegion.extent.height = region.extent.height; + resolveRegion.extent.depth = region.extent.depth; + } + vkCmdResolveImage(_gpuCommandBuffer->vkCommandBuffer, srcImage, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dstImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, count, resolveRegions.data()); +} + void CCVKCommandBuffer::copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) { VkImageAspectFlags srcAspectMask = VK_IMAGE_ASPECT_COLOR_BIT; VkImageAspectFlags dstAspectMask = VK_IMAGE_ASPECT_COLOR_BIT; diff --git a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h index 3438684cbe9..1eae85158ed 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h +++ b/native/cocos/renderer/gfx-vulkan/VKCommandBuffer.h @@ -58,6 +58,7 @@ class CC_VULKAN_API CCVKCommandBuffer final : public CommandBuffer { void copyBuffersToTexture(const uint8_t *const *buffers, Texture *texture, const BufferTextureCopy *regions, uint32_t count) override; void blitTexture(Texture *srcTexture, Texture *dstTexture, const TextureBlit *regions, uint32_t count, Filter filter) override; void copyTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; + void resolveTexture(Texture *srcTexture, Texture *dstTexture, const TextureCopy *regions, uint32_t count) override; void execute(CommandBuffer *const *cmdBuffs, uint32_t count) override; void dispatch(const DispatchInfo &info) override; void pipelineBarrier(const GeneralBarrier *barrier, const BufferBarrier *const *bufferBarriers, const Buffer *const *buffers, uint32_t bufferBarrierCount, const TextureBarrier *const *textureBarriers, const Texture *const *textures, uint32_t textureBarrierCount) override; diff --git a/native/cocos/renderer/gfx-vulkan/VKCommands.cpp b/native/cocos/renderer/gfx-vulkan/VKCommands.cpp index 4d65e96f6c6..cf098298382 100644 --- a/native/cocos/renderer/gfx-vulkan/VKCommands.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKCommands.cpp @@ -119,11 +119,6 @@ void cmdFuncCCVKCreateTexture(CCVKDevice *device, CCVKGPUTexture *gpuTexture) { if (!gpuTexture->size) return; gpuTexture->aspectMask = mapVkImageAspectFlags(gpuTexture->format); - // storage images has to be in general layout - // if (hasFlag(gpuTexture->usage, TextureUsageBit::STORAGE)) gpuTexture->flags |= TextureFlagBit::GENERAL_LAYOUT; - // remove stencil aspect for depth textures with sampled usage - if (hasFlag(gpuTexture->usage, TextureUsageBit::SAMPLED)) gpuTexture->aspectMask &= ~VK_IMAGE_ASPECT_STENCIL_BIT; - auto createFn = [device, gpuTexture](VkImage *pVkImage, VmaAllocation *pVmaAllocation) { VkFormat vkFormat = mapVkFormat(gpuTexture->format, device->gpuDevice()); VkFormatFeatureFlags features = mapVkFormatFeatureFlags(gpuTexture->usage); @@ -135,10 +130,7 @@ void cmdFuncCCVKCreateTexture(CCVKDevice *device, CCVKGPUTexture *gpuTexture) { return; } - VkImageUsageFlags usageFlags = mapVkImageUsageFlagBits(gpuTexture->usage); - if (hasFlag(gpuTexture->flags, TextureFlags::GEN_MIPMAP)) { - usageFlags |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; - } + VkImageUsageFlags usageFlags = mapVkImageUsageFlags(gpuTexture->usage, gpuTexture->flags); VkImageCreateInfo createInfo{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; createInfo.flags = mapVkImageCreateFlags(gpuTexture->type); @@ -147,7 +139,7 @@ void cmdFuncCCVKCreateTexture(CCVKDevice *device, CCVKGPUTexture *gpuTexture) { createInfo.extent = {gpuTexture->width, gpuTexture->height, gpuTexture->depth}; createInfo.mipLevels = gpuTexture->mipLevels; createInfo.arrayLayers = gpuTexture->arrayLayers; - createInfo.samples = device->gpuContext()->getSampleCountForAttachments(gpuTexture->format, vkFormat, gpuTexture->samples); + createInfo.samples = static_cast(gpuTexture->samples); createInfo.tiling = VK_IMAGE_TILING_OPTIMAL; createInfo.usage = usageFlags; createInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; @@ -156,23 +148,25 @@ void cmdFuncCCVKCreateTexture(CCVKDevice *device, CCVKGPUTexture *gpuTexture) { allocInfo.usage = VMA_MEMORY_USAGE_GPU_ONLY; VmaAllocationInfo res; - - if (ENABLE_LAZY_ALLOCATION && hasAllFlags(TEXTURE_USAGE_TRANSIENT, gpuTexture->usage)) { - createInfo.usage = usageFlags | VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + const VkFlags lazilyAllocatedFilterFlags = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | + VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | + VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT | + VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + if (hasFlag(gpuTexture->flags, TextureFlagBit::LAZILY_ALLOCATED) && + (lazilyAllocatedFilterFlags & usageFlags) == usageFlags) { allocInfo.usage = VMA_MEMORY_USAGE_GPU_LAZILY_ALLOCATED; VkResult result = vmaCreateImage(device->gpuDevice()->memoryAllocator, &createInfo, &allocInfo, pVkImage, pVmaAllocation, &res); if (!result) { - gpuTexture->memoryless = true; + gpuTexture->memoryAllocated = false; return; } - // feature not present, fallback - createInfo.usage = usageFlags; + // feature not present, fallback to device memory allocInfo.usage = VMA_MEMORY_USAGE_GPU_ONLY; } - gpuTexture->memoryless = false; + gpuTexture->memoryAllocated = true; VK_CHECK(vmaCreateImage(device->gpuDevice()->memoryAllocator, &createInfo, &allocInfo, pVkImage, pVmaAllocation, &res)); }; @@ -190,7 +184,7 @@ void cmdFuncCCVKCreateTexture(CCVKDevice *device, CCVKGPUTexture *gpuTexture) { gpuTexture->swapchainVkImages[i] = gpuTexture->swapchain->swapchainImages[i]; } } - gpuTexture->memoryless = true; + gpuTexture->memoryAllocated = false; } else if (hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_OES) || hasFlag(gpuTexture->flags, TextureFlagBit::EXTERNAL_NORMAL)) { gpuTexture->vkImage = gpuTexture->externalVKImage; } else { @@ -382,11 +376,18 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende ccstd::vector shadingRateReferences; const size_t colorAttachmentCount = gpuRenderPass->colorAttachments.size(); - const size_t hasDepth = gpuRenderPass->depthStencilAttachment.format != Format::UNKNOWN ? 1 : 0; - attachmentDescriptions.assign(colorAttachmentCount + hasDepth, {VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2}); - gpuRenderPass->clearValues.resize(colorAttachmentCount + hasDepth); - beginAccessInfos.resize(colorAttachmentCount + hasDepth); - endAccessInfos.resize(colorAttachmentCount + hasDepth); + const size_t hasDepthStencil = gpuRenderPass->depthStencilAttachment.format != Format::UNKNOWN ? 1 : 0; + const size_t hasDepthResolve = gpuRenderPass->depthStencilResolveAttachment.format != Format::UNKNOWN ? 1 : 0; + auto attachmentCount = static_cast(colorAttachmentCount + hasDepthStencil + hasDepthResolve); + uint32_t depthIndex = colorAttachmentCount; + uint32_t stencilIndex = colorAttachmentCount + 1; + + const bool hasStencil = GFX_FORMAT_INFOS[toNumber(gpuRenderPass->depthStencilAttachment.format)].hasStencil; + + attachmentDescriptions.assign(attachmentCount, {VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2}); + gpuRenderPass->clearValues.resize(attachmentCount); + beginAccessInfos.resize(attachmentCount); + endAccessInfos.resize(attachmentCount); shadingRateReferences.resize(gpuRenderPass->subpasses.size(), {VK_STRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR}); for (size_t i = 0U; i < colorAttachmentCount; ++i) { @@ -395,34 +396,43 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende getInitialFinalLayout(device, static_cast(attachment.barrier), false); VkFormat vkFormat = mapVkFormat(attachment.format, device->gpuDevice()); - bool hasStencil = GFX_FORMAT_INFOS[toNumber(attachment.format)].hasStencil; - VkSampleCountFlagBits samples = device->gpuContext()->getSampleCountForAttachments(attachment.format, vkFormat, attachment.sampleCount); - attachmentDescriptions[i].format = vkFormat; - attachmentDescriptions[i].samples = samples; + attachmentDescriptions[i].samples = static_cast(attachment.sampleCount); attachmentDescriptions[i].loadOp = mapVkLoadOp(attachment.loadOp); attachmentDescriptions[i].storeOp = mapVkStoreOp(attachment.storeOp); - attachmentDescriptions[i].stencilLoadOp = hasStencil ? attachmentDescriptions[i].loadOp : VK_ATTACHMENT_LOAD_OP_DONT_CARE; - attachmentDescriptions[i].stencilStoreOp = hasStencil ? attachmentDescriptions[i].storeOp : VK_ATTACHMENT_STORE_OP_DONT_CARE; + attachmentDescriptions[i].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + attachmentDescriptions[i].stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; attachmentDescriptions[i].initialLayout = attachment.loadOp == gfx::LoadOp::DISCARD ? VK_IMAGE_LAYOUT_UNDEFINED : initialLayout; attachmentDescriptions[i].finalLayout = finalLayout; } - if (hasDepth) { - const DepthStencilAttachment &depthStencilAttachment = gpuRenderPass->depthStencilAttachment; - auto [initialLayout, finalLayout] = getInitialFinalLayout(device, static_cast(depthStencilAttachment.barrier), true); - - VkFormat vkFormat = mapVkFormat(depthStencilAttachment.format, device->gpuDevice()); - bool hasStencil = GFX_FORMAT_INFOS[toNumber(depthStencilAttachment.format)].hasStencil; - VkSampleCountFlagBits samples = device->gpuContext()->getSampleCountForAttachments(depthStencilAttachment.format, vkFormat, depthStencilAttachment.sampleCount); - - attachmentDescriptions[colorAttachmentCount].format = vkFormat; - attachmentDescriptions[colorAttachmentCount].samples = samples; - attachmentDescriptions[colorAttachmentCount].loadOp = mapVkLoadOp(depthStencilAttachment.depthLoadOp); - attachmentDescriptions[colorAttachmentCount].storeOp = mapVkStoreOp(depthStencilAttachment.depthStoreOp); - attachmentDescriptions[colorAttachmentCount].stencilLoadOp = hasStencil ? mapVkLoadOp(depthStencilAttachment.stencilLoadOp) : VK_ATTACHMENT_LOAD_OP_DONT_CARE; - attachmentDescriptions[colorAttachmentCount].stencilStoreOp = hasStencil ? mapVkStoreOp(depthStencilAttachment.stencilStoreOp) : VK_ATTACHMENT_STORE_OP_DONT_CARE; - attachmentDescriptions[colorAttachmentCount].initialLayout = depthStencilAttachment.depthLoadOp == gfx::LoadOp::DISCARD ? VK_IMAGE_LAYOUT_UNDEFINED : initialLayout; - attachmentDescriptions[colorAttachmentCount].finalLayout = finalLayout; + if (hasDepthStencil) { + const DepthStencilAttachment &attachment = gpuRenderPass->depthStencilAttachment; + auto [initialLayout, finalLayout] = getInitialFinalLayout(device, static_cast(attachment.barrier), true); + + VkFormat vkFormat = mapVkFormat(attachment.format, device->gpuDevice()); + attachmentDescriptions[depthIndex].format = vkFormat; + attachmentDescriptions[depthIndex].samples = static_cast(attachment.sampleCount); + attachmentDescriptions[depthIndex].loadOp = mapVkLoadOp(attachment.depthLoadOp); + attachmentDescriptions[depthIndex].storeOp = mapVkStoreOp(attachment.depthStoreOp); + attachmentDescriptions[depthIndex].stencilLoadOp = hasStencil ? mapVkLoadOp(attachment.stencilLoadOp) : VK_ATTACHMENT_LOAD_OP_DONT_CARE; + attachmentDescriptions[depthIndex].stencilStoreOp = hasStencil ? mapVkStoreOp(attachment.stencilStoreOp) : VK_ATTACHMENT_STORE_OP_DONT_CARE; + attachmentDescriptions[depthIndex].initialLayout = attachment.depthLoadOp == gfx::LoadOp::DISCARD ? VK_IMAGE_LAYOUT_UNDEFINED : initialLayout; + attachmentDescriptions[depthIndex].finalLayout = finalLayout; + } + if (hasDepthResolve) { + const DepthStencilAttachment &attachment = gpuRenderPass->depthStencilResolveAttachment; + auto [initialLayout, finalLayout] = getInitialFinalLayout(device, static_cast(attachment.barrier), true); + + VkFormat vkFormat = mapVkFormat(attachment.format, device->gpuDevice()); + + attachmentDescriptions[stencilIndex].format = vkFormat; + attachmentDescriptions[stencilIndex].samples = VK_SAMPLE_COUNT_1_BIT; + attachmentDescriptions[stencilIndex].loadOp = mapVkLoadOp(attachment.depthLoadOp); + attachmentDescriptions[stencilIndex].storeOp = mapVkStoreOp(attachment.depthStoreOp); + attachmentDescriptions[stencilIndex].stencilLoadOp = hasStencil ? mapVkLoadOp(attachment.stencilLoadOp) : VK_ATTACHMENT_LOAD_OP_DONT_CARE; + attachmentDescriptions[stencilIndex].stencilStoreOp = hasStencil ? mapVkStoreOp(attachment.stencilStoreOp) : VK_ATTACHMENT_STORE_OP_DONT_CARE; + attachmentDescriptions[stencilIndex].initialLayout = attachment.depthLoadOp == gfx::LoadOp::DISCARD ? VK_IMAGE_LAYOUT_UNDEFINED : initialLayout; + attachmentDescriptions[stencilIndex].finalLayout = finalLayout; } size_t subpassCount = gpuRenderPass->subpasses.size(); @@ -433,62 +443,41 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT; for (uint32_t input : subpassInfo.inputs) { + bool appearsInOutput = std::find(subpassInfo.colors.begin(), subpassInfo.colors.end(), input) != subpassInfo.colors.end(); if (input == gpuRenderPass->colorAttachments.size()) { - VkImageLayout layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL; + VkImageLayout layout = subpassInfo.depthStencil != INVALID_BINDING ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL; attachmentReferences.push_back({VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, nullptr, input, layout, VK_IMAGE_ASPECT_DEPTH_BIT}); } else { - VkImageLayout layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + VkImageLayout layout = appearsInOutput ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; attachmentReferences.push_back({VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, nullptr, input, layout, VK_IMAGE_ASPECT_COLOR_BIT}); } } for (uint32_t color : subpassInfo.colors) { - const ColorAttachment &desc = gpuRenderPass->colorAttachments[color]; const VkAttachmentDescription2 &attachment = attachmentDescriptions[color]; bool appearsInInput = std::find(subpassInfo.inputs.begin(), subpassInfo.inputs.end(), color) != subpassInfo.inputs.end(); VkImageLayout layout = appearsInInput ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; attachmentReferences.push_back({VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, nullptr, color, layout, VK_IMAGE_ASPECT_COLOR_BIT}); sampleCount = std::max(sampleCount, attachment.samples); } - for (uint32_t resolve : subpassInfo.resolves) { - VkImageLayout layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; + for (uint32_t resolveIn : subpassInfo.resolves) { + VkImageLayout layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + auto resolve = resolveIn == gfx::INVALID_BINDING ? VK_ATTACHMENT_UNUSED : resolveIn; + CC_ASSERT(INVALID_BINDING == VK_ATTACHMENT_UNUSED); attachmentReferences.push_back({VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, nullptr, resolve, layout, VK_IMAGE_ASPECT_COLOR_BIT}); } if (subpassInfo.depthStencil != INVALID_BINDING) { - Format dsFormat{Format::UNKNOWN}; - if (subpassInfo.depthStencil >= colorAttachmentCount) { - const DepthStencilAttachment &desc = gpuRenderPass->depthStencilAttachment; - const VkAttachmentDescription2 &attachment = attachmentDescriptions.back(); - dsFormat = desc.format; - sampleCount = std::max(sampleCount, attachment.samples); - } else { - const ColorAttachment &desc = gpuRenderPass->colorAttachments[subpassInfo.depthStencil]; - const VkAttachmentDescription2 &attachment = attachmentDescriptions[subpassInfo.depthStencil]; - dsFormat = desc.format; - sampleCount = std::max(sampleCount, attachment.samples); - } + const VkAttachmentDescription2 &attachment = attachmentDescriptions[subpassInfo.depthStencil]; + sampleCount = std::max(sampleCount, attachment.samples); bool appearsInInput = std::find(subpassInfo.inputs.begin(), subpassInfo.inputs.end(), subpassInfo.depthStencil) != subpassInfo.inputs.end(); - VkImageAspectFlags aspect = GFX_FORMAT_INFOS[toNumber(dsFormat)].hasStencil - ? VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT - : VK_IMAGE_ASPECT_DEPTH_BIT; + VkImageAspectFlags aspect = hasStencil ? VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT : VK_IMAGE_ASPECT_DEPTH_BIT; VkImageLayout layout = appearsInInput ? VK_IMAGE_LAYOUT_GENERAL : VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; attachmentReferences.push_back({VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, nullptr, subpassInfo.depthStencil, layout, aspect}); } if (subpassInfo.depthStencilResolve != INVALID_BINDING) { - Format dsFormat{Format::UNKNOWN}; - if (subpassInfo.depthStencilResolve >= colorAttachmentCount) { - const DepthStencilAttachment &desc = gpuRenderPass->depthStencilAttachment; - dsFormat = desc.format; - } else { - const ColorAttachment &desc = gpuRenderPass->colorAttachments[subpassInfo.depthStencilResolve]; - dsFormat = desc.format; - } - - VkImageAspectFlags aspect = GFX_FORMAT_INFOS[toNumber(dsFormat)].hasStencil - ? VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT - : VK_IMAGE_ASPECT_DEPTH_BIT; + VkImageAspectFlags aspect = hasStencil ? VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT : VK_IMAGE_ASPECT_DEPTH_BIT; VkImageLayout layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL; attachmentReferences.push_back({VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2, nullptr, subpassInfo.depthStencilResolve, layout, aspect}); } @@ -547,8 +536,14 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende VkResolveModeFlagBits depthResolveMode = VK_RESOLVE_MODES[toNumber(subpassInfo.depthResolveMode)]; VkResolveModeFlagBits stencilResolveMode = VK_RESOLVE_MODES[toNumber(subpassInfo.stencilResolveMode)]; - if ((depthResolveMode & prop.supportedDepthResolveModes) == 0) depthResolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT; - if ((stencilResolveMode & prop.supportedStencilResolveModes) == 0) stencilResolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT; + if ((depthResolveMode & prop.supportedDepthResolveModes) == 0) { + depthResolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT; + CC_LOG_WARNING("render pass depth resolve mode [%u] not supported, use Sample0 instead.", toNumber(subpassInfo.depthResolveMode)); + } + if ((stencilResolveMode & prop.supportedStencilResolveModes) == 0) { + stencilResolveMode = VK_RESOLVE_MODE_SAMPLE_ZERO_BIT; + CC_LOG_WARNING("render pass stencil resolve mode [%u] not supported, use Sample0 instead.", toNumber(subpassInfo.stencilResolveMode)); + } if (!prop.independentResolveNone && stencilResolveMode != depthResolveMode) { stencilResolveMode = depthResolveMode; @@ -572,6 +567,7 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende } size_t dependencyCount = gpuRenderPass->dependencies.size(); + gpuRenderPass->hasSelfDependency.resize(subpassCount, false); dependencyManager.clear(); bool manuallyDeduce = true; @@ -584,8 +580,6 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende if (!manuallyDeduce) { // offset = 0U; ccstd::unordered_set subpassExternalFilter; - - gpuRenderPass->hasSelfDependency.resize(subpassCount, false); for (uint32_t i = 0U; i < dependencyCount; ++i) { const auto &dependency{gpuRenderPass->dependencies[i]}; VkSubpassDependency2 vkDependency{VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2}; @@ -669,8 +663,8 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende } } }; - attachmentStatistics.resize(colorAttachmentCount + hasDepth); - for (uint32_t i = 0U; i < utils ::toUint(colorAttachmentCount + hasDepth); ++i) { + attachmentStatistics.resize(attachmentCount); + for (uint32_t i = 0U; i < utils ::toUint(attachmentCount); ++i) { attachmentStatistics[i].clear(); calculateLifeCycle(i, attachmentStatistics[i]); CC_ASSERT(attachmentStatistics[i].loadSubpass != VK_SUBPASS_EXTERNAL && @@ -697,7 +691,7 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende VkSubpassDependency2 beginDependency; uint32_t lastLoadSubpass{VK_SUBPASS_EXTERNAL}; bool beginDependencyValid{false}; - for (uint32_t i = 0U; i < utils ::toUint(colorAttachmentCount + hasDepth); ++i) { + for (uint32_t i = 0U; i < attachmentCount; ++i) { auto &statistics = attachmentStatistics[i]; if (lastLoadSubpass != statistics.loadSubpass) { if (beginDependencyValid) dependencyManager.append(beginDependency); @@ -729,7 +723,7 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende VkSubpassDependency2 endDependency; uint32_t lastStoreSubpass{VK_SUBPASS_EXTERNAL}; bool endDependencyValid{false}; - for (uint32_t i = 0U; i < utils ::toUint(colorAttachmentCount + hasDepth); ++i) { + for (uint32_t i = 0U; i < attachmentCount; ++i) { auto &statistics = attachmentStatistics[i]; if (lastStoreSubpass != statistics.storeSubpass) { if (endDependencyValid) dependencyManager.append(endDependency); @@ -759,7 +753,7 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende dependency.dependencyFlags = VK_DEPENDENCY_BY_REGION_BIT; return dependency; }; - for (size_t i = 0U; i < colorAttachmentCount + hasDepth; ++i) { + for (size_t i = 0U; i < attachmentCount; ++i) { auto &statistics{attachmentStatistics[i]}; const AttachmentStatistics::SubpassRef *prevRef{nullptr}; @@ -788,8 +782,12 @@ void cmdFuncCCVKCreateRenderPass(CCVKDevice *device, CCVKGPURenderPass *gpuRende void cmdFuncCCVKCreateFramebuffer(CCVKDevice *device, CCVKGPUFramebuffer *gpuFramebuffer) { size_t colorViewCount = gpuFramebuffer->gpuColorViews.size(); - bool hasDepth = gpuFramebuffer->gpuRenderPass->depthStencilAttachment.format != Format::UNKNOWN; - ccstd::vector attachments(colorViewCount + hasDepth); + const auto *gpuRenderPass = gpuFramebuffer->gpuRenderPass.get(); + const size_t hasDepthStencil = gpuRenderPass->depthStencilAttachment.format != Format::UNKNOWN ? 1 : 0; + const size_t hasDepthResolve = gpuRenderPass->depthStencilResolveAttachment.format != Format::UNKNOWN ? 1 : 0; + auto attachmentCount = static_cast(colorViewCount + hasDepthStencil + hasDepthResolve); + + ccstd::vector attachments(attachmentCount); VkFramebufferCreateInfo createInfo{VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO}; createInfo.width = createInfo.height = UINT_MAX; @@ -809,14 +807,20 @@ void cmdFuncCCVKCreateFramebuffer(CCVKDevice *device, CCVKGPUFramebuffer *gpuFra createInfo.height = std::min(createInfo.height, std::max(1U, gpuFramebuffer->gpuColorViews[i]->gpuTexture->height >> gpuFramebuffer->gpuColorViews[i]->baseLevel)); } } - if (hasDepth) { + if (hasDepthStencil) { if (gpuFramebuffer->gpuDepthStencilView->gpuTexture->swapchain) { gpuFramebuffer->swapchain = gpuFramebuffer->gpuDepthStencilView->gpuTexture->swapchain; swapchainImageIndices |= (1 << colorViewCount); } else { attachments[colorViewCount] = gpuFramebuffer->gpuDepthStencilView->vkImageView; } + createInfo.width = std::min(createInfo.width, std::max(1U, gpuFramebuffer->gpuDepthStencilView->gpuTexture->width >> gpuFramebuffer->gpuDepthStencilView->baseLevel)); + createInfo.height = std::min(createInfo.height, std::max(1U, gpuFramebuffer->gpuDepthStencilView->gpuTexture->height >> gpuFramebuffer->gpuDepthStencilView->baseLevel)); + } + if (hasDepthResolve) { + attachments[colorViewCount + 1] = gpuFramebuffer->gpuDepthStencilResolveView->vkImageView; } + gpuFramebuffer->isOffscreen = !swapchainImageIndices; gpuFramebuffer->width = createInfo.width; gpuFramebuffer->height = createInfo.height; @@ -1590,33 +1594,6 @@ bool CCVKGPURenderPass::hasShadingAttachment(uint32_t subPassId) const { return subpasses[subPassId].shadingRate != INVALID_BINDING; } -VkSampleCountFlagBits CCVKGPUContext::getSampleCountForAttachments(Format format, VkFormat vkFormat, SampleCount sampleCount) const { - if (sampleCount <= SampleCount::ONE) return VK_SAMPLE_COUNT_1_BIT; - - static ccstd::unordered_map cacheMap; - if (!cacheMap.count(format)) { - bool hasDepth = GFX_FORMAT_INFOS[toNumber(format)].hasDepth; - VkImageUsageFlags usages = hasDepth ? VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT : VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT; - - VkImageFormatProperties properties; - vkGetPhysicalDeviceImageFormatProperties(physicalDevice, vkFormat, VK_IMAGE_TYPE_2D, - VK_IMAGE_TILING_OPTIMAL, usages, 0, &properties); - cacheMap[format] = properties.sampleCounts; - } - - VkSampleCountFlags availableSampleCounts = cacheMap[format]; - - auto requestedSampleCount = VK_SAMPLE_COUNT_FLAGS[toNumber(sampleCount)]; - if (requestedSampleCount & availableSampleCounts & VK_SAMPLE_COUNT_64_BIT) return VK_SAMPLE_COUNT_64_BIT; - if (requestedSampleCount & availableSampleCounts & VK_SAMPLE_COUNT_32_BIT) return VK_SAMPLE_COUNT_32_BIT; - if (requestedSampleCount & availableSampleCounts & VK_SAMPLE_COUNT_16_BIT) return VK_SAMPLE_COUNT_16_BIT; - if (requestedSampleCount & availableSampleCounts & VK_SAMPLE_COUNT_8_BIT) return VK_SAMPLE_COUNT_8_BIT; - if (requestedSampleCount & availableSampleCounts & VK_SAMPLE_COUNT_4_BIT) return VK_SAMPLE_COUNT_4_BIT; - if (requestedSampleCount & availableSampleCounts & VK_SAMPLE_COUNT_2_BIT) return VK_SAMPLE_COUNT_2_BIT; - - return VK_SAMPLE_COUNT_1_BIT; -} - void CCVKGPUBarrierManager::update(CCVKGPUTransportHub *transportHub) { if (_buffersToBeChecked.empty() && _texturesToBeChecked.empty()) return; diff --git a/native/cocos/renderer/gfx-vulkan/VKDevice.cpp b/native/cocos/renderer/gfx-vulkan/VKDevice.cpp index acc577be13c..85d9bacdfcb 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDevice.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKDevice.cpp @@ -768,6 +768,7 @@ void CCVKDevice::initDeviceFeature() { _features[toNumber(Feature::SUBPASS_COLOR_INPUT)] = true; _features[toNumber(Feature::SUBPASS_DEPTH_STENCIL_INPUT)] = true; _features[toNumber(Feature::RASTERIZATION_ORDER_NOCOHERENT)] = true; + _features[toNumber(Feature::MULTI_SAMPLE_RESOLVE_DEPTH_STENCIL)] = checkExtension("VK_KHR_depth_stencil_resolve"); } void CCVKDevice::initFormatFeature() { @@ -1084,5 +1085,23 @@ static VkResult VKAPI_PTR vkCreateRenderPass2KHRFallback( return vkCreateRenderPass(device, &renderPassCreateInfo, pAllocator, pRenderPass); } +SampleCount CCVKDevice::getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const { + auto vkFormat = mapVkFormat(format, gpuDevice()); + auto usages = mapVkImageUsageFlags(usage, flags); + + VkImageFormatProperties imageFormatProperties = {}; + vkGetPhysicalDeviceImageFormatProperties(_gpuContext->physicalDevice, vkFormat, VK_IMAGE_TYPE_2D, + VK_IMAGE_TILING_OPTIMAL, usages, 0, &imageFormatProperties); + + if (imageFormatProperties.sampleCounts & VK_SAMPLE_COUNT_64_BIT) return SampleCount::X64; + if (imageFormatProperties.sampleCounts & VK_SAMPLE_COUNT_32_BIT) return SampleCount::X32; + if (imageFormatProperties.sampleCounts & VK_SAMPLE_COUNT_16_BIT) return SampleCount::X16; + if (imageFormatProperties.sampleCounts & VK_SAMPLE_COUNT_8_BIT) return SampleCount::X8; + if (imageFormatProperties.sampleCounts & VK_SAMPLE_COUNT_4_BIT) return SampleCount::X4; + if (imageFormatProperties.sampleCounts & VK_SAMPLE_COUNT_2_BIT) return SampleCount::X2; + + return SampleCount::X1; +} + } // namespace gfx } // namespace cc diff --git a/native/cocos/renderer/gfx-vulkan/VKDevice.h b/native/cocos/renderer/gfx-vulkan/VKDevice.h index c53f6cb20ad..4d7d9c938a8 100644 --- a/native/cocos/renderer/gfx-vulkan/VKDevice.h +++ b/native/cocos/renderer/gfx-vulkan/VKDevice.h @@ -105,7 +105,7 @@ class CC_VULKAN_API CCVKDevice final : public Device { void waitAllFences(); void updateBackBufferCount(uint32_t backBufferCount); - + SampleCount getMaxSampleCount(Format format, TextureUsage usage, TextureFlags flags) const override; protected: static CCVKDevice *instance; diff --git a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp index efb463ba464..7bf4d5d2881 100644 --- a/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKFramebuffer.cpp @@ -54,6 +54,11 @@ void CCVKFramebuffer::doInit(const FramebufferInfo & /*info*/) { _gpuFBO->gpuDepthStencilView = depthTex->gpuTextureView(); } + if (_depthStencilResolveTexture) { + auto *depthTex = static_cast(_depthStencilResolveTexture); + _gpuFBO->gpuDepthStencilResolveView = depthTex->gpuTextureView(); + } + cmdFuncCCVKCreateFramebuffer(CCVKDevice::getInstance(), _gpuFBO); } diff --git a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h index c47e4a76fae..cb386223c67 100644 --- a/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h +++ b/native/cocos/renderer/gfx-vulkan/VKGPUObjects.h @@ -71,8 +71,6 @@ class CCVKGPUContext final { return std::strcmp(ext, extension.c_str()) == 0; }); } - - VkSampleCountFlagBits getSampleCountForAttachments(Format format, VkFormat vkFormat, SampleCount sampleCount) const; }; struct CCVKAccessInfo { @@ -119,6 +117,7 @@ class CCVKGPURenderPass final : public CCVKGPUDeviceObject { ColorAttachmentList colorAttachments; DepthStencilAttachment depthStencilAttachment; + DepthStencilAttachment depthStencilResolveAttachment; SubpassInfoList subpasses; SubpassDependencyList dependencies; @@ -148,10 +147,19 @@ struct CCVKGPUTexture : public CCVKGPUDeviceObject { uint32_t size = 0U; uint32_t arrayLayers = 1U; uint32_t mipLevels = 1U; - SampleCount samples = SampleCount::ONE; + SampleCount samples = SampleCount::X1; TextureFlags flags = TextureFlagBit::NONE; VkImageAspectFlags aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - bool memoryless = false; + + /* + * allocate and bind memory by Texture. + * If any of the following conditions are met, then the statement is false + * 1. Texture is a swapchain image. + * 2. Texture has flag LAZILY_ALLOCATED. + * 3. Memory bound manually bound. + * 4. Sparse Image. + */ + bool memoryAllocated = true; VkImage vkImage = VK_NULL_HANDLE; VmaAllocation vmaAllocation = VK_NULL_HANDLE; @@ -258,6 +266,7 @@ struct CCVKGPUFramebuffer : public CCVKGPUDeviceObject { ConstPtr gpuRenderPass; ccstd::vector> gpuColorViews; ConstPtr gpuDepthStencilView; + ConstPtr gpuDepthStencilResolveView; VkFramebuffer vkFramebuffer = VK_NULL_HANDLE; std::vector vkFrameBuffers; CCVKGPUSwapchain *swapchain = nullptr; diff --git a/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp b/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp index 8597bf22a8b..ce705b9ee89 100644 --- a/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKRenderPass.cpp @@ -41,6 +41,7 @@ void CCVKRenderPass::doInit(const RenderPassInfo & /*info*/) { _gpuRenderPass = ccnew CCVKGPURenderPass; _gpuRenderPass->colorAttachments = _colorAttachments; _gpuRenderPass->depthStencilAttachment = _depthStencilAttachment; + _gpuRenderPass->depthStencilResolveAttachment = _depthStencilResolveAttachment; _gpuRenderPass->subpasses = _subpasses; _gpuRenderPass->dependencies = _dependencies; @@ -56,14 +57,17 @@ void CCVKRenderPass::doInit(const RenderPassInfo & /*info*/) { if (_depthStencilAttachment.format != Format::UNKNOWN) { subpass.depthStencil = colorCount; } + if (_depthStencilResolveAttachment.format != Format::UNKNOWN) { + subpass.depthStencilResolve = colorCount + 1; + } } else { // unify depth stencil index for (auto &subpass : _gpuRenderPass->subpasses) { - if (subpass.depthStencil != INVALID_BINDING && subpass.depthStencil > colorCount) { + if (subpass.depthStencil != INVALID_BINDING && subpass.depthStencil >= colorCount) { subpass.depthStencil = colorCount; } - if (subpass.depthStencilResolve != INVALID_BINDING && subpass.depthStencilResolve > colorCount) { - subpass.depthStencilResolve = colorCount; + if (subpass.depthStencilResolve != INVALID_BINDING && subpass.depthStencilResolve >= colorCount) { + subpass.depthStencilResolve = colorCount + 1; } } } diff --git a/native/cocos/renderer/gfx-vulkan/VKTexture.cpp b/native/cocos/renderer/gfx-vulkan/VKTexture.cpp index 8af0555a995..5f0a3e85b47 100644 --- a/native/cocos/renderer/gfx-vulkan/VKTexture.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKTexture.cpp @@ -60,7 +60,7 @@ void CCVKTexture::createTexture(uint32_t width, uint32_t height, uint32_t size, if (_swapchain != nullptr) { _gpuTexture->swapchain = static_cast(_swapchain)->gpuSwapchain(); - _gpuTexture->memoryless = true; + _gpuTexture->memoryAllocated = false; } _gpuTexture->type = _info.type; @@ -121,14 +121,14 @@ void CCVKTexture::doInit(const SwapchainTextureInfo & /*info*/) { void CCVKGPUTexture::init() { cmdFuncCCVKCreateTexture(CCVKDevice::getInstance(), this); - if (!memoryless) { + if (memoryAllocated) { CCVKDevice::getInstance()->getMemoryStatus().textureSize += size; CC_PROFILE_MEMORY_INC(Texture, size); } } void CCVKGPUTexture::shutdown() { - if (!memoryless) { + if (memoryAllocated) { CCVKDevice::getInstance()->getMemoryStatus().textureSize -= size; CC_PROFILE_MEMORY_DEC(Texture, size); } diff --git a/native/cocos/renderer/gfx-vulkan/VKUtils.cpp b/native/cocos/renderer/gfx-vulkan/VKUtils.cpp index 2b328b47e18..4d9c78dfc6e 100644 --- a/native/cocos/renderer/gfx-vulkan/VKUtils.cpp +++ b/native/cocos/renderer/gfx-vulkan/VKUtils.cpp @@ -229,8 +229,8 @@ VkFormatFeatureFlags mapVkFormatFeatureFlags(TextureUsage usage) { return static_cast(flags); } -VkImageUsageFlagBits mapVkImageUsageFlagBits(TextureUsage usage) { - uint32_t flags = 0U; +VkImageUsageFlags mapVkImageUsageFlags(TextureUsage usage, TextureFlags textureFlags) { + VkImageUsageFlags flags = 0; if (hasFlag(usage, TextureUsage::TRANSFER_SRC)) flags |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; if (hasFlag(usage, TextureUsage::TRANSFER_DST)) flags |= VK_IMAGE_USAGE_TRANSFER_DST_BIT; if (hasFlag(usage, TextureUsage::SAMPLED)) flags |= VK_IMAGE_USAGE_SAMPLED_BIT; @@ -239,7 +239,14 @@ VkImageUsageFlagBits mapVkImageUsageFlagBits(TextureUsage usage) { if (hasFlag(usage, TextureUsage::DEPTH_STENCIL_ATTACHMENT)) flags |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT; if (hasFlag(usage, TextureUsage::INPUT_ATTACHMENT)) flags |= VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT; if (hasFlag(usage, TextureUsage::SHADING_RATE)) flags |= VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; - return static_cast(flags); + + if (hasFlag(textureFlags, TextureFlags::GEN_MIPMAP)) { + flags |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; + } + if (hasFlag(textureFlags, TextureFlags::LAZILY_ALLOCATED)) { + flags |= VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT; + } + return flags; } VkImageAspectFlags mapVkImageAspectFlags(Format format) { @@ -493,17 +500,6 @@ const VkStencilFaceFlags VK_STENCIL_FACE_FLAGS[] = { VK_STENCIL_FACE_FRONT_AND_BACK, }; -const VkSampleCountFlags VK_SAMPLE_COUNT_FLAGS[] = { - VK_SAMPLE_COUNT_1_BIT, - VK_SAMPLE_COUNT_2_BIT, -#if CC_PLATFORM == CC_PLATFORM_ANDROID || CC_PLATFORM == CC_PLATFORM_IOS - VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_2_BIT, -#else // desktop platforms - VK_SAMPLE_COUNT_8_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_2_BIT, -#endif - VK_SAMPLE_COUNT_16_BIT | VK_SAMPLE_COUNT_8_BIT | VK_SAMPLE_COUNT_4_BIT | VK_SAMPLE_COUNT_2_BIT, -}; - const VkAccessFlags FULL_ACCESS_FLAGS = VK_ACCESS_INDIRECT_COMMAND_READ_BIT | VK_ACCESS_INDEX_READ_BIT | diff --git a/native/cocos/renderer/gfx-vulkan/VKUtils.h b/native/cocos/renderer/gfx-vulkan/VKUtils.h index 4b7ac04abee..26bf88d35ea 100644 --- a/native/cocos/renderer/gfx-vulkan/VKUtils.h +++ b/native/cocos/renderer/gfx-vulkan/VKUtils.h @@ -58,7 +58,7 @@ VkAttachmentStoreOp mapVkStoreOp(StoreOp storeOp); VkBufferUsageFlagBits mapVkBufferUsageFlagBits(BufferUsage usage); VkImageType mapVkImageType(TextureType type); VkFormatFeatureFlags mapVkFormatFeatureFlags(TextureUsage usage); -VkImageUsageFlagBits mapVkImageUsageFlagBits(TextureUsage usage); +VkImageUsageFlags mapVkImageUsageFlags(TextureUsage usage, TextureFlags textureFlags); VkImageAspectFlags mapVkImageAspectFlags(Format format); VkImageCreateFlags mapVkImageCreateFlags(TextureType type); VkImageViewType mapVkImageViewType(TextureType viewType); @@ -94,7 +94,6 @@ extern const VkPipelineBindPoint VK_PIPELINE_BIND_POINTS[]; extern const VkResolveModeFlagBits VK_RESOLVE_MODES[]; extern const VkImageLayout VK_IMAGE_LAYOUTS[]; extern const VkStencilFaceFlags VK_STENCIL_FACE_FLAGS[]; -extern const VkSampleCountFlags VK_SAMPLE_COUNT_FLAGS[]; extern const VkAccessFlags FULL_ACCESS_FLAGS; } // namespace gfx diff --git a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp index b9f2c8b0703..432b1ad9ef7 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUDescriptorSetLayout.cpp @@ -169,7 +169,7 @@ void CCWGPUDescriptorSetLayout::updateTextureLayout(uint8_t binding, const CCWGP const CCWGPUTexture *ccTex = static_cast(texture->isTextureView() ? texture->getViewInfo().texture : texture); TextureType type = ccTex->getViewInfo().type; (*iter).texture.viewDimension = toWGPUTextureViewDimension(type); - (*iter).texture.multisampled = ccTex->getInfo().samples != SampleCount::ONE; + (*iter).texture.multisampled = ccTex->getInfo().samples != SampleCount::X1; } } else { (*iter).texture.nextInChain = nullptr; diff --git a/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp b/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp index 467e0f1639d..dc425a1ae64 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPURenderPass.cpp @@ -36,13 +36,13 @@ using namespace emscripten; class CCWGPURenderPassHelper { public: explicit CCWGPURenderPassHelper(const RenderPassInfo &info) { - SampleCount samples = SampleCount::ONE; + SampleCount samples = SampleCount::X1; for (size_t i = 0; i < info.colorAttachments.size(); i++) { colors[i].loadOp = toWGPULoadOp(info.colorAttachments[i].loadOp); colors[i].storeOp = toWGPUStoreOp(info.colorAttachments[i].storeOp); colors[i].clearValue = defaultClearColor; // TODO_Zeqaing : subpass - if (info.colorAttachments[i].sampleCount != SampleCount::ONE) + if (info.colorAttachments[i].sampleCount != SampleCount::X1) samples = info.colorAttachments[i].sampleCount; } @@ -54,7 +54,7 @@ class CCWGPURenderPassHelper { depthStencils[0].depthClearValue = defaultClearDepth; depthStencils[0].depthReadOnly = false; depthStencils[0].stencilReadOnly = false; - if (samples == SampleCount::ONE) + if (samples == SampleCount::X1) samples = info.depthStencilAttachment.sampleCount; renderPassDesc = ccnew WGPURenderPassDescriptor; @@ -106,4 +106,4 @@ void CCWGPURenderPass::doDestroy() { } } // namespace gfx -} // namespace cc \ No newline at end of file +} // namespace cc diff --git a/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp b/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp index d3f486c99ba..77f723e0c13 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp +++ b/native/cocos/renderer/gfx-wgpu/WGPUTexture.cpp @@ -234,7 +234,7 @@ CCWGPUTexture *CCWGPUTexture::defaultCommonTexture() { .flags = TextureFlagBit::NONE, .layerCount = 1, .levelCount = 1, - .samples = SampleCount::ONE, + .samples = SampleCount::X1, .depth = 1, .externalRes = nullptr, }; @@ -256,7 +256,7 @@ CCWGPUTexture *CCWGPUTexture::defaultStorageTexture() { .flags = TextureFlagBit::NONE, .layerCount = 1, .levelCount = 1, - .samples = SampleCount::ONE, + .samples = SampleCount::X1, .depth = 1, .externalRes = nullptr, }; diff --git a/native/cocos/renderer/gfx-wgpu/WGPUUtils.h b/native/cocos/renderer/gfx-wgpu/WGPUUtils.h index 1ab82fb8fc3..f79f50c4896 100644 --- a/native/cocos/renderer/gfx-wgpu/WGPUUtils.h +++ b/native/cocos/renderer/gfx-wgpu/WGPUUtils.h @@ -395,21 +395,7 @@ static WGPUShaderStageFlags toWGPUShaderStageFlag(ShaderStageFlagBit flag) { // TODO_Zeqiang: more flexible strategy static uint32_t toWGPUSampleCount(SampleCount sampleCount) { - // TODO_Zeqiang: msaa - return 1; - switch (sampleCount) { - case SampleCount::ONE: - return 1; - case SampleCount::MULTIPLE_PERFORMANCE: - return 4; - case SampleCount::MULTIPLE_BALANCE: - return 4; - case SampleCount::MULTIPLE_QUALITY: - return 4; - default: - printf("unsupport sampleCount %d.", sampleCount); - return 1; - } + return static_cast(sampleCount); } // NONE = 0, diff --git a/native/cocos/renderer/pipeline/RenderPipeline.cpp b/native/cocos/renderer/pipeline/RenderPipeline.cpp index 7cbecfdf110..4dc96a47421 100644 --- a/native/cocos/renderer/pipeline/RenderPipeline.cpp +++ b/native/cocos/renderer/pipeline/RenderPipeline.cpp @@ -40,7 +40,7 @@ #if CC_USE_DEBUG_RENDERER #include "profiler/DebugRenderer.h" #endif -#include "custom/NativeUtils.h" +#include "custom/NativeBuiltinUtils.h" #include "scene/Camera.h" #include "scene/Skybox.h" diff --git a/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h b/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h index f89f2c4aa2c..0ac3830c647 100644 --- a/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h +++ b/native/cocos/renderer/pipeline/custom/FGDispatcherTypes.h @@ -114,7 +114,10 @@ struct LayoutAccess { struct FGRenderPassInfo { std::vector colorAccesses; LayoutAccess dsAccess; + LayoutAccess dsResolveAccess; gfx::RenderPassInfo rpInfo; + std::vector orderedViews; + bool needResolve{false}; }; struct ResourceAccessGraph { diff --git a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp index 7ea920e5133..1a2cffac76a 100644 --- a/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp +++ b/native/cocos/renderer/pipeline/custom/FrameGraphDispatcher.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "FGDispatcherGraphs.h" #include "FGDispatcherTypes.h" @@ -494,6 +495,9 @@ struct BarrierVisitor : public boost::bfs_visitor<> { dependency.srcSubpass = INVALID_ID; dependency.dstSubpass = subpassIdx; for (const auto &barrier : barriers.frontBarriers) { + if (barrier.beginStatus.accessFlag == gfx::AccessFlagBit::NONE) { + continue; + } auto resID = barrier.resourceID; auto findBarrierByResID = [resID](const Barrier &barrier) { return barrier.resourceID == resID; @@ -1034,7 +1038,8 @@ void buildBarriers(FrameGraphDispatcher &fgDispatcher) { if (batchedBarriers.find(i) == batchedBarriers.end()) { batchedBarriers.emplace(i, BarrierNode{}); auto &rpInfo = rag.rpInfos[i].rpInfo; - if (rpInfo.subpasses.size() > 1) { + // NOLINTNEXTLINE (readability-container-size-empty) + if (rpInfo.subpasses.size() >= 1) { batchedBarriers[i].subpassBarriers.resize(rpInfo.subpasses.size()); } } @@ -1097,8 +1102,9 @@ void buildBarriers(FrameGraphDispatcher &fgDispatcher) { // external res barrier for next frame for (const auto &externalPair : externalResMap) { + const auto &resName = externalPair.first; const auto &transition = externalPair.second; - auto resID = resourceGraph.valueIndex.at(externalPair.first); + auto resID = resourceGraph.valueIndex.at(resName); const auto &resTraits = get(ResourceGraph::TraitsTag{}, resourceGraph, resID); auto &rescStates = get(ResourceGraph::StatesTag{}, resourceGraph, resID); @@ -1107,7 +1113,7 @@ void buildBarriers(FrameGraphDispatcher &fgDispatcher) { // 1. resource been written in this frame; // 2. first meet in this frame (no idea if any writes in next frame) // 3. backbuffer present - bool needNextBarrier = (namesSet.find(externalPair.first) != namesSet.end()) || (rescStates.states == gfx::AccessFlagBit::NONE); + bool needNextBarrier = (namesSet.find(resName) != namesSet.end()) || (rescStates.states == gfx::AccessFlagBit::NONE); // persistant resource states cached here rescStates.states = transition.currStatus.accessFlag; @@ -1144,21 +1150,13 @@ void buildBarriers(FrameGraphDispatcher &fgDispatcher) { bool hasSubpass = !(batchedBarriers[passID].subpassBarriers.size() <= 1); if (hasSubpass) { - auto &subpassBarriers = batchedBarriers[passID].subpassBarriers; - for (int i = static_cast(subpassBarriers.size()) - 1; i >= 0; --i) { - auto findBarrierByResID = [resID](const Barrier &barrier) { - return barrier.resourceID == resID; - }; - - const auto &frontBarriers = subpassBarriers[i].frontBarriers; - auto &rearBarriers = subpassBarriers[i].rearBarriers; - auto found = std::find_if(frontBarriers.begin(), frontBarriers.end(), findBarrierByResID) != frontBarriers.end() || - std::find_if(rearBarriers.begin(), rearBarriers.end(), findBarrierByResID) != rearBarriers.end(); - if (found) { - rearBarriers.push_back(nextFrameResBarrier); - break; - } - } + // rpinfo instead + auto &fgRenderPassInfo = rag.rpInfos.at(passID); + auto iter = std::find(fgRenderPassInfo.orderedViews.begin(), fgRenderPassInfo.orderedViews.end(), resName.c_str()); + CC_ASSERT(iter != fgRenderPassInfo.orderedViews.end()); + auto index = std::distance(fgRenderPassInfo.orderedViews.begin(), iter); + index -= fgRenderPassInfo.rpInfo.depthStencilAttachment.format != gfx::Format::UNKNOWN; + fgRenderPassInfo.colorAccesses[index].nextAccess = nextFrameResBarrier.endStatus.accessFlag; } else { auto &rearBarriers = batchedBarriers[passID].blockBarrier.rearBarriers; rearBarriers.emplace_back(nextFrameResBarrier); @@ -1235,6 +1233,11 @@ void buildBarriers(FrameGraphDispatcher &fgDispatcher) { const auto &dsAccess = fgRenderpassInfo.dsAccess; dsAttachment.barrier = getGeneralBarrier(cc::gfx::Device::getInstance(), dsAccess.prevAccess, dsAccess.nextAccess); } + auto &dsResolveAttachment = fgRenderpassInfo.rpInfo.depthStencilResolveAttachment; + if (dsResolveAttachment.format != gfx::Format::UNKNOWN) { + const auto &dsAccess = fgRenderpassInfo.dsResolveAccess; + dsResolveAttachment.barrier = getGeneralBarrier(cc::gfx::Device::getInstance(), dsAccess.prevAccess, dsAccess.nextAccess); + } } } } @@ -1860,13 +1863,15 @@ auto getResourceStatus(PassType passType, const PmrString &name, gfx::MemoryAcce gfx::TextureUsage texUsage = gfx::TextureUsage::NONE; // TODO(Zeqiang): visbility of slot name "_" not found - if (memAccess == gfx::MemoryAccess::READ_ONLY) { + if (hasFlag(memAccess, gfx::MemoryAccess::READ_ONLY)) { if ((desc.flags & ResourceFlags::INPUT_ATTACHMENT) != ResourceFlags::NONE && rasterized) { texUsage |= (mapTextureFlags(desc.flags) & (gfx::TextureUsage::COLOR_ATTACHMENT | gfx::TextureUsage::DEPTH_STENCIL_ATTACHMENT | gfx::TextureUsage::INPUT_ATTACHMENT)); } else { texUsage |= (mapTextureFlags(desc.flags) & (gfx::TextureUsage::SAMPLED | gfx::TextureUsage::STORAGE | gfx::TextureUsage::SHADING_RATE | gfx::TextureUsage::DEPTH_STENCIL_ATTACHMENT)); } - } else { + } + + if (hasFlag(memAccess, gfx::MemoryAccess::WRITE_ONLY)) { texUsage |= (mapTextureFlags(desc.flags) & (gfx::TextureUsage::COLOR_ATTACHMENT | gfx::TextureUsage::DEPTH_STENCIL_ATTACHMENT | gfx::TextureUsage::STORAGE)); } @@ -2092,23 +2097,65 @@ bool checkComputeViews(const Graphs &graphs, uint32_t vertID, uint32_t passID, P return dependent; } -void fillRenderPassInfo(const RasterView &view, gfx::RenderPassInfo &rpInfo, uint32_t index, const ResourceDesc &viewDesc) { - if (view.attachmentType != AttachmentType::DEPTH_STENCIL) { +bool checkResolveResource(const Graphs &graphs, uint32_t vertID, uint32_t /*passID*/, ResourceAccessNode &node, const ccstd::pmr::vector &resolves) { + const auto &[renderGraph, resourceGraph, layoutGraphData, resourceAccessGraph, relationGraph] = graphs; + bool dependent = false; + for (const auto &pair : resolves) { + const auto &resolveTargetName = pair.target; + const auto &desc = get(ResourceGraph::DescTag{}, resourceGraph, vertex(resolveTargetName, resourceGraph)); + gfx::AccessFlags accessFlag = gfx::AccessFlags::COLOR_ATTACHMENT_WRITE; + gfx::TextureUsage usage = gfx::TextureUsage::COLOR_ATTACHMENT; + if (desc.format == gfx::Format::DEPTH_STENCIL) { + accessFlag = gfx::AccessFlags::DEPTH_STENCIL_ATTACHMENT_WRITE; + usage = gfx::TextureUsage::DEPTH_STENCIL_ATTACHMENT; + } + ViewStatus viewStatus{resolveTargetName, + PassType::RASTER, + gfx::ShaderStageFlags::FRAGMENT, + gfx::MemoryAccess::WRITE_ONLY, + accessFlag, usage}; + addAccessStatus(resourceAccessGraph, resourceGraph, node, viewStatus); + auto lastVertId = dependencyCheck(resourceAccessGraph, vertID, resourceGraph, viewStatus); + if (lastVertId != INVALID_ID) { + tryAddEdge(lastVertId, vertID, resourceAccessGraph); + tryAddEdge(lastVertId, vertID, relationGraph); + dependent = true; + } + } + // sort for vector intersection + std::sort(node.attachmentStatus.begin(), node.attachmentStatus.end(), [](const AccessStatus &lhs, const AccessStatus &rhs) { return lhs.vertID < rhs.vertID; }); + + return dependent; +} + +void fillRenderPassInfo(gfx::LoadOp loadOp, gfx::StoreOp storeOp, AttachmentType attachmentType, gfx::RenderPassInfo &rpInfo, uint32_t index, const ResourceDesc &viewDesc, bool resolve) { + if (attachmentType != AttachmentType::DEPTH_STENCIL) { auto &colorAttachment = rpInfo.colorAttachments[index]; - colorAttachment.format = viewDesc.format; - colorAttachment.loadOp = view.loadOp; - colorAttachment.storeOp = view.storeOp; - colorAttachment.sampleCount = viewDesc.sampleCount; - // colorAttachment.barrier = getGeneralBarrier(gfx::Device::getInstance(), view, prevAccess, nextAccess); + if (colorAttachment.format == gfx::Format::UNKNOWN) { + colorAttachment.format = viewDesc.format; + colorAttachment.loadOp = loadOp; + colorAttachment.storeOp = storeOp; + colorAttachment.sampleCount = viewDesc.sampleCount; + } else { + colorAttachment.storeOp = storeOp; + } + } else { - auto &depthStencilAttachment = rpInfo.depthStencilAttachment; - depthStencilAttachment.format = viewDesc.format; - depthStencilAttachment.depthLoadOp = view.loadOp; - depthStencilAttachment.depthStoreOp = view.storeOp; - depthStencilAttachment.stencilLoadOp = view.loadOp; - depthStencilAttachment.stencilStoreOp = view.storeOp; - depthStencilAttachment.sampleCount = viewDesc.sampleCount; - // depthStencilAttachment.barrier = getGeneralBarrier(gfx::Device::getInstance(), view, prevAccess, nextAccess); + auto &depthStencilAttachment = resolve ? + rpInfo.depthStencilResolveAttachment : + rpInfo.depthStencilAttachment; + if (depthStencilAttachment.format == gfx::Format::UNKNOWN) { + depthStencilAttachment.format = viewDesc.format; + depthStencilAttachment.depthLoadOp = loadOp; + depthStencilAttachment.depthStoreOp = storeOp; + depthStencilAttachment.stencilLoadOp = loadOp; + depthStencilAttachment.stencilStoreOp = storeOp; + depthStencilAttachment.sampleCount = viewDesc.sampleCount; + } else { + // TODO(Zeqiang): separate ds + depthStencilAttachment.depthStoreOp = storeOp; + depthStencilAttachment.stencilStoreOp = storeOp; + } } } @@ -2153,7 +2200,6 @@ void processRasterPass(const Graphs &graphs, uint32_t passID, const RasterPass & const auto &view = pass.rasterViews.at(name); const auto &viewDesc = get(ResourceGraph::DescTag{}, resourceGraph, resID); auto prevAccess = pair.second; - CC_ASSERT(slotID < node.attachmentStatus.size()); // TD:remove find auto nodeIter = std::find_if(node.attachmentStatus.begin(), node.attachmentStatus.end(), [resID](const AccessStatus &status) { return status.vertID == resID; @@ -2182,10 +2228,27 @@ void processRasterPass(const Graphs &graphs, uint32_t passID, const RasterPass & fgRenderpassInfo.dsAccess.prevAccess = prevAccess; fgRenderpassInfo.dsAccess.nextAccess = nextAccess; } - fillRenderPassInfo(view, rpInfo, slotID, viewDesc); + fillRenderPassInfo(view.loadOp, view.storeOp, view.attachmentType, rpInfo, slotID, viewDesc, false); + fgRenderpassInfo.orderedViews.emplace_back(name); } } else { - auto colorSize = pass.attachmentIndexMap.size(); + auto colorSize = pass.rasterViews.size(); + bool hasDS = std::any_of(pass.rasterViews.begin(), pass.rasterViews.end(), [](const auto &pair) { + return pair.second.attachmentType == AttachmentType::DEPTH_STENCIL; + }); + colorSize -= hasDS; + const auto &subpasses = pass.subpassGraph.subpasses; + uint32_t count = 0; + const auto &resg = resourceGraph; + auto resolveNum = std::accumulate(subpasses.begin(), subpasses.end(), 0, [&resg](uint32_t initVal, const Subpass &subpass) { + auto iter = std::find_if(subpass.resolvePairs.begin(), subpass.resolvePairs.end(), [&resg](const auto &pair) { + auto resID = vertex(pair.target, resg); + const auto& desc = get(ResourceGraph::DescTag{}, resg, resID); + return desc.format == gfx::Format::DEPTH_STENCIL || desc.format == gfx::Format::DEPTH; + }); + return initVal + subpass.resolvePairs.size() - (iter != subpass.resolvePairs.end()); + }); + colorSize += resolveNum; rpInfo.colorAttachments.resize(colorSize); fgRenderpassInfo.colorAccesses.resize(colorSize); } @@ -2266,6 +2329,7 @@ void processRasterSubpass(const Graphs &graphs, uint32_t passID, const RasterSub uint32_t accessType; uint32_t attachmentType; std::string_view slotName; + uint32_t samplesReverseWeight; }; using RasterViewSortKey = std::tuple; struct SubpassRasterViewData { @@ -2274,15 +2338,35 @@ void processRasterSubpass(const Graphs &graphs, uint32_t passID, const RasterSub gfx::AccessFlags access; }; + bool hasDS{false}; ccstd::vector viewIndex; for (const auto &[name, view] : pass.rasterViews) { auto resIter = rag.resourceIndex.find(name); + const auto &resID = vertex(name, resourceGraph); + const auto &desc = get(ResourceGraph::DescTag{}, resg, resID); + gfx::AccessFlags prevAccess = resIter == rag.resourceIndex.end() ? gfx::AccessFlags::NONE : rag.accessRecord.at(resIter->second).currStatus.accessFlag; + viewIndex.emplace_back(SubpassRasterViewData{ + {ACCESS_TYPE_WEIGHT[static_cast(view.accessType)], ATTACHMENT_TYPE_WEIGHT[static_cast(view.attachmentType)], view.slotName, static_cast(desc.sampleCount)}, + name, + prevAccess, + }); + hasDS |= view.attachmentType == AttachmentType::DEPTH_STENCIL; + } + + for (const auto &resolve : pass.resolvePairs) { + auto resIter = rag.resourceIndex.find(resolve.target); gfx::AccessFlags prevAccess = resIter == rag.resourceIndex.end() ? gfx::AccessFlags::NONE : rag.accessRecord.at(resIter->second).currStatus.accessFlag; viewIndex.emplace_back(SubpassRasterViewData{ - {ACCESS_TYPE_WEIGHT[static_cast(view.accessType)], ATTACHMENT_TYPE_WEIGHT[static_cast(view.attachmentType)], view.slotName}, name, prevAccess}); + {ACCESS_TYPE_WEIGHT[static_cast(AccessType::WRITE)], ATTACHMENT_TYPE_WEIGHT[static_cast(AttachmentType::RENDER_TARGET)], "_", 0xFFFFFFFF}, + resolve.target, + prevAccess, + }); } std::sort(viewIndex.begin(), viewIndex.end(), [](const SubpassRasterViewData &lhs, const SubpassRasterViewData &rhs) { + if (lhs.sortKey.samplesReverseWeight != rhs.sortKey.samplesReverseWeight) { + return lhs.sortKey.samplesReverseWeight < rhs.sortKey.samplesReverseWeight; + } if (lhs.sortKey.accessType != rhs.sortKey.accessType) { return lhs.sortKey.accessType < rhs.sortKey.accessType; } @@ -2308,49 +2392,94 @@ void processRasterSubpass(const Graphs &graphs, uint32_t passID, const RasterSub bool dependent{false}; dependent |= checkRasterViews(graphs, parentRagVert, passID, PassType::RASTER, *head, pass.rasterViews); dependent |= checkComputeViews(graphs, parentRagVert, passID, PassType::RASTER, *head, pass.computeViews); + dependent |= checkResolveResource(graphs, parentRagVert, passID, *head, pass.resolvePairs); if (!dependent) { tryAddEdge(EXPECT_START_ID, parentRagVert, resourceAccessGraph); tryAddEdge(EXPECT_START_ID, parentRagVert, relationGraph); } + if (!pass.resolvePairs.empty()) { + // ds resolve stores in depthStencilResolve + subpassInfo.resolves.resize(pass.rasterViews.size() - hasDS, gfx::INVALID_BINDING); + } + uint32_t localSlot = 0; + bool dsAppeared{false}; for (const auto &[sortKey, name, access] : viewIndex) { const auto *const resName = name.data(); auto findByResID = [&](const AccessStatus &status) { return status.vertID == rag.resourceIndex.at(resName); }; auto iter = std::find_if(node.attachmentStatus.begin(), node.attachmentStatus.end(), findByResID); - const auto &view = pass.rasterViews.at(resName); + + // TODO(Zeqiang): remove find + const auto &targetName = name; auto resID = rag.resourceIndex.at(resName); const auto &viewDesc = get(ResourceGraph::DescTag{}, resg, rag.resourceIndex.at(resName)); - uint32_t slot = uberPass.attachmentIndexMap.size(); - if (view.attachmentType != AttachmentType::DEPTH_STENCIL) { + AttachmentType attachmentType{AttachmentType::RENDER_TARGET}; + AccessType accessType{AccessType::WRITE}; + gfx::LoadOp loadOp{gfx::LoadOp::DISCARD}; + gfx::StoreOp storeOp{gfx::StoreOp::STORE}; + + uint32_t slot = dsAppeared ? localSlot - 1 : localSlot; + // std::distance(uberPass.rasterViews.begin(), uberPass.rasterViews.find(resName)); + // slot = dsAppeared ? slot - 1 : slot; + /*if (attachmentType != AttachmentType::DEPTH_STENCIL) { CC_ASSERT(uberPass.attachmentIndexMap.count(resName)); slot = uberPass.attachmentIndexMap.at(resName); - } + }*/ // TD:remove find auto nodeIter = std::find_if(head->attachmentStatus.begin(), head->attachmentStatus.end(), [resID](const AccessStatus &status) { return status.vertID == resID; }); auto nextAccess = nodeIter->accessFlag; - if (view.attachmentType != AttachmentType::DEPTH_STENCIL) { - if (view.attachmentType == AttachmentType::SHADING_RATE) { - subpassInfo.shadingRate = slot; + + auto resolveIter = std::find_if(pass.resolvePairs.begin(), pass.resolvePairs.end(), [&targetName](const ResolvePair &resolve) { + return strcmp(resolve.target.c_str(), targetName.data()) == 0; + }); + bool resolveView = resolveIter != pass.resolvePairs.end(); + if (resolveView) { + attachmentType = viewDesc.format == gfx::Format::DEPTH_STENCIL ? AttachmentType::DEPTH_STENCIL : AttachmentType::RENDER_TARGET; + if (attachmentType == AttachmentType::DEPTH_STENCIL) { + subpassInfo.depthStencilResolve = slot; + subpassInfo.depthResolveMode = gfx::ResolveMode::SAMPLE_ZERO; // resolveiter->mode; + subpassInfo.stencilResolveMode = gfx::ResolveMode::SAMPLE_ZERO; // resolveiter->mode1; + fgRenderpassInfo.dsResolveAccess.nextAccess = nextAccess; } else { - if (view.accessType != AccessType::READ) { - subpassInfo.colors.emplace_back(slot); - } - if (view.accessType != AccessType::WRITE) { - subpassInfo.inputs.emplace_back(slot); - } + auto indexIter = std::find(fgRenderpassInfo.orderedViews.begin(), fgRenderpassInfo.orderedViews.end(), resolveIter->source.c_str()); + auto srcIndex = indexIter == fgRenderpassInfo.orderedViews.end() ? fgRenderpassInfo.orderedViews.size() + : std::distance(fgRenderpassInfo.orderedViews.begin(), indexIter); + subpassInfo.resolves[srcIndex] = slot; + fgRenderpassInfo.colorAccesses[slot].nextAccess = nextAccess; } - fgRenderpassInfo.colorAccesses[slot].nextAccess = nextAccess; + accessType = AccessType::WRITE; } else { - fgRenderpassInfo.dsAccess.nextAccess = nextAccess; - subpassInfo.depthStencil = rpInfo.colorAttachments.size(); + const auto &view = pass.rasterViews.at(resName); + attachmentType = view.attachmentType; + accessType = view.accessType; + loadOp = view.loadOp; + storeOp = view.storeOp; + + if (attachmentType != AttachmentType::DEPTH_STENCIL) { + if (attachmentType == AttachmentType::SHADING_RATE) { + subpassInfo.shadingRate = slot; + } else { + if (accessType != AccessType::READ) { + subpassInfo.colors.emplace_back(slot); + } + if (accessType != AccessType::WRITE) { + subpassInfo.inputs.emplace_back(slot); + } + } + fgRenderpassInfo.colorAccesses[slot].nextAccess = nextAccess; + } else { + fgRenderpassInfo.dsAccess.nextAccess = nextAccess; + subpassInfo.depthStencil = rpInfo.colorAttachments.size(); + dsAppeared = true; + } } if (iter == node.attachmentStatus.end()) { @@ -2360,13 +2489,19 @@ void processRasterSubpass(const Graphs &graphs, uint32_t passID, const RasterSub CC_ASSERT(head->attachmentStatus.size() > localSlot); auto nextAccess = head->attachmentStatus[localSlot].accessFlag; - if (view.attachmentType == AttachmentType::DEPTH_STENCIL) { - fgRenderpassInfo.dsAccess.prevAccess = prevAccess; + if (attachmentType == AttachmentType::DEPTH_STENCIL) { + if (resolveView) { + fgRenderpassInfo.dsResolveAccess.prevAccess = prevAccess; + } else { + fgRenderpassInfo.dsAccess.prevAccess = prevAccess; + } } else { fgRenderpassInfo.colorAccesses[slot].prevAccess = prevAccess; } - fillRenderPassInfo(view, rpInfo, slot, viewDesc); + fgRenderpassInfo.orderedViews.emplace_back(resName); } + fillRenderPassInfo(loadOp, storeOp, attachmentType, rpInfo, slot, viewDesc, resolveView); + fgRenderpassInfo.needResolve |= resolveView; ++localSlot; } diff --git a/native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.cpp b/native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.cpp new file mode 100644 index 00000000000..07c7d0aaa33 --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.cpp @@ -0,0 +1,557 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "NativeBuiltinUtils.h" +#include "cocos/application/ApplicationManager.h" +#include "cocos/renderer/gfx-base/GFXDef-common.h" +#include "cocos/renderer/gfx-base/GFXDevice.h" +#include "cocos/renderer/pipeline/PipelineSceneData.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" +#include "cocos/renderer/pipeline/custom/NativeTypes.h" +#include "cocos/renderer/pipeline/custom/NativeUtils.h" +#include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" +#include "cocos/scene/Camera.h" +#include "cocos/scene/Fog.h" +#include "cocos/scene/Skybox.h" +#include "cocos/scene/SpotLight.h" + +namespace cc { + +namespace render { + +void setupQuadVertexBuffer(gfx::Device &device, const Vec4 &viewport, float vbData[16]) { + auto minX = static_cast(viewport.x); + auto maxX = static_cast(viewport.x + viewport.z); + auto minY = static_cast(viewport.y); + auto maxY = static_cast(viewport.y + viewport.w); + if (device.getCapabilities().screenSpaceSignY > 0) { + std::swap(minY, maxY); + } + int n = 0; + vbData[n++] = -1.0F; + vbData[n++] = -1.0F; + vbData[n++] = minX; // uv + vbData[n++] = maxY; + vbData[n++] = 1.0F; + vbData[n++] = -1.0F; + vbData[n++] = maxX; + vbData[n++] = maxY; + vbData[n++] = -1.0F; + vbData[n++] = 1.0F; + vbData[n++] = minX; + vbData[n++] = minY; + vbData[n++] = 1.0F; + vbData[n++] = 1.0F; + vbData[n++] = maxX; + vbData[n++] = minY; +} + +// NOLINTNEXTLINE(bugprone-easily-swappable-parameters) +void updateRasterPassConstants(uint32_t width, uint32_t height, Setter &setter) { + const auto &root = *Root::getInstance(); + const auto shadingWidth = static_cast(width); + const auto shadingHeight = static_cast(height); + setter.setVec4( + "cc_time", + Vec4( + root.getCumulativeTime(), + root.getFrameTime(), + static_cast(CC_CURRENT_ENGINE()->getTotalFrames()), + 0.0F)); + + setter.setVec4( + "cc_screenSize", + Vec4(shadingWidth, shadingHeight, 1.0F / shadingWidth, 1.0F / shadingHeight)); + setter.setVec4( + "cc_nativeSize", + Vec4(shadingWidth, shadingHeight, 1.0F / shadingWidth, 1.0F / shadingHeight)); +#if 0 + const auto *debugView = root.getDebugView(); + if (debugView) { + setter.setVec4( + "cc_debug_view_mode", + Vec4(static_cast(debugView->getSingleMode()), + debugView->isLightingWithAlbedo() ? 1.0F : 0.0F, + debugView->isCsmLayerColoration() ? 1.0F : 0.0F, + 0.0F)); + Vec4 debugPackVec{}; + for (auto i = static_cast(pipeline::DebugViewCompositeType::DIRECT_DIFFUSE); + i < static_cast(pipeline::DebugViewCompositeType::MAX_BIT_COUNT); ++i) { + const auto idx = i % 4; + (&debugPackVec.x)[idx] = debugView->isCompositeModeEnabled(i) ? 1.0F : 0.0F; + const auto packIdx = static_cast(floor(static_cast(i) / 4.0F)); + if (idx == 3) { + std::string name("cc_debug_view_composite_pack_"); + name.append(std::to_string(packIdx + 1)); + setter.setVec4(name, debugPackVec); + } + } + } else { + setter.setVec4("cc_debug_view_mode", Vec4(0.0F, 1.0F, 0.0F, 0.0F)); + Vec4 debugPackVec{}; + for (auto i = static_cast(pipeline::DebugViewCompositeType::DIRECT_DIFFUSE); + i < static_cast(pipeline::DebugViewCompositeType::MAX_BIT_COUNT); ++i) { + const auto idx = i % 4; + (&debugPackVec.x)[idx] = 1.0F; + const auto packIdx = static_cast(floor(i / 4.0)); + if (idx == 3) { + std::string name("cc_debug_view_composite_pack_"); + name.append(std::to_string(packIdx + 1)); + setter.setVec4(name, debugPackVec); + } + } + } +#endif +} + +namespace { + +uint8_t getCombineSignY(gfx::Device *device) { + // 0: vk, 1: metal, 2: none, 3: gl-like + static int8_t combineSignY{-1}; + if (combineSignY < 0) { + const float screenSpaceSignY = device->getCapabilities().screenSpaceSignY * 0.5F + 0.5F; + const float clipSpaceSignY = device->getCapabilities().clipSpaceSignY * 0.5F + 0.5F; + combineSignY = static_cast(static_cast(screenSpaceSignY) << 1 | static_cast(clipSpaceSignY)); + } + return static_cast(combineSignY); +} + +} // namespace + +void setCameraUBOValues( + const scene::Camera &camera, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &cfg, + const scene::DirectionalLight *mainLight, + RenderData &data) { + CC_EXPECTS(camera.getNode()); + CC_EXPECTS(cfg.getSkybox()); + const auto &skybox = *cfg.getSkybox(); + const auto &shadingScale = cfg.getShadingScale(); + // Camera + setMat4Impl(data, layoutGraph, "cc_matView", camera.getMatView()); + setMat4Impl(data, layoutGraph, "cc_matViewInv", camera.getNode()->getWorldMatrix()); + setMat4Impl(data, layoutGraph, "cc_matProj", camera.getMatProj()); + setMat4Impl(data, layoutGraph, "cc_matProjInv", camera.getMatProjInv()); + setMat4Impl(data, layoutGraph, "cc_matViewProj", camera.getMatViewProj()); + setMat4Impl(data, layoutGraph, "cc_matViewProjInv", camera.getMatViewProjInv()); + setVec4Impl(data, layoutGraph, "cc_cameraPos", + Vec4( + camera.getPosition().x, + camera.getPosition().y, + camera.getPosition().z, + getCombineSignY(cc::gfx::Device::getInstance()))); + setVec4Impl(data, layoutGraph, "cc_surfaceTransform", + Vec4( + static_cast(camera.getSurfaceTransform()), + static_cast(camera.getCameraUsage()), + cosf(static_cast(mathutils::toRadian(skybox.getRotationAngle()))), + sinf(static_cast(mathutils::toRadian(skybox.getRotationAngle()))))); + setVec4Impl(data, layoutGraph, "cc_screenScale", + Vec4( + cfg.getShadingScale(), + cfg.getShadingScale(), + 1.0F / cfg.getShadingScale(), + 1.0F / cfg.getShadingScale())); + setVec4Impl(data, layoutGraph, "cc_exposure", + Vec4( + camera.getExposure(), + 1.0F / camera.getExposure(), + cfg.isHDR() ? 1.0F : 0.0F, + 1.0F / scene::Camera::getStandardExposureValue())); + + if (mainLight) { + const auto &shadowInfo = *cfg.getShadows(); + const bool shadowEnable = (mainLight->isShadowEnabled() && + shadowInfo.getType() == scene::ShadowType::SHADOW_MAP); + setVec4Impl(data, layoutGraph, "cc_mainLitDir", + Vec4( + mainLight->getDirection().x, + mainLight->getDirection().y, + mainLight->getDirection().z, + shadowEnable)); + auto r = mainLight->getColor().x; + auto g = mainLight->getColor().y; + auto b = mainLight->getColor().z; + if (mainLight->isUseColorTemperature()) { + r *= mainLight->getColorTemperatureRGB().x; + g *= mainLight->getColorTemperatureRGB().y; + b *= mainLight->getColorTemperatureRGB().z; + } + auto w = mainLight->getIlluminance(); + if (cfg.isHDR()) { + w *= camera.getExposure(); + } + setVec4Impl(data, layoutGraph, "cc_mainLitColor", Vec4(r, g, b, w)); + } else { + setVec4Impl(data, layoutGraph, "cc_mainLitDir", Vec4(0, 0, 1, 0)); + setVec4Impl(data, layoutGraph, "cc_mainLitColor", Vec4(0, 0, 0, 0)); + } + + CC_EXPECTS(cfg.getAmbient()); + auto &ambient = *cfg.getAmbient(); + auto &skyColor = ambient.getSkyColor(); + if (cfg.isHDR()) { + skyColor.w = ambient.getSkyIllum() * camera.getExposure(); + } else { + skyColor.w = ambient.getSkyIllum(); + } + setVec4Impl(data, layoutGraph, "cc_ambientSky", + Vec4(skyColor.x, skyColor.y, skyColor.z, skyColor.w)); + setVec4Impl(data, layoutGraph, "cc_ambientGround", + Vec4( + ambient.getGroundAlbedo().x, + ambient.getGroundAlbedo().y, + ambient.getGroundAlbedo().z, + skybox.getEnvmap() ? static_cast(skybox.getEnvmap()->mipmapLevel()) : 1.0F)); + + CC_EXPECTS(cfg.getFog()); + const auto &fog = *cfg.getFog(); + + const auto &colorTempRGB = fog.getColorArray(); + setVec4Impl(data, layoutGraph, "cc_fogColor", + Vec4(colorTempRGB.x, colorTempRGB.y, colorTempRGB.z, colorTempRGB.z)); + setVec4Impl(data, layoutGraph, "cc_fogBase", + Vec4(fog.getFogStart(), fog.getFogEnd(), fog.getFogDensity(), 0.0F)); + setVec4Impl(data, layoutGraph, "cc_fogAdd", + Vec4(fog.getFogTop(), fog.getFogRange(), fog.getFogAtten(), 0.0F)); + setVec4Impl(data, layoutGraph, "cc_nearFar", + Vec4(camera.getNearClip(), camera.getFarClip(), camera.getClipSpaceMinz(), 0.0F)); + setVec4Impl(data, layoutGraph, "cc_viewPort", + Vec4( + camera.getViewport().x, + camera.getViewport().y, + shadingScale * static_cast(camera.getWindow()->getWidth()) * camera.getViewport().z, + shadingScale * static_cast(camera.getWindow()->getHeight()) * camera.getViewport().w)); +} + +namespace { + +float getPCFRadius( + const scene::Shadows &shadowInfo, + const scene::DirectionalLight &mainLight) { + const auto &shadowMapSize = shadowInfo.getSize().x; + switch (mainLight.getShadowPcf()) { + case scene::PCFType::HARD: + return 0.0F; + case scene::PCFType::SOFT: + return 1.0F / (shadowMapSize * 0.5F); + case scene::PCFType::SOFT_2X: + return 2.0F / (shadowMapSize * 0.5F); + case scene::PCFType::SOFT_4X: + return 3.0F / (shadowMapSize * 0.5F); + default: + break; + } + return 0.0F; +} + +} // namespace + +void setShadowUBOView( + gfx::Device &device, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &sceneData, + const scene::DirectionalLight &mainLight, + RenderData &data) { + const auto &shadowInfo = *sceneData.getShadows(); + const auto &csmLayers = *sceneData.getCSMLayers(); + const auto &csmSupported = sceneData.getCSMSupported(); + const auto &packing = pipeline::supportsR32FloatTexture(&device) ? 0.0F : 1.0F; + Vec4 vec4ShadowInfo{}; + if (shadowInfo.isEnabled()) { + if (shadowInfo.getType() == scene::ShadowType::SHADOW_MAP) { + if (mainLight.isShadowEnabled()) { + if (mainLight.isShadowFixedArea() || + mainLight.getCSMLevel() == scene::CSMLevel::LEVEL_1 || !csmSupported) { + // Shadow + const auto &matShadowView = csmLayers.getSpecialLayer()->getMatShadowView(); + const auto &matShadowProj = csmLayers.getSpecialLayer()->getMatShadowProj(); + const auto &matShadowViewProj = csmLayers.getSpecialLayer()->getMatShadowViewProj(); + const auto &near = mainLight.getShadowNear(); + const auto &far = mainLight.getShadowFar(); + + setMat4Impl(data, layoutGraph, "cc_matLightView", matShadowView); + setVec4Impl(data, layoutGraph, "cc_shadowProjDepthInfo", + Vec4(matShadowProj.m[10], matShadowProj.m[14], + matShadowProj.m[11], matShadowProj.m[15])); + + setVec4Impl(data, layoutGraph, "cc_shadowProjInfo", + Vec4(matShadowProj.m[00], matShadowProj.m[05], + 1.0F / matShadowProj.m[00], 1.0F / matShadowProj.m[05])); + setMat4Impl(data, layoutGraph, "cc_matLightViewProj", matShadowViewProj); + vec4ShadowInfo.set(near, far, 0, 1.0F - mainLight.getShadowSaturation()); + setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); + vec4ShadowInfo.set(static_cast(scene::LightType::DIRECTIONAL), packing, mainLight.getShadowNormalBias(), 0); + setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); + } else { + { // CSM + const auto layerThreshold = getPCFRadius(shadowInfo, mainLight); + const auto numCascades = static_cast(mainLight.getCSMLevel()); + setVec4ArraySizeImpl(data, layoutGraph, "cc_csmViewDir0", numCascades); + setVec4ArraySizeImpl(data, layoutGraph, "cc_csmViewDir1", numCascades); + setVec4ArraySizeImpl(data, layoutGraph, "cc_csmViewDir2", numCascades); + setVec4ArraySizeImpl(data, layoutGraph, "cc_csmAtlas", numCascades); + setMat4ArraySizeImpl(data, layoutGraph, "cc_matCSMViewProj", numCascades); + setVec4ArraySizeImpl(data, layoutGraph, "cc_csmProjDepthInfo", numCascades); + setVec4ArraySizeImpl(data, layoutGraph, "cc_csmProjInfo", numCascades); + + Vec4 csmSplitsInfo{}; + for (uint32_t i = 0; i < numCascades; ++i) { + const auto &layer = *csmLayers.getLayers()[i]; + + const auto &matShadowView = layer.getMatShadowView(); + vec4ShadowInfo.set(matShadowView.m[0], matShadowView.m[4], matShadowView.m[8], layerThreshold); + setVec4ArrayElemImpl(data, layoutGraph, "cc_csmViewDir0", vec4ShadowInfo, i); + vec4ShadowInfo.set(matShadowView.m[1], matShadowView.m[5], matShadowView.m[9], layer.getSplitCameraNear()); + setVec4ArrayElemImpl(data, layoutGraph, "cc_csmViewDir1", vec4ShadowInfo, i); + vec4ShadowInfo.set(matShadowView.m[2], matShadowView.m[6], matShadowView.m[10], layer.getSplitCameraFar()); + setVec4ArrayElemImpl(data, layoutGraph, "cc_csmViewDir2", vec4ShadowInfo, i); + + const auto &csmAtlas = layer.getCSMAtlas(); + setVec4ArrayElemImpl(data, layoutGraph, "cc_csmAtlas", csmAtlas, i); + + const auto &matShadowViewProj = layer.getMatShadowViewProj(); + setMat4ArrayElemImpl(data, layoutGraph, "cc_matCSMViewProj", matShadowViewProj, i); + + const auto &matShadowProj = layer.getMatShadowProj(); + setVec4ArrayElemImpl(data, layoutGraph, + "cc_csmProjDepthInfo", + Vec4(matShadowProj.m[10], matShadowProj.m[14], + matShadowProj.m[11], matShadowProj.m[15]), + i); + + setVec4ArrayElemImpl(data, layoutGraph, + "cc_csmProjInfo", + Vec4(matShadowProj.m[00], matShadowProj.m[05], + 1.0F / matShadowProj.m[00], 1.0F / matShadowProj.m[05]), + i); + + (&csmSplitsInfo.x)[i] = layer.getSplitCameraFar() / mainLight.getShadowDistance(); + } + setVec4Impl(data, layoutGraph, "cc_csmSplitsInfo", csmSplitsInfo); + } + { // Shadow + vec4ShadowInfo.set(0, 0, 0, 1.0F - mainLight.getShadowSaturation()); + setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); + vec4ShadowInfo.set( + static_cast(scene::LightType::DIRECTIONAL), + packing, + mainLight.getShadowNormalBias(), + static_cast(mainLight.getCSMLevel())); + setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); + } + } + { // Shadow + vec4ShadowInfo.set( + shadowInfo.getSize().x, shadowInfo.getSize().y, + static_cast(mainLight.getShadowPcf()), mainLight.getShadowBias()); + setVec4Impl(data, layoutGraph, "cc_shadowWHPBInfo", vec4ShadowInfo); + } + } + } else { + Vec3 tempVec3 = shadowInfo.getNormal().getNormalized(); + setVec4Impl(data, layoutGraph, + "cc_planarNDInfo", + Vec4(tempVec3.x, tempVec3.y, tempVec3.z, -shadowInfo.getDistance())); + } + { + const auto &color = shadowInfo.getShadowColor4f(); + setColorImpl(data, layoutGraph, "cc_shadowColor", + gfx::Color{color[0], color[1], color[2], color[3]}); + } + } +} + +void setShadowUBOLightView( + gfx::Device *device, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &sceneData, + const scene::Light &light, + uint32_t level, + RenderData &data) { + const auto &shadowInfo = *sceneData.getShadows(); + const auto &csmLayers = *sceneData.getCSMLayers(); + const auto &packing = pipeline::supportsR32FloatTexture(device) ? 0.0F : 1.0F; + const auto &cap = device->getCapabilities(); + Vec4 vec4ShadowInfo{}; + + // ShadowMap + switch (light.getType()) { + case scene::LightType::DIRECTIONAL: { + const auto &mainLight = dynamic_cast(light); + if (shadowInfo.isEnabled() && mainLight.isShadowEnabled()) { + if (shadowInfo.getType() == scene::ShadowType::SHADOW_MAP) { + float near = 0.1F; + float far = 0.0F; + Mat4 matShadowView; + Mat4 matShadowProj; + Mat4 matShadowViewProj; + scene::CSMLevel levelCount{}; + if (mainLight.isShadowFixedArea() || mainLight.getCSMLevel() == scene::CSMLevel::LEVEL_1) { + matShadowView = csmLayers.getSpecialLayer()->getMatShadowView(); + matShadowProj = csmLayers.getSpecialLayer()->getMatShadowProj(); + matShadowViewProj = csmLayers.getSpecialLayer()->getMatShadowViewProj(); + if (mainLight.isShadowFixedArea()) { + near = mainLight.getShadowNear(); + far = mainLight.getShadowFar(); + levelCount = static_cast(0); + } else { + near = 0.1F; + far = csmLayers.getSpecialLayer()->getShadowCameraFar(); + levelCount = scene::CSMLevel::LEVEL_1; + } + vec4ShadowInfo.set(static_cast(scene::LightType::DIRECTIONAL), packing, mainLight.getShadowNormalBias(), 0); + setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); + } else { + const auto &layer = *csmLayers.getLayers()[level]; + matShadowView = layer.getMatShadowView(); + matShadowProj = layer.getMatShadowProj(); + matShadowViewProj = layer.getMatShadowViewProj(); + + near = layer.getSplitCameraNear(); + far = layer.getSplitCameraFar(); + levelCount = mainLight.getCSMLevel(); + } + setMat4Impl(data, layoutGraph, "cc_matLightView", matShadowView); + setVec4Impl(data, layoutGraph, "cc_shadowProjDepthInfo", + Vec4( + matShadowProj.m[10], + matShadowProj.m[14], + matShadowProj.m[11], + matShadowProj.m[15])); + setVec4Impl(data, layoutGraph, "cc_shadowProjInfo", + Vec4( + matShadowProj.m[00], + matShadowProj.m[05], + 1.0F / matShadowProj.m[00], + 1.0F / matShadowProj.m[05])); + setMat4Impl(data, layoutGraph, "cc_matLightViewProj", matShadowViewProj); + vec4ShadowInfo.set(near, far, 0, 1.0F - mainLight.getShadowSaturation()); + setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); + vec4ShadowInfo.set( + static_cast(scene::LightType::DIRECTIONAL), + packing, + mainLight.getShadowNormalBias(), + static_cast(levelCount)); + setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); + vec4ShadowInfo.set( + shadowInfo.getSize().x, + shadowInfo.getSize().y, + static_cast(mainLight.getShadowPcf()), + mainLight.getShadowBias()); + setVec4Impl(data, layoutGraph, "cc_shadowWHPBInfo", vec4ShadowInfo); + } + } + break; + } + case scene::LightType::SPOT: { + const auto &spotLight = dynamic_cast(light); + if (shadowInfo.isEnabled() && spotLight.isShadowEnabled()) { + const auto &matShadowCamera = spotLight.getNode()->getWorldMatrix(); + const auto matShadowView = matShadowCamera.getInversed(); + setMat4Impl(data, layoutGraph, "cc_matLightView", matShadowView); + + Mat4 matShadowViewProj{}; + Mat4::createPerspective(spotLight.getAngle(), 1.0F, 0.001F, + spotLight.getRange(), true, + cap.clipSpaceMinZ, cap.clipSpaceSignY, 0, &matShadowViewProj); + matShadowViewProj.multiply(matShadowView); + setMat4Impl(data, layoutGraph, "cc_matLightViewProj", matShadowViewProj); + + const Vec4 shadowNFLSInfos(0.01F, spotLight.getRange(), 0.0F, 0.0F); + setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", shadowNFLSInfos); + + const Vec4 shadowWHPBInfos( + shadowInfo.getSize().x, + shadowInfo.getSize().y, + spotLight.getShadowPcf(), + spotLight.getShadowBias()); + setVec4Impl(data, layoutGraph, "cc_shadowWHPBInfo", shadowWHPBInfos); + + const Vec4 shadowLPNNInfos(static_cast(scene::LightType::SPOT), packing, spotLight.getShadowNormalBias(), 0.0F); + setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", shadowLPNNInfos); + } + break; + } + default: + break; + } + + const auto &color = shadowInfo.getShadowColor4f(); + setColorImpl(data, layoutGraph, "cc_shadowColor", gfx::Color{color[0], color[1], color[2], color[3]}); +} + +void setLegacyTextureUBOView( + gfx::Device &device, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &sceneData, + RenderData &data) { + const auto &skybox = *sceneData.getSkybox(); + if (skybox.getReflectionMap()) { + auto &texture = *skybox.getReflectionMap()->getGFXTexture(); + auto *sampler = device.getSampler(skybox.getReflectionMap()->getSamplerInfo()); + setTextureImpl(data, layoutGraph, "cc_environment", &texture); + setSamplerImpl(data, layoutGraph, "cc_environment", sampler); + } else { + const auto *envmap = + skybox.getEnvmap() + ? skybox.getEnvmap() + : BuiltinResMgr::getInstance()->get("default-cube-texture"); + if (envmap) { + auto *texture = envmap->getGFXTexture(); + auto *sampler = device.getSampler(envmap->getSamplerInfo()); + setTextureImpl(data, layoutGraph, "cc_environment", texture); + setSamplerImpl(data, layoutGraph, "cc_environment", sampler); + } + } + const auto *diffuseMap = + skybox.getDiffuseMap() + ? skybox.getDiffuseMap() + : BuiltinResMgr::getInstance()->get("default-cube-texture"); + if (diffuseMap) { + auto *texture = diffuseMap->getGFXTexture(); + auto *sampler = device.getSampler(diffuseMap->getSamplerInfo()); + setTextureImpl(data, layoutGraph, "cc_diffuseMap", texture); + setSamplerImpl(data, layoutGraph, "cc_diffuseMap", sampler); + } + gfx::SamplerInfo samplerPointInfo{ + gfx::Filter::POINT, + gfx::Filter::POINT, + gfx::Filter::NONE, + gfx::Address::CLAMP, + gfx::Address::CLAMP, + gfx::Address::CLAMP}; + auto *pointSampler = device.getSampler(samplerPointInfo); + setSamplerImpl(data, layoutGraph, "cc_shadowMap", pointSampler); + // setTextureImpl(data, layoutGraph, "cc_shadowMap", BuiltinResMgr::getInstance()->get("default-texture")->getGFXTexture()); + setSamplerImpl(data, layoutGraph, "cc_spotShadowMap", pointSampler); + // setTextureImpl(data, layoutGraph, "cc_spotShadowMap", BuiltinResMgr::getInstance()->get("default-texture")->getGFXTexture()); +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.h b/native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.h new file mode 100644 index 00000000000..b123a5332ac --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeBuiltinUtils.h @@ -0,0 +1,86 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#pragma once +#include +#include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" +#include "cocos/renderer/pipeline/custom/NativeFwd.h" +#include "cocos/renderer/pipeline/custom/RenderGraphFwd.h" + +namespace cc { + +namespace scene { +class Camera; +class DirectionalLight; +} // namespace scene + +namespace gfx { +class Device; +} // namespace gfx + +namespace pipeline { +class PipelineSceneData; +} // namespace pipeline + +namespace render { + +void setCameraUBOValues( + const scene::Camera &camera, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &cfg, + const scene::DirectionalLight *mainLight, + RenderData &data); + +void setLegacyTextureUBOView( + gfx::Device &device, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &sceneData, + RenderData &data); + +// For use shadow map +void setShadowUBOView( + gfx::Device &device, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &sceneData, + const scene::DirectionalLight &mainLight, + RenderData &data); + +// For build shadow map +void setShadowUBOLightView( + gfx::Device *device, + const LayoutGraphData &layoutGraph, + const pipeline::PipelineSceneData &sceneData, + const scene::Light &light, + uint32_t level, + RenderData &data); + +// Render graph +void updateRasterPassConstants(uint32_t width, uint32_t height, Setter &setter); + +// Geometry +void setupQuadVertexBuffer(gfx::Device &device, const Vec4 &viewport, float vbData[16]); + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp b/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp deleted file mode 100644 index 219ef6690e4..00000000000 --- a/native/cocos/renderer/pipeline/custom/NativeDefaultScene.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - Copyright (c) 2022-2023 Xiamen Yaji Software Co., Ltd. - - https://www.cocos.com/ - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights to - use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is furnished to do so, - subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -****************************************************************************/ - -#include "NativePipelineTypes.h" - -namespace cc { - -namespace render { - -const pipeline::PipelineSceneData *DefaultSceneVisitor::getPipelineSceneData() const { - return nullptr; -} - -void DefaultSceneVisitor::setViewport(const gfx::Viewport &vp) {} -void DefaultSceneVisitor::setScissor(const gfx::Rect &rect) {} -void DefaultSceneVisitor::bindPipelineState(gfx::PipelineState *pso) {} -void DefaultSceneVisitor::bindDescriptorSet(uint32_t set, gfx::DescriptorSet *descriptorSet, uint32_t dynamicOffsetCount, const uint32_t *dynamicOffsets) {} -void DefaultSceneVisitor::bindInputAssembler(gfx::InputAssembler *ia) {} -void DefaultSceneVisitor::updateBuffer(gfx::Buffer *buff, const void *data, uint32_t size) {} -void DefaultSceneVisitor::draw(const gfx::DrawInfo &info) {} - -SceneTask *DefaultForwardLightingTransversal::transverse(SceneVisitor *visitor) const { - std::ignore = visitor; - return nullptr; -} - -} // namespace render - -} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp b/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp index c044f4204a3..23fdda466bc 100644 --- a/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeExecutor.cpp @@ -97,6 +97,7 @@ struct RenderGraphVisitorContext { void clear(gfx::RenderPassInfo& info) { info.colorAttachments.clear(); info.depthStencilAttachment = {}; + info.depthStencilResolveAttachment = {}; info.subpasses.clear(); info.dependencies.clear(); } @@ -177,25 +178,34 @@ PersistentRenderPassAndFramebuffer createPersistentRenderPassAndFramebuffer( fbInfo.colorTextures.reserve(pass.rasterViews.size()); PmrFlatSet set(scratch); - auto fillFrameBufferInfo = [&](const auto& pass) { - auto numTotalAttachments = static_cast(pass.rasterViews.size()); - - PmrFlatMap viewIndex(scratch); - for (const auto& [name, view] : pass.rasterViews) { - if (set.emplace(name).second) { - viewIndex.emplace(view.slotID, name); - } - } + auto fillFrameBufferInfo = [&](const ccstd::vector& passViews, bool hasResolve) { + std::ignore = hasResolve; + const auto& uberPass = pass; + auto numTotalAttachments = static_cast(passViews.size()); // uint32_t dsvCount = 0; uint32_t index = 0; - for (const auto& [slotID, name] : viewIndex) { - const auto& view = pass.rasterViews.at(name); - const auto resID = vertex(name, ctx.resourceGraph); - const auto& desc = get(ResourceGraph::DescTag{}, ctx.resourceGraph, resID); + for (const auto& nameIn : passViews) { + const char* name = nameIn.c_str(); + bool colorLikeView{true}; + bool dsResolveAttachment{false}; + auto clearColor = gfx::Color{}; + auto iter = pass.rasterViews.find(name); + if(iter != pass.rasterViews.end()) { + const auto& view = iter->second; + colorLikeView = view.attachmentType == AttachmentType::RENDER_TARGET || view.attachmentType == AttachmentType::SHADING_RATE; + clearColor = view.clearColor; + } else { + // resolves + const auto resID = vertex(name, ctx.resourceGraph); + const auto& desc = get(ResourceGraph::DescTag{}, ctx.resourceGraph, resID); + CC_ASSERT(hasResolve && desc.sampleCount == gfx::SampleCount::X1); + colorLikeView = desc.format != gfx::Format::DEPTH_STENCIL && desc.format != gfx::Format::DEPTH; + dsResolveAttachment = !colorLikeView; + } - if (view.attachmentType == AttachmentType::RENDER_TARGET || view.attachmentType == AttachmentType::SHADING_RATE) { // RenderTarget - data.clearColors.emplace_back(view.clearColor); + if (colorLikeView) { // RenderTarget + data.clearColors.emplace_back(clearColor); auto resID = findVertex(name, resg); visitObject( @@ -239,22 +249,23 @@ PersistentRenderPassAndFramebuffer createPersistentRenderPassAndFramebuffer( std::ignore = view; CC_EXPECTS(false); }); - } else if (view.attachmentType == AttachmentType::DEPTH_STENCIL) { // DepthStencil - data.clearDepth = view.clearColor.x; - data.clearStencil = static_cast(view.clearColor.y); + } else { // DepthStencil + if (!dsResolveAttachment) { + data.clearDepth = clearColor.x; + data.clearStencil = static_cast(clearColor.y); + } + + auto &dsAttachment = dsResolveAttachment ? fbInfo.depthStencilResolveTexture : fbInfo.depthStencilTexture; - if (!fbInfo.depthStencilTexture) { - auto resID = findVertex(name, resg); - visitObject( + auto resID = findVertex(name, resg); + visitObject( resID, resg, [&](const ManagedTexture& tex) { CC_EXPECTS(tex.texture); - CC_EXPECTS(!fbInfo.depthStencilTexture); - fbInfo.depthStencilTexture = tex.texture.get(); + dsAttachment = tex.texture.get(); }, [&](const IntrusivePtr& tex) { - CC_EXPECTS(!fbInfo.depthStencilTexture); - fbInfo.depthStencilTexture = tex.get(); + dsAttachment = tex.get(); }, [&](const FormatView& view) { std::ignore = view; @@ -267,7 +278,6 @@ PersistentRenderPassAndFramebuffer createPersistentRenderPassAndFramebuffer( [](const auto& /*unused*/) { CC_EXPECTS(false); }); - } } ++index; } @@ -281,14 +291,14 @@ PersistentRenderPassAndFramebuffer createPersistentRenderPassAndFramebuffer( // persistent cache data.clearColors.reserve(numColors); - rpInfo = ctx.fgd.resourceAccessGraph.rpInfos.at(ragVertID).rpInfo; - fillFrameBufferInfo(pass); + const auto& fgdRpInfo = ctx.fgd.resourceAccessGraph.rpInfos.at(ragVertID); + rpInfo = fgdRpInfo.rpInfo; + fillFrameBufferInfo(fgdRpInfo.orderedViews, false); } else { - rpInfo = ctx.fgd.resourceAccessGraph.rpInfos.at(ragVertID).rpInfo; - for (const auto& subpass : pass.subpassGraph.subpasses) { - fillFrameBufferInfo(subpass); - } + const auto& fgdRpInfo = ctx.fgd.resourceAccessGraph.rpInfos.at(ragVertID); + rpInfo = fgdRpInfo.rpInfo; + fillFrameBufferInfo(fgdRpInfo.orderedViews, fgdRpInfo.needResolve); } CC_ENSURES(rpInfo.colorAttachments.size() == data.clearColors.size()); CC_ENSURES(rpInfo.colorAttachments.size() == fbInfo.colorTextures.size()); @@ -923,6 +933,9 @@ getComputeViews(RenderGraph::vertex_descriptor passID, const RenderGraph& rg) { if (holds(passID, rg)) { return get(RasterPassTag{}, passID, rg).computeViews; } + if (holds(passID, rg)) { + return get(RasterSubpassTag{}, passID, rg).computeViews; + } CC_EXPECTS(holds(passID, rg)); return get(ComputeTag{}, passID, rg).computeViews; } @@ -1135,7 +1148,17 @@ struct RenderGraphUploadVisitor : boost::dfs_visitor<> { const auto& subpass = get(RasterSubpassTag{}, vertID, ctx.g); // render pass const auto& layoutName = get(RenderGraph::LayoutTag{}, ctx.g, vertID); - const auto& layoutID = locate(LayoutGraphData::null_vertex(), layoutName, ctx.lg); + + auto parentLayoutID = ctx.currentPassLayoutID; + auto layoutID = parentLayoutID; + if (!layoutName.empty()) { + auto parentID = parent(ctx.currentPassLayoutID, ctx.lg); + if (parentID != LayoutGraphData::null_vertex()) { + parentLayoutID = parentID; + } + layoutID = locate(parentLayoutID, layoutName, ctx.lg); + } + ctx.currentPassLayoutID = layoutID; // get layout auto& layout = get(LayoutGraphData::LayoutTag{}, ctx.lg, layoutID); @@ -1241,7 +1264,7 @@ struct RenderGraphVisitor : boost::dfs_visitor<> { } const auto& nodeID = iter->second; auto iter2 = ctx.barrierMap.find(nodeID); - if (iter2 != ctx.barrierMap.end() && iter2->second.subpassBarriers.empty()) { + if (iter2 != ctx.barrierMap.end()) { submitBarriers(iter2->second.blockBarrier.frontBarriers); } } @@ -1252,7 +1275,7 @@ struct RenderGraphVisitor : boost::dfs_visitor<> { } const auto& nodeID = iter->second; auto iter2 = ctx.barrierMap.find(nodeID); - if (iter2 != ctx.barrierMap.end() && iter2->second.subpassBarriers.empty()) { + if (iter2 != ctx.barrierMap.end()) { submitBarriers(iter2->second.blockBarrier.rearBarriers); } } @@ -1741,6 +1764,11 @@ struct RenderGraphVisitor : boost::dfs_visitor<> { CC_EXPECTS(resID != ResourceGraph::null_vertex()); resg.mount(ctx.device, resID); } + for (const auto& resolve : pass.resolvePairs) { + auto resID = findVertex(resolve.target, resg); + CC_EXPECTS(resID != ResourceGraph::null_vertex()); + resg.mount(ctx.device, resID); + } } void mountResources(const RasterPass& pass) const { @@ -2212,7 +2240,12 @@ void NativePipeline::executeRenderGraph(const RenderGraph& rg) { scratch}; RenderGraphVisitor visitor{{}, ctx}; - boost::depth_first_search(fg, visitor, get(colors, rg)); + auto colors = rg.colors(scratch); + for (const auto vertID : ctx.g.sortedVertices) { + if (holds(vertID, ctx.g) || holds(vertID, ctx.g) || holds(vertID, ctx.g)) { + boost::depth_first_visit(fg, vertID, visitor, get(colors, ctx.g)); + } + } } // collect statistics diff --git a/native/cocos/renderer/pipeline/custom/NativePipeline.cpp b/native/cocos/renderer/pipeline/custom/NativePipeline.cpp index 2d736168d4b..ff89a8cd6dc 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipeline.cpp +++ b/native/cocos/renderer/pipeline/custom/NativePipeline.cpp @@ -22,44 +22,18 @@ THE SOFTWARE. ****************************************************************************/ -#include -#include -#include "LayoutGraphFwd.h" -#include "LayoutGraphGraphs.h" -#include "LayoutGraphNames.h" -#include "LayoutGraphTypes.h" -#include "LayoutGraphUtils.h" -#include "NativePipelineFwd.h" -#include "NativePipelineTypes.h" -#include "NativeUtils.h" -#include "RenderCommonTypes.h" -#include "RenderGraphGraphs.h" -#include "RenderGraphTypes.h" -#include "RenderInterfaceFwd.h" -#include "RenderInterfaceTypes.h" -#include "RenderingModule.h" -#include "cocos/base/Macros.h" -#include "cocos/base/Ptr.h" -#include "cocos/base/StringUtil.h" -#include "cocos/base/std/container/string.h" -#include "cocos/math/Mat4.h" -#include "cocos/renderer/gfx-base/GFXBuffer.h" -#include "cocos/renderer/gfx-base/GFXDef-common.h" -#include "cocos/renderer/gfx-base/GFXDescriptorSetLayout.h" -#include "cocos/renderer/gfx-base/GFXDevice.h" -#include "cocos/renderer/gfx-base/GFXInputAssembler.h" -#include "cocos/renderer/gfx-base/GFXSwapchain.h" -#include "cocos/renderer/gfx-base/states/GFXSampler.h" -#include "cocos/renderer/pipeline/Enum.h" -#include "cocos/renderer/pipeline/GlobalDescriptorSetManager.h" #include "cocos/renderer/pipeline/PipelineSceneData.h" #include "cocos/renderer/pipeline/PipelineStateManager.h" -#include "cocos/renderer/pipeline/RenderPipeline.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphUtils.h" +#include "cocos/renderer/pipeline/custom/NativeBuiltinUtils.h" +#include "cocos/renderer/pipeline/custom/NativePipelineTypes.h" +#include "cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h" +#include "cocos/renderer/pipeline/custom/RenderGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/RenderingModule.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" #include "cocos/scene/RenderScene.h" #include "cocos/scene/RenderWindow.h" -#include "details/DebugUtils.h" -#include "details/GslUtils.h" - #if CC_USE_DEBUG_RENDERER #include "profiler/DebugRenderer.h" #endif @@ -68,11 +42,6 @@ namespace cc { namespace render { -SceneTask *NativeSceneTransversal::transverse(SceneVisitor *visitor) const { - std::ignore = visitor; - return nullptr; -} - NativePipeline::NativePipeline(const allocator_type &alloc) noexcept : device(gfx::Device::getInstance()), globalDSManager(std::make_unique()), @@ -118,15 +87,17 @@ uint32_t NativePipeline::addRenderWindow(const ccstd::string &name, gfx::Format desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; - desc.flags = ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT | ResourceFlags::SAMPLED; + desc.flags = ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT | ResourceFlags::SAMPLED | + ResourceFlags::TRANSFER_SRC | ResourceFlags::TRANSFER_DST; CC_EXPECTS(renderWindow); if (!renderWindow->getSwapchain()) { CC_ASSERT(renderWindow->getFramebuffer()->getColorTextures().size() == 1); CC_ASSERT(renderWindow->getFramebuffer()->getColorTextures().at(0)); + desc.sampleCount = renderWindow->getFramebuffer()->getColorTextures().at(0)->getInfo().samples; return addVertex( FramebufferTag{}, std::forward_as_tuple(name.c_str()), @@ -163,9 +134,9 @@ uint32_t NativePipeline::addStorageBuffer(const ccstd::string &name, gfx::Format desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; - desc.flags = ResourceFlags::STORAGE; + desc.flags = ResourceFlags::STORAGE | ResourceFlags::TRANSFER_SRC | ResourceFlags::TRANSFER_DST; return addVertex( ManagedBufferTag{}, @@ -187,9 +158,10 @@ uint32_t NativePipeline::addRenderTarget(const ccstd::string &name, gfx::Format desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; - desc.flags = ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT | ResourceFlags::SAMPLED; + desc.flags = ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT | ResourceFlags::SAMPLED | + ResourceFlags::TRANSFER_SRC | ResourceFlags::TRANSFER_DST; return addVertex( ManagedTextureTag{}, @@ -211,9 +183,10 @@ uint32_t NativePipeline::addDepthStencil(const ccstd::string &name, gfx::Format desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; - desc.flags = ResourceFlags::DEPTH_STENCIL_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT | ResourceFlags::SAMPLED; + desc.flags = ResourceFlags::DEPTH_STENCIL_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT | ResourceFlags::SAMPLED | + ResourceFlags::TRANSFER_SRC | ResourceFlags::TRANSFER_DST; CC_EXPECTS(residency == ResourceResidency::MANAGED || residency == ResourceResidency::MEMORYLESS); @@ -232,6 +205,67 @@ uint32_t NativePipeline::addDepthStencil(const ccstd::string &name, gfx::Format resourceGraph); } +uint32_t NativePipeline::addResource(const ccstd::string& name, ResourceDimension dimension, + gfx::Format format, + uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, + gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) { + ResourceDesc desc{ + dimension, + 0, + width, + height, + static_cast(dimension == ResourceDimension::TEXTURE3D ? depth : arraySize), + static_cast(mipLevels), + format, + sampleCount, + residency == ResourceResidency::MEMORYLESS ? gfx::TextureFlagBit::LAZILY_ALLOCATED : gfx::TextureFlagBit::NONE, + flags, + }; + return addVertex( + ManagedTextureTag{}, + std::forward_as_tuple(name.c_str()), + std::forward_as_tuple(desc), + std::forward_as_tuple(ResourceTraits{residency}), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(), + resourceGraph); +} + +void NativePipeline::updateResource(const ccstd::string& name, gfx::Format format, + uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, // NOLINT(bugprone-easily-swappable-parameters) + gfx::SampleCount sampleCount) { + auto resID = findVertex(ccstd::pmr::string(name, get_allocator()), resourceGraph); + if (resID == ResourceGraph::null_vertex()) { + return; + } + auto &desc = get(ResourceGraph::DescTag{}, resourceGraph, resID); + + // update format + if (format == gfx::Format::UNKNOWN) { + format = desc.format; + } + visitObject( + resID, resourceGraph, + [&](ManagedTexture &tex) { + uint32_t depthOrArraySize = static_cast( + desc.dimension == ResourceDimension::TEXTURE3D ? depth : arraySize); + bool invalidate = + std::forward_as_tuple(desc.width, desc.height, desc.depthOrArraySize, desc.mipLevels, desc.format, desc.sampleCount) != + std::forward_as_tuple(width, height, depthOrArraySize, mipLevels, format, sampleCount); + if (invalidate) { + desc.width = width; + desc.height = height; + desc.depthOrArraySize = depthOrArraySize; + desc.mipLevels = mipLevels; + desc.format = format; + desc.sampleCount = sampleCount; + resourceGraph.invalidatePersistentRenderPassAndFramebuffer(tex.texture.get()); + } + }, + [](const auto & /*res*/) {}); +} + // NOLINTNEXTLINE uint32_t NativePipeline::addStorageTexture(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, ResourceResidency residency) { ResourceDesc desc{}; @@ -241,9 +275,9 @@ uint32_t NativePipeline::addStorageTexture(const ccstd::string &name, gfx::Forma desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = format; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; - desc.flags = ResourceFlags::STORAGE | ResourceFlags::SAMPLED; + desc.flags = ResourceFlags::STORAGE | ResourceFlags::SAMPLED | ResourceFlags::TRANSFER_SRC | ResourceFlags::TRANSFER_DST;; CC_EXPECTS(residency == ResourceResidency::MANAGED || residency == ResourceResidency::MEMORYLESS); @@ -270,9 +304,9 @@ uint32_t NativePipeline::addShadingRateTexture(const ccstd::string &name, uint32 desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = gfx::Format::R8UI; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; - desc.flags = ResourceFlags::SHADING_RATE | ResourceFlags::STORAGE | ResourceFlags::SAMPLED; + desc.flags = ResourceFlags::SHADING_RATE | ResourceFlags::STORAGE | ResourceFlags::SAMPLED | ResourceFlags::TRANSFER_SRC | ResourceFlags::TRANSFER_DST; CC_EXPECTS(residency == ResourceResidency::MANAGED || residency == ResourceResidency::MEMORYLESS); @@ -306,7 +340,7 @@ uint32_t NativePipeline::addCustomBuffer( desc.depthOrArraySize = 1; desc.mipLevels = 1; desc.format = gfx::Format::UNKNOWN; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = gfx::TextureFlagBit::NONE; desc.flags = ResourceFlags::NONE; @@ -338,7 +372,7 @@ uint32_t NativePipeline::addCustomTexture( desc.depthOrArraySize = info.layerCount; desc.mipLevels = info.levelCount; desc.format = info.format; - desc.sampleCount = gfx::SampleCount::ONE; + desc.sampleCount = gfx::SampleCount::X1; desc.textureFlags = info.flags; desc.flags = ResourceFlags::NONE; @@ -504,6 +538,7 @@ void NativePipeline::updateShadingRateTexture( } void NativePipeline::beginFrame() { + // noop } void NativePipeline::update(const scene::Camera *camera) { @@ -516,59 +551,52 @@ void NativePipeline::update(const scene::Camera *camera) { } void NativePipeline::endFrame() { + // noop } -namespace { - -RenderPassBuilder *addRenderPassImpl( - const PipelineRuntime *ppl, - RenderGraph &renderGraph, const NativeProgramLibrary &lib, - uint32_t width, uint32_t height, // NOLINT(bugprone-easily-swappable-parameters) - uint32_t count, uint32_t quality, // NOLINT(bugprone-easily-swappable-parameters) +RenderPassBuilder *NativePipeline::addRenderPass( + uint32_t width, uint32_t height, const ccstd::string &passName) { - RasterPass pass(renderGraph.get_allocator()); - pass.width = width; - pass.height = height; - pass.viewport.width = width; - pass.viewport.height = height; - pass.count = count; - pass.quality = quality; - - auto passID = addVertex( - RasterPassTag{}, - std::forward_as_tuple(passName), - std::forward_as_tuple(passName), - std::forward_as_tuple(), - std::forward_as_tuple(), - std::forward_as_tuple(std::move(pass)), - renderGraph); + const auto &layoutGraph = programLibrary->layoutGraph; - auto passLayoutID = locate(LayoutGraphData::null_vertex(), passName, lib.layoutGraph); - CC_EXPECTS(passLayoutID != LayoutGraphData::null_vertex()); + auto [passID, passLayoutID] = addRenderPassVertex( + renderGraph, layoutGraph, + width, height, 1, 0, passName); auto *builder = ccnew NativeRenderPassBuilder( - ppl, &renderGraph, passID, &lib.layoutGraph, passLayoutID); + this, &renderGraph, passID, &layoutGraph, passLayoutID); + updateRasterPassConstants(width, height, *builder); return builder; } -} // namespace - -RenderPassBuilder *NativePipeline::addRenderPass( - uint32_t width, uint32_t height, // NOLINT(bugprone-easily-swappable-parameters) - const ccstd::string &passName) { - return addRenderPassImpl( - this, renderGraph, *programLibrary, width, height, 1, 0, passName); -} - -BasicRenderPassBuilder *NativePipeline::addMultisampleRenderPass( - uint32_t width, uint32_t height, // NOLINT(bugprone-easily-swappable-parameters) +MultisampleRenderPassBuilder *NativePipeline::addMultisampleRenderPass( + uint32_t width, uint32_t height, uint32_t count, uint32_t quality, const ccstd::string &passName) { CC_EXPECTS(count > 1); - return addRenderPassImpl( - this, renderGraph, *programLibrary, width, height, count, quality, passName); + const auto &layoutGraph = programLibrary->layoutGraph; + + auto [passID, passLayoutID] = addRenderPassVertex( + renderGraph, layoutGraph, + width, height, count, quality, passName); + + auto &pass = get(RasterPassTag{}, passID, renderGraph); + + auto [subpassID, subpassLayoutID] = addRenderSubpassVertex( + pass, renderGraph, passID, + layoutGraph, passLayoutID, + "", // subpassName is empty + count, quality); + + auto *builder = ccnew NativeMultisampleRenderPassBuilder( + this, &renderGraph, passID, &layoutGraph, passLayoutID, + subpassID, subpassLayoutID); + + updateRasterPassConstants(pass.width, pass.height, *builder); + + return builder; } void NativePipeline::addResolvePass(const ccstd::vector &resolvePairs) { @@ -578,7 +606,7 @@ void NativePipeline::addResolvePass(const ccstd::vector &resolvePai pass.resolvePairs.emplace_back(pair); } std::string_view name("Resolve"); - addVertex( + addVertex2( ResolveTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -590,7 +618,7 @@ void NativePipeline::addResolvePass(const ccstd::vector &resolvePai // NOLINTNEXTLINE ComputePassBuilder *NativePipeline::addComputePass(const ccstd::string &passName) { - auto passID = addVertex( + auto passID = addVertex2( ComputeTag{}, std::forward_as_tuple(passName), std::forward_as_tuple(passName), @@ -611,7 +639,7 @@ void NativePipeline::addMovePass(const ccstd::vector &movePairs) { pass.movePairs.emplace_back(pair); } std::string_view name("Move"); - addVertex( + addVertex2( MoveTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -621,6 +649,180 @@ void NativePipeline::addMovePass(const ccstd::vector &movePairs) { renderGraph); } +namespace { + +void setupGpuDrivenResources( + NativePipeline& ppl, uint32_t cullingID, ResourceGraph& resg, const std::string &hzbName) { + ccstd::pmr::string name(resg.get_allocator()); + { // init resource + name = "_GpuInit"; + name.append(std::to_string(cullingID)); + auto resID = findVertex(name, resg); + if (resID == ResourceGraph::null_vertex()) { + resID = addVertex( + PersistentBufferTag{}, + std::forward_as_tuple(name.c_str()), + std::forward_as_tuple(), + std::forward_as_tuple(ResourceTraits{ResourceResidency::EXTERNAL}), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(/*xxx*/), + resg); + } else { + CC_EXPECTS(holds(resID, resg)); + // get(PersistentBufferTag{}, resID, resg) = xxx; + } + } + { + name = "CCObjectBuffer"; + name.append(std::to_string(cullingID)); + auto resID = findVertex(name, resg); + if (resID == ResourceGraph::null_vertex()) { + resID = ppl.addStorageBuffer(std::string(name), gfx::Format::UNKNOWN, 0, ResourceResidency::MANAGED); + } else { + CC_EXPECTS(holds(resID, resg)); + ppl.updateStorageBuffer(std::string(name), 0, gfx::Format::UNKNOWN); + } + } + { + name = "CCInstanceBuffer"; + name.append(std::to_string(cullingID)); + auto resID = findVertex(name, resg); + if (resID == ResourceGraph::null_vertex()) { + resID = ppl.addStorageBuffer(std::string(name), gfx::Format::UNKNOWN, 0, ResourceResidency::MANAGED); + } else { + CC_EXPECTS(holds(resID, resg)); + ppl.updateStorageBuffer(std::string(name), 0, gfx::Format::UNKNOWN); + } + } + { + name = "CCDrawIndirectBuffer"; + name.append(std::to_string(cullingID)); + auto resID = findVertex(name, resg); + if (resID == ResourceGraph::null_vertex()) { + resID = ppl.addStorageBuffer(std::string(name), gfx::Format::UNKNOWN, 0, ResourceResidency::MANAGED); + } else { + CC_EXPECTS(holds(resID, resg)); + ppl.updateStorageBuffer(std::string(name), 0, gfx::Format::UNKNOWN); + } + } + { + name = "CCDrawInstanceBuffer"; + name.append(std::to_string(cullingID)); + auto resID = findVertex(name, resg); + if (resID == ResourceGraph::null_vertex()) { + resID = ppl.addStorageBuffer(std::string(name), gfx::Format::UNKNOWN, 0, ResourceResidency::MANAGED); + } else { + CC_EXPECTS(holds(resID, resg)); + ppl.updateStorageBuffer(std::string(name), 0, gfx::Format::UNKNOWN); + } + } + { + name = "CCVisibilityBuffer"; + name.append(std::to_string(cullingID)); + auto resID = findVertex(name, resg); + if (resID == ResourceGraph::null_vertex()) { + resID = ppl.addStorageBuffer(std::string(name), gfx::Format::UNKNOWN, 0, ResourceResidency::MANAGED); + } else { + CC_EXPECTS(holds(resID, resg)); + ppl.updateStorageBuffer(std::string(name), 0, gfx::Format::UNKNOWN); + } + } + if (!hzbName.empty()) { + + } +} + +} // namespace + +void NativePipeline::addBuiltinGpuCullingPass( + const scene::Camera *camera, const std::string &hzbName, const scene::Light *light) { + std::ignore = camera; + const uint32_t cullingID = ++nativeContext.sceneCulling.gpuCullingPassID; + setupGpuDrivenResources(*this, cullingID, resourceGraph, hzbName); + + if (light) { + // build light culling pass + return; + } + + const std::string objectBuffer = "CCObjectBuffer" + std::to_string(cullingID); + const std::string instanceBuffer = "CCInstanceBuffer" + std::to_string(cullingID); + const std::string drawIndirectBuffer = "CCDrawIndirectBuffer" + std::to_string(cullingID); + const std::string drawInstanceBuffer = "CCDrawInstanceBuffer" + std::to_string(cullingID); + const std::string visibilityBuffer = "CCVisibilityBuffer" + std::to_string(cullingID); + + // init indirected buffers + { + CopyPass copyPass{renderGraph.get_allocator()}; + { + CopyPair copyPair{renderGraph.get_allocator()}; + copyPair.source = "xxx"; + copyPair.target = drawIndirectBuffer; + copyPair.mipLevels = 1; + copyPair.numSlices = 1; + copyPass.copyPairs.emplace_back(std::move(copyPair)); + } + + auto copyID = addVertex2(CopyTag{}, + std::forward_as_tuple("CopyInitialIndirectBuffer"), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(copyPass)), + renderGraph); + CC_ENSURES(copyID != RenderGraph::null_vertex()); + } + // run compute cullling pass + { + ComputePass computePass{renderGraph.get_allocator()}; + { + auto res = computePass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(drawIndirectBuffer), + std::forward_as_tuple()); + auto& view = res.first->second.emplace_back(); + view.name = "CCDrawIndirectBuffer"; + view.accessType = AccessType::WRITE; + view.shaderStageFlags = gfx::ShaderStageFlagBit::COMPUTE; + } + { + auto res = computePass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(drawInstanceBuffer), + std::forward_as_tuple()); + auto& view = res.first->second.emplace_back(); + view.name = "CCDrawInstanceBuffer"; + view.accessType = AccessType::WRITE; + view.shaderStageFlags = gfx::ShaderStageFlagBit::COMPUTE; + } + { + auto res = computePass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(visibilityBuffer), + std::forward_as_tuple()); + auto& view = res.first->second.emplace_back(); + view.name = "CCVisibilityBuffer"; + view.accessType = AccessType::WRITE; + view.shaderStageFlags = gfx::ShaderStageFlagBit::COMPUTE; + } + + auto computePassID = addVertex2(ComputeTag{}, + std::forward_as_tuple("Scene"), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(computePass)), + renderGraph); + CC_ENSURES(computePassID != RenderGraph::null_vertex()); + } +} + +void NativePipeline::addBuiltinHzbGenerationPass( + // NOLINTNEXTLINE(bugprone-easily-swappable-parameters) + const std::string &sourceDepthStencilName, const std::string &targetHzbName) { +} + void NativePipeline::addCopyPass(const ccstd::vector ©Pairs) { CopyPass pass(renderGraph.get_allocator()); pass.copyPairs.reserve(copyPairs.size()); @@ -628,7 +830,7 @@ void NativePipeline::addCopyPass(const ccstd::vector ©Pairs) { pass.copyPairs.emplace_back(pair); } std::string_view name("Copy"); - addVertex( + addVertex2( CopyTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -646,7 +848,7 @@ void NativePipeline::addUploadPass(ccstd::vector &uploadPairs) { } uploadPairs.clear(); std::string_view name("Upload"); - addVertex( + addVertex2( CopyTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h b/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h index 13635e3aff2..846d97ac32d 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h +++ b/native/cocos/renderer/pipeline/custom/NativePipelineFwd.h @@ -46,15 +46,13 @@ class NativeRenderSubpassBuilder; class NativeMultisampleRenderSubpassBuilder; class NativeComputeSubpassBuilder; class NativeRenderPassBuilder; +class NativeMultisampleRenderPassBuilder; class NativeComputeQueueBuilder; class NativeComputePassBuilder; -class NativeSceneTransversal; struct RenderInstancingQueue; struct DrawInstance; struct RenderDrawQueue; struct NativeRenderQueue; -class DefaultSceneVisitor; -class DefaultForwardLightingTransversal; struct ResourceGroup; struct BufferPool; struct DescriptorSetPool; diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp index cf5285f441e..d8de417ef46 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.cpp @@ -80,12 +80,6 @@ NativeRenderQueue::NativeRenderQueue(NativeRenderQueue&& rhs, const allocator_ty sceneFlags(rhs.sceneFlags), subpassOrPassLayoutID(rhs.subpassOrPassLayoutID) {} -DefaultSceneVisitor::DefaultSceneVisitor(const allocator_type& alloc) noexcept -: name(alloc) {} - -DefaultForwardLightingTransversal::DefaultForwardLightingTransversal(const allocator_type& alloc) noexcept -: name(alloc) {} - ResourceGroup::ResourceGroup(const allocator_type& alloc) noexcept : instancingBuffers(alloc) {} @@ -186,7 +180,8 @@ SceneCulling::SceneCulling(SceneCulling&& rhs, const allocator_type& alloc) renderQueues(std::move(rhs.renderQueues), alloc), sceneQueryIndex(std::move(rhs.sceneQueryIndex), alloc), numCullingQueries(rhs.numCullingQueries), - numRenderQueues(rhs.numRenderQueues) {} + numRenderQueues(rhs.numRenderQueues), + gpuCullingPassID(rhs.gpuCullingPassID) {} NativeRenderContext::NativeRenderContext(std::unique_ptr defaultResourceIn, const allocator_type& alloc) noexcept : defaultResource(std::move(defaultResourceIn)), diff --git a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h index 97ee431bc01..b21235bc46b 100644 --- a/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h +++ b/native/cocos/renderer/pipeline/custom/NativePipelineTypes.h @@ -86,6 +86,10 @@ class NativeSetter : public NativeRenderNode { void setReadWriteBuffer(const ccstd::string &name, gfx::Buffer *buffer) /*implements*/; void setReadWriteTexture(const ccstd::string &name, gfx::Texture *texture) /*implements*/; void setSampler(const ccstd::string &name, gfx::Sampler *sampler) /*implements*/; + void setBuiltinCameraConstants(const scene::Camera *camera) /*implements*/; + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) /*implements*/; + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) /*implements*/; + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) /*implements*/; void setVec4ArraySize(const ccstd::string& name, uint32_t sz); void setVec4ArrayElem(const ccstd::string& name, const cc::Vec4& vec, uint32_t id); @@ -165,8 +169,23 @@ class NativeRenderQueueBuilder final : public RenderQueueBuilder, public NativeS void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addSceneOfCamera(scene::Camera *camera, LightInfo light, SceneFlags sceneFlags) override; + void addScene(const scene::Camera *camera, SceneFlags sceneFlags) override; + void addSceneCulledByDirectionalLight(const scene::Camera *camera, SceneFlags sceneFlags, scene::DirectionalLight *light, uint32_t level) override; + void addSceneCulledBySpotLight(const scene::Camera *camera, SceneFlags sceneFlags, scene::SpotLight *light) override; void addFullscreenQuad(Material *material, uint32_t passID, SceneFlags sceneFlags) override; void addCameraQuad(scene::Camera *camera, Material *material, uint32_t passID, SceneFlags sceneFlags) override; void clearRenderTarget(const ccstd::string &name, const gfx::Color &color) override; @@ -225,6 +244,18 @@ class NativeRenderSubpassBuilder final : public RenderSubpassBuilder, public Nat void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addRenderTarget(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName, gfx::LoadOp loadOp, gfx::StoreOp storeOp, const gfx::Color &color) override { NativeRenderSubpassBuilderImpl::addRenderTarget(name, accessType, slotName, loadOp, storeOp, color); @@ -309,6 +340,18 @@ class NativeMultisampleRenderSubpassBuilder final : public MultisampleRenderSubp void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addRenderTarget(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName, gfx::LoadOp loadOp, gfx::StoreOp storeOp, const gfx::Color &color) override { NativeRenderSubpassBuilderImpl::addRenderTarget(name, accessType, slotName, loadOp, storeOp, color); @@ -396,6 +439,18 @@ class NativeComputeSubpassBuilder final : public ComputeSubpassBuilder, public N void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addRenderTarget(const ccstd::string &name, const ccstd::string &slotName) override; void addTexture(const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) override; @@ -456,6 +511,18 @@ class NativeRenderPassBuilder final : public RenderPassBuilder, public NativeSet void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addRenderTarget(const ccstd::string &name, gfx::LoadOp loadOp, gfx::StoreOp storeOp, const gfx::Color &color) override; void addDepthStencil(const ccstd::string &name, gfx::LoadOp loadOp, gfx::StoreOp storeOp, float depth, uint8_t stencil, gfx::ClearFlagBit clearFlags) override; @@ -475,6 +542,91 @@ class NativeRenderPassBuilder final : public RenderPassBuilder, public NativeSet void setCustomShaderStages(const ccstd::string &name, gfx::ShaderStageFlagBit stageFlags) override; }; +class NativeMultisampleRenderPassBuilder final : public MultisampleRenderPassBuilder, public NativeSetter { +public: + NativeMultisampleRenderPassBuilder(const PipelineRuntime* pipelineRuntimeIn, RenderGraph* renderGraphIn, uint32_t nodeIDIn, const LayoutGraphData* layoutGraphIn, uint32_t layoutIDIn, uint32_t subpassIDIn, uint32_t subpassLayoutIDIn) noexcept // NOLINT + : NativeSetter(pipelineRuntimeIn, renderGraphIn, nodeIDIn, layoutGraphIn, layoutIDIn), + subpassID(subpassIDIn), + subpassLayoutID(subpassLayoutIDIn) {} + + ccstd::string getName() const override { + return NativeRenderNode::getName(); + } + void setName(const ccstd::string &name) override { + NativeRenderNode::setName(name); + } + void setCustomBehavior(const ccstd::string &name) override { + NativeRenderNode::setCustomBehavior(name); + } + + void setMat4(const ccstd::string &name, const Mat4 &mat) override { + NativeSetter::setMat4(name, mat); + } + void setQuaternion(const ccstd::string &name, const Quaternion &quat) override { + NativeSetter::setQuaternion(name, quat); + } + void setColor(const ccstd::string &name, const gfx::Color &color) override { + NativeSetter::setColor(name, color); + } + void setVec4(const ccstd::string &name, const Vec4 &vec) override { + NativeSetter::setVec4(name, vec); + } + void setVec2(const ccstd::string &name, const Vec2 &vec) override { + NativeSetter::setVec2(name, vec); + } + void setFloat(const ccstd::string &name, float v) override { + NativeSetter::setFloat(name, v); + } + void setArrayBuffer(const ccstd::string &name, const ArrayBuffer *arrayBuffer) override { + NativeSetter::setArrayBuffer(name, arrayBuffer); + } + void setBuffer(const ccstd::string &name, gfx::Buffer *buffer) override { + NativeSetter::setBuffer(name, buffer); + } + void setTexture(const ccstd::string &name, gfx::Texture *texture) override { + NativeSetter::setTexture(name, texture); + } + void setReadWriteBuffer(const ccstd::string &name, gfx::Buffer *buffer) override { + NativeSetter::setReadWriteBuffer(name, buffer); + } + void setReadWriteTexture(const ccstd::string &name, gfx::Texture *texture) override { + NativeSetter::setReadWriteTexture(name, texture); + } + void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { + NativeSetter::setSampler(name, sampler); + } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } + + void addRenderTarget(const ccstd::string &name, gfx::LoadOp loadOp, gfx::StoreOp storeOp, const gfx::Color &color) override; + void addDepthStencil(const ccstd::string &name, gfx::LoadOp loadOp, gfx::StoreOp storeOp, float depth, uint8_t stencil, gfx::ClearFlagBit clearFlags) override; + void addTexture(const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) override; + RenderQueueBuilder *addQueue(QueueHint hint, const ccstd::string &phaseName) override; + void setViewport(const gfx::Viewport &viewport) override; + void setVersion(const ccstd::string &name, uint64_t version) override; + bool getShowStatistics() const override; + void setShowStatistics(bool enable) override; + + void resolveRenderTarget(const ccstd::string &source, const ccstd::string &target) override; + void resolveDepthStencil(const ccstd::string &source, const ccstd::string &target, gfx::ResolveMode depthMode, gfx::ResolveMode stencilMode) override; + + void addStorageBuffer(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) override; + void addStorageImage(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) override; + + uint32_t subpassID{RenderGraph::null_vertex()}; + uint32_t subpassLayoutID{RenderGraph::null_vertex()}; +}; + class NativeComputeQueueBuilder final : public ComputeQueueBuilder, public NativeSetter { public: NativeComputeQueueBuilder(const PipelineRuntime* pipelineRuntimeIn, RenderGraph* renderGraphIn, uint32_t nodeIDIn, const LayoutGraphData* layoutGraphIn, uint32_t layoutIDIn) noexcept @@ -526,6 +678,18 @@ class NativeComputeQueueBuilder final : public ComputeQueueBuilder, public Nativ void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addDispatch(uint32_t threadGroupCountX, uint32_t threadGroupCountY, uint32_t threadGroupCountZ, Material *material, uint32_t passID) override; }; @@ -581,6 +745,18 @@ class NativeComputePassBuilder final : public ComputePassBuilder, public NativeS void setSampler(const ccstd::string &name, gfx::Sampler *sampler) override { NativeSetter::setSampler(name, sampler); } + void setBuiltinCameraConstants(const scene::Camera *camera) override { + NativeSetter::setBuiltinCameraConstants(camera); + } + void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) override { + NativeSetter::setBuiltinShadowMapConstants(light); + } + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) override { + NativeSetter::setBuiltinDirectionalLightViewConstants(light, level); + } + void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) override { + NativeSetter::setBuiltinSpotLightViewConstants(light); + } void addTexture(const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) override; void addStorageBuffer(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) override; @@ -590,19 +766,6 @@ class NativeComputePassBuilder final : public ComputePassBuilder, public NativeS void setCustomShaderStages(const ccstd::string &name, gfx::ShaderStageFlagBit stageFlags) override; }; -class NativeSceneTransversal final : public SceneTransversal { -public: - NativeSceneTransversal() = default; - NativeSceneTransversal(const scene::Camera* cameraIn, const scene::RenderScene* sceneIn) noexcept - : camera(cameraIn), - scene(sceneIn) {} - - SceneTask *transverse(SceneVisitor *visitor) const override; - - const scene::Camera* camera{nullptr}; - const scene::RenderScene* scene{nullptr}; -}; - struct RenderInstancingQueue { using allocator_type = boost::container::pmr::polymorphic_allocator; allocator_type get_allocator() const noexcept { // NOLINT @@ -694,41 +857,6 @@ struct NativeRenderQueue { uint32_t subpassOrPassLayoutID{0xFFFFFFFF}; }; -class DefaultSceneVisitor final : public SceneVisitor { -public: - using allocator_type = boost::container::pmr::polymorphic_allocator; - allocator_type get_allocator() const noexcept { // NOLINT - return {name.get_allocator().resource()}; - } - - DefaultSceneVisitor(const allocator_type& alloc) noexcept; // NOLINT - - const pipeline::PipelineSceneData *getPipelineSceneData() const override; - void setViewport(const gfx::Viewport &vp) override; - void setScissor(const gfx::Rect &rect) override; - void bindPipelineState(gfx::PipelineState *pso) override; - void bindDescriptorSet(uint32_t set, gfx::DescriptorSet *descriptorSet, uint32_t dynamicOffsetCount, const uint32_t *dynamicOffsets) override; - void bindInputAssembler(gfx::InputAssembler *ia) override; - void updateBuffer(gfx::Buffer *buff, const void *data, uint32_t size) override; - void draw(const gfx::DrawInfo &info) override; - - ccstd::pmr::string name; -}; - -class DefaultForwardLightingTransversal final : public SceneTransversal { -public: - using allocator_type = boost::container::pmr::polymorphic_allocator; - allocator_type get_allocator() const noexcept { // NOLINT - return {name.get_allocator().resource()}; - } - - DefaultForwardLightingTransversal(const allocator_type& alloc) noexcept; // NOLINT - - SceneTask *transverse(SceneVisitor *visitor) const override; - - ccstd::pmr::string name; -}; - struct ResourceGroup { using allocator_type = boost::container::pmr::polymorphic_allocator; allocator_type get_allocator() const noexcept { // NOLINT @@ -968,6 +1096,7 @@ struct SceneCulling { PmrFlatMap sceneQueryIndex; uint32_t numCullingQueries{0}; uint32_t numRenderQueues{0}; + uint32_t gpuCullingPassID{0xFFFFFFFF}; }; struct NativeRenderContext { @@ -1109,10 +1238,11 @@ class NativePipeline final : public Pipeline { uint32_t addDepthStencil(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, ResourceResidency residency) override; void updateRenderTarget(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) override; void updateDepthStencil(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) override; + uint32_t addResource(const ccstd::string &name, ResourceDimension dimension, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) override; + void updateResource(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) override; void beginFrame() override; void update(const scene::Camera *camera) override; void endFrame() override; - BasicRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality, const ccstd::string &passName) override; void addResolvePass(const ccstd::vector &resolvePairs) override; void addCopyPass(const ccstd::vector ©Pairs) override; gfx::DescriptorSetLayout *getDescriptorSetLayout(const ccstd::string &shaderName, UpdateFrequency freq) override; @@ -1124,9 +1254,12 @@ class NativePipeline final : public Pipeline { void updateStorageTexture(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) override; void updateShadingRateTexture(const ccstd::string &name, uint32_t width, uint32_t height) override; RenderPassBuilder *addRenderPass(uint32_t width, uint32_t height, const ccstd::string &passName) override; + MultisampleRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality, const ccstd::string &passName) override; ComputePassBuilder *addComputePass(const ccstd::string &passName) override; void addUploadPass(ccstd::vector &uploadPairs) override; void addMovePass(const ccstd::vector &movePairs) override; + void addBuiltinGpuCullingPass(const scene::Camera *camera, const std::string &hzbName, const scene::Light *light) override; + void addBuiltinHzbGenerationPass(const std::string &sourceDepthStencilName, const std::string &targetHzbName) override; uint32_t addCustomBuffer(const ccstd::string &name, const gfx::BufferInfo &info, const std::string &type) override; uint32_t addCustomTexture(const ccstd::string &name, const gfx::TextureInfo &info, const std::string &type) override; diff --git a/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp b/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp index c5ddc488354..528c95d5ce7 100644 --- a/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeRenderGraph.cpp @@ -22,31 +22,14 @@ THE SOFTWARE. ****************************************************************************/ -#include -#include -#include "LayoutGraphGraphs.h" -#include "NativePipelineGraphs.h" -#include "NativePipelineTypes.h" -#include "NativeUtils.h" -#include "RenderCommonNames.h" -#include "RenderCommonTypes.h" -#include "RenderGraphFwd.h" -#include "RenderGraphGraphs.h" -#include "RenderGraphTypes.h" -#include "RenderingModule.h" -#include "cocos/math/Utils.h" -#include "cocos/renderer/pipeline/Define.h" -#include "cocos/renderer/pipeline/PipelineUBO.h" +#include "cocos/renderer/pipeline/custom/NativeBuiltinUtils.h" +#include "cocos/renderer/pipeline/custom/NativePipelineTypes.h" +#include "cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h" +#include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" #include "cocos/scene/DirectionalLight.h" -#include "cocos/scene/Fog.h" -#include "cocos/scene/Skybox.h" +#include "cocos/scene/RenderScene.h" #include "cocos/scene/SpotLight.h" -#include "details/DebugUtils.h" -#include "details/GraphView.h" -#include "details/GslUtils.h" -#include "gfx-base/GFXDef-common.h" -#include "gfx-base/GFXDevice.h" -#include "pipeline/PipelineSceneData.h" namespace cc { @@ -64,300 +47,17 @@ void NativeRenderNode::setCustomBehavior(const ccstd::string &name) { // NOLINT( get(RenderGraph::DataTag{}, *renderGraph, nodeID).custom = std::string_view{name}; } -void NativeSetter::setMat4(const ccstd::string &name, const Mat4 &mat) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setMat4Impl(data, *layoutGraph, name, mat); -} - -void NativeSetter::setQuaternion(const ccstd::string &name, const Quaternion &quat) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setQuaternionImpl(data, *layoutGraph, name, quat); -} - -void NativeSetter::setColor(const ccstd::string &name, const gfx::Color &color) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setColorImpl(data, *layoutGraph, name, color); -} - -void NativeSetter::setVec4(const ccstd::string &name, const Vec4 &vec) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setVec4Impl(data, *layoutGraph, name, vec); -} - -void NativeSetter::setVec2(const ccstd::string &name, const Vec2 &vec) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setVec2Impl(data, *layoutGraph, name, vec); -} - -void NativeSetter::setFloat(const ccstd::string &name, float v) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setFloatImpl(data, *layoutGraph, name, v); -} - -void NativeSetter::setArrayBuffer(const ccstd::string &name, const ArrayBuffer *buffer) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setArrayBufferImpl(data, *layoutGraph, name, *buffer); -} - -void NativeSetter::setBuffer(const ccstd::string &name, gfx::Buffer *buffer) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setBufferImpl(data, *layoutGraph, name, buffer); -} - -void NativeSetter::setTexture(const ccstd::string &name, gfx::Texture *texture) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setTextureImpl(data, *layoutGraph, name, texture); -} - -void NativeSetter::setReadWriteBuffer(const ccstd::string &name, gfx::Buffer *buffer) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setReadWriteBufferImpl(data, *layoutGraph, name, buffer); -} - -void NativeSetter::setReadWriteTexture(const ccstd::string &name, gfx::Texture *texture) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setReadWriteTextureImpl(data, *layoutGraph, name, texture); -} - -void NativeSetter::setSampler(const ccstd::string &name, gfx::Sampler *sampler) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setSamplerImpl(data, *layoutGraph, name, sampler); -} - -void NativeSetter::setVec4ArraySize(const ccstd::string &name, uint32_t sz) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setVec4ArraySizeImpl(data, *layoutGraph, name, sz); -} - -void NativeSetter::setVec4ArrayElem(const ccstd::string &name, const cc::Vec4 &vec, uint32_t id) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setVec4ArrayElemImpl(data, *layoutGraph, name, vec, id); -} - -void NativeSetter::setMat4ArraySize(const ccstd::string &name, uint32_t sz) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setMat4ArraySizeImpl(data, *layoutGraph, name, sz); -} - -void NativeSetter::setMat4ArrayElem(const ccstd::string &name, const cc::Mat4 &mat, uint32_t id) { - auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - setMat4ArrayElemImpl(data, *layoutGraph, name, mat, id); -} - -namespace { - -uint8_t getCombineSignY(gfx::Device *device) { - // 0: vk, 1: metal, 2: none, 3: gl-like - static int8_t combineSignY{-1}; - if (combineSignY < 0) { - const float screenSpaceSignY = device->getCapabilities().screenSpaceSignY * 0.5F + 0.5F; - const float clipSpaceSignY = device->getCapabilities().clipSpaceSignY * 0.5F + 0.5F; - combineSignY = static_cast(static_cast(screenSpaceSignY) << 1 | static_cast(clipSpaceSignY)); +RenderGraph::vertex_descriptor RenderGraph::getPassID(vertex_descriptor nodeID) const { + CC_EXPECTS(nodeID != null_vertex()); + for (auto parentID = nodeID; + parentID != RenderGraph::null_vertex(); + parentID = parent(nodeID, *this)) { + nodeID = parentID; } - return static_cast(combineSignY); -} - -void setCameraUBOValues( - const scene::Camera &camera, - const LayoutGraphData &layoutGraph, - const pipeline::PipelineSceneData &cfg, - const scene::DirectionalLight *mainLight, - RenderData &data) { - CC_EXPECTS(camera.getNode()); - CC_EXPECTS(cfg.getSkybox()); - const auto &skybox = *cfg.getSkybox(); - const auto &shadingScale = cfg.getShadingScale(); - // Camera - setMat4Impl(data, layoutGraph, "cc_matView", camera.getMatView()); - setMat4Impl(data, layoutGraph, "cc_matViewInv", camera.getNode()->getWorldMatrix()); - setMat4Impl(data, layoutGraph, "cc_matProj", camera.getMatProj()); - setMat4Impl(data, layoutGraph, "cc_matProjInv", camera.getMatProjInv()); - setMat4Impl(data, layoutGraph, "cc_matViewProj", camera.getMatViewProj()); - setMat4Impl(data, layoutGraph, "cc_matViewProjInv", camera.getMatViewProjInv()); - setVec4Impl(data, layoutGraph, "cc_cameraPos", - Vec4( - camera.getPosition().x, - camera.getPosition().y, - camera.getPosition().z, - getCombineSignY(cc::gfx::Device::getInstance()))); - setVec4Impl(data, layoutGraph, "cc_surfaceTransform", - Vec4( - static_cast(camera.getSurfaceTransform()), - static_cast(camera.getCameraUsage()), - cosf(static_cast(mathutils::toRadian(skybox.getRotationAngle()))), - sinf(static_cast(mathutils::toRadian(skybox.getRotationAngle()))))); - setVec4Impl(data, layoutGraph, "cc_screenScale", - Vec4( - cfg.getShadingScale(), - cfg.getShadingScale(), - 1.0F / cfg.getShadingScale(), - 1.0F / cfg.getShadingScale())); - setVec4Impl(data, layoutGraph, "cc_exposure", - Vec4( - camera.getExposure(), - 1.0F / camera.getExposure(), - cfg.isHDR() ? 1.0F : 0.0F, - 1.0F / scene::Camera::getStandardExposureValue())); - - if (mainLight) { - const auto &shadowInfo = *cfg.getShadows(); - const bool shadowEnable = (mainLight->isShadowEnabled() && - shadowInfo.getType() == scene::ShadowType::SHADOW_MAP); - setVec4Impl(data, layoutGraph, "cc_mainLitDir", - Vec4( - mainLight->getDirection().x, - mainLight->getDirection().y, - mainLight->getDirection().z, - shadowEnable)); - auto r = mainLight->getColor().x; - auto g = mainLight->getColor().y; - auto b = mainLight->getColor().z; - if (mainLight->isUseColorTemperature()) { - r *= mainLight->getColorTemperatureRGB().x; - g *= mainLight->getColorTemperatureRGB().y; - b *= mainLight->getColorTemperatureRGB().z; - } - auto w = mainLight->getIlluminance(); - if (cfg.isHDR()) { - w *= camera.getExposure(); - } - setVec4Impl(data, layoutGraph, "cc_mainLitColor", Vec4(r, g, b, w)); - } else { - setVec4Impl(data, layoutGraph, "cc_mainLitDir", Vec4(0, 0, 1, 0)); - setVec4Impl(data, layoutGraph, "cc_mainLitColor", Vec4(0, 0, 0, 0)); - } - - CC_EXPECTS(cfg.getAmbient()); - auto &ambient = *cfg.getAmbient(); - auto &skyColor = ambient.getSkyColor(); - if (cfg.isHDR()) { - skyColor.w = ambient.getSkyIllum() * camera.getExposure(); - } else { - skyColor.w = ambient.getSkyIllum(); - } - setVec4Impl(data, layoutGraph, "cc_ambientSky", - Vec4(skyColor.x, skyColor.y, skyColor.z, skyColor.w)); - setVec4Impl(data, layoutGraph, "cc_ambientGround", - Vec4( - ambient.getGroundAlbedo().x, - ambient.getGroundAlbedo().y, - ambient.getGroundAlbedo().z, - skybox.getEnvmap() ? static_cast(skybox.getEnvmap()->mipmapLevel()) : 1.0F)); - - CC_EXPECTS(cfg.getFog()); - const auto &fog = *cfg.getFog(); - - const auto &colorTempRGB = fog.getColorArray(); - setVec4Impl(data, layoutGraph, "cc_fogColor", - Vec4(colorTempRGB.x, colorTempRGB.y, colorTempRGB.z, colorTempRGB.z)); - setVec4Impl(data, layoutGraph, "cc_fogBase", - Vec4(fog.getFogStart(), fog.getFogEnd(), fog.getFogDensity(), 0.0F)); - setVec4Impl(data, layoutGraph, "cc_fogAdd", - Vec4(fog.getFogTop(), fog.getFogRange(), fog.getFogAtten(), 0.0F)); - setVec4Impl(data, layoutGraph, "cc_nearFar", - Vec4(camera.getNearClip(), camera.getFarClip(), camera.getClipSpaceMinz(), 0.0F)); - setVec4Impl(data, layoutGraph, "cc_viewPort", - Vec4( - camera.getViewport().x, - camera.getViewport().y, - shadingScale * static_cast(camera.getWindow()->getWidth()) * camera.getViewport().z, - shadingScale * static_cast(camera.getWindow()->getHeight()) * camera.getViewport().w)); + CC_ENSURES(nodeID != null_vertex()); + return nodeID; } -} // namespace - -// void NativeSetter::setCameraConstants(const scene::Camera *camera) { -// auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); -// setCameraUBOValues( -// *camera, -// *layoutGraph, -// *pipelineRuntime->getPipelineSceneData(), -// camera->getScene()->getMainLight(), data); -// } - -// void NativeSetter::setDirectionalLightProjectionConstants( -// const scene::DirectionalLight* light, uint32_t level) { -// CC_EXPECTS(light); -// const auto *device = pipelineRuntime->getDevice(); -// const auto &mainLight = *light; -// const auto& pplScenData = *pipelineRuntime->getPipelineSceneData(); -// const auto &shadowInfo = *pplScenData.getShadows(); -// const auto &csmLayers = *pplScenData.getCSMLayers(); -// const auto packing = pipeline::supportsR32FloatTexture(device) ? 0.0F : 1.0F; - -// auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); - -// float near = 0.1; -// float far = 0; -// Mat4 matShadowView; -// Mat4 matShadowProj; -// Mat4 matShadowViewProj; -// Vec4 vec4ShadowInfo{}; - -// scene::CSMLevel levelCount{}; -// if (mainLight.isShadowFixedArea() || mainLight.getCSMLevel() == scene::CSMLevel::LEVEL_1) { -// matShadowView = csmLayers.getSpecialLayer()->getMatShadowView(); -// matShadowProj = csmLayers.getSpecialLayer()->getMatShadowProj(); -// matShadowViewProj = csmLayers.getSpecialLayer()->getMatShadowViewProj(); -// if (mainLight.isShadowFixedArea()) { -// near = mainLight.getShadowNear(); -// far = mainLight.getShadowFar(); -// levelCount = static_cast(0); -// } else { -// near = 0.1; -// far = csmLayers.getSpecialLayer()->getShadowCameraFar(); -// levelCount = scene::CSMLevel::LEVEL_1; -// } -// vec4ShadowInfo.set(0.0F, packing, mainLight.getShadowNormalBias(), 0); -// setVec4Impl(data, *layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); -// } else { -// const auto &layer = *csmLayers.getLayers()[level]; -// matShadowView = layer.getMatShadowView(); -// matShadowProj = layer.getMatShadowProj(); -// matShadowViewProj = layer.getMatShadowViewProj(); - -// near = layer.getSplitCameraNear(); -// far = layer.getSplitCameraFar(); -// levelCount = mainLight.getCSMLevel(); -// } -// setMat4Impl(data, *layoutGraph, "cc_matLightView", matShadowView); -// setVec4Impl(data, *layoutGraph, "cc_shadowProjDepthInfo", -// Vec4( -// matShadowProj.m[10], -// matShadowProj.m[14], -// matShadowProj.m[11], -// matShadowProj.m[15])); -// setVec4Impl(data, *layoutGraph, "cc_shadowProjInfo", -// Vec4( -// matShadowProj.m[00], -// matShadowProj.m[05], -// 1.0F / matShadowProj.m[00], -// 1.0F / matShadowProj.m[05])); -// setMat4Impl(data, *layoutGraph, "cc_matLightViewProj", matShadowViewProj); -// vec4ShadowInfo.set(near, far, 0, 1.0F - mainLight.getShadowSaturation()); -// setVec4Impl(data, *layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); -// vec4ShadowInfo.set( -// 0.0F, -// packing, -// mainLight.getShadowNormalBias(), -// static_cast(levelCount)); -// setVec4Impl(data, *layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); -// vec4ShadowInfo.set( -// shadowInfo.getSize().x, -// shadowInfo.getSize().y, -// static_cast(mainLight.getShadowPcf()), -// mainLight.getShadowBias()); -// setVec4Impl(data, *layoutGraph, "cc_shadowWHPBInfo", vec4ShadowInfo); -// } - -// void NativeSetter::setSpotLightProjectionConstants(const scene::SpotLight* light) { - -// } - -// void NativeSetter::setShadowMapConstants(const scene::Light* light, uint32_t numLevels) { - -// } - namespace { template @@ -466,105 +166,14 @@ void NativeRenderPassBuilder::addDepthStencil( stencil); } -namespace { - -void addComputeView(NativeRenderPassBuilder &builder, const ccstd::string &name, const ComputeView &view) { - CC_EXPECTS(!name.empty()); - CC_EXPECTS(!view.name.empty()); - auto &pass = get(RasterPassTag{}, builder.nodeID, *builder.renderGraph); - auto iter = pass.computeViews.find(name.c_str()); - if (iter == pass.computeViews.end()) { - bool added = false; - std::tie(iter, added) = pass.computeViews.emplace( - std::piecewise_construct, - std::forward_as_tuple(name.c_str()), - std::forward_as_tuple()); - CC_ENSURES(added); - } - iter->second.emplace_back(view); -} - -void addComputeView(NativeComputePassBuilder &builder, const ccstd::string &name, const ComputeView &view) { - CC_EXPECTS(!name.empty()); - CC_EXPECTS(!view.name.empty()); - auto &pass = get(ComputeTag{}, builder.nodeID, *builder.renderGraph); - auto iter = pass.computeViews.find(name.c_str()); - if (iter == pass.computeViews.end()) { - bool added = false; - std::tie(iter, added) = pass.computeViews.emplace( - std::piecewise_construct, - std::forward_as_tuple(name.c_str()), - std::forward_as_tuple()); - CC_ENSURES(added); - } - iter->second.emplace_back(view); -} - -template -void addComputeViewImpl( - const ccstd::string &name, const ComputeView &view, - RenderGraph::vertex_descriptor subpassID, - RenderGraph &renderGraph) { - CC_EXPECTS(!name.empty()); - CC_EXPECTS(!view.name.empty()); - auto &subpass = get(Tag{}, subpassID, renderGraph); - const auto passID = parent(subpassID, renderGraph); - CC_EXPECTS(passID != RenderGraph::null_vertex()); - CC_EXPECTS(holds(passID, renderGraph)); - auto &pass = get(RasterPassTag{}, passID, renderGraph); - CC_EXPECTS(subpass.subpassID < num_vertices(pass.subpassGraph)); - auto &subpassData = get(SubpassGraph::SubpassTag{}, pass.subpassGraph, subpass.subpassID); - CC_EXPECTS(subpass.computeViews.size() == subpassData.computeViews.size()); - { - auto iter = subpassData.computeViews.find(name.c_str()); - if (iter == subpassData.computeViews.end()) { - bool added = false; - std::tie(iter, added) = subpassData.computeViews.emplace( - std::piecewise_construct, - std::forward_as_tuple(name.c_str()), - std::forward_as_tuple()); - CC_ENSURES(added); - } - iter->second.emplace_back(view); - } - { - auto iter = subpass.computeViews.find(name.c_str()); - if (iter == subpass.computeViews.end()) { - bool added = false; - std::tie(iter, added) = subpass.computeViews.emplace( - std::piecewise_construct, - std::forward_as_tuple(name.c_str()), - std::forward_as_tuple()); - CC_ENSURES(added); - } - iter->second.emplace_back(view); - } - CC_ENSURES(subpass.computeViews.size() == subpassData.computeViews.size()); - CC_ENSURES(subpass.computeViews.find(std::string_view{name}) != subpass.computeViews.end()); - CC_ENSURES(subpassData.computeViews.find(std::string_view{name}) != subpassData.computeViews.end()); - CC_ENSURES(subpass.computeViews.find(std::string_view{name})->second.size() == - subpassData.computeViews.find(std::string_view{name})->second.size()); -} - -void addComputeView( - NativeRenderSubpassBuilderImpl &builder, - const ccstd::string &name, const ComputeView &view) { - addComputeViewImpl(name, view, builder.nodeID, *builder.renderGraph); -} - -void addComputeView( - NativeComputeSubpassBuilder &builder, const ccstd::string &name, const ComputeView &view) { - addComputeViewImpl(name, view, builder.nodeID, *builder.renderGraph); -} - -} // namespace - // NOLINTNEXTLINE(bugprone-easily-swappable-parameters) void NativeRenderPassBuilder::addTexture( const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) { - addComputeView( - *this, + addPassComputeViewImpl( + RasterPassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -586,8 +195,10 @@ void NativeRenderPassBuilder::addTexture( void NativeRenderPassBuilder::addStorageBuffer( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addPassComputeViewImpl( + RasterPassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -601,8 +212,10 @@ void NativeRenderPassBuilder::addStorageBuffer( void NativeRenderPassBuilder::addStorageImage( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addPassComputeViewImpl( + RasterPassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -717,6 +330,8 @@ void addRasterViewImpl( gfx::ShaderStageFlagBit::NONE)); CC_ENSURES(res.second); res.first->second.slotID = slotID; + + pass.rasterViews.emplace(name, subpass.rasterViews.at(name.data())); } CC_ENSURES(subpass.rasterViews.size() == subpassData.rasterViews.size()); } @@ -768,8 +383,10 @@ void NativeRenderSubpassBuilderImpl::addDepthStencil( void NativeRenderSubpassBuilderImpl::addTexture( const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) { - addComputeView( - *this, + addSubpassComputeViewImpl( + RasterSubpassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -791,8 +408,10 @@ void NativeRenderSubpassBuilderImpl::addTexture( void NativeRenderSubpassBuilderImpl::addStorageBuffer( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addSubpassComputeViewImpl( + RasterSubpassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -806,8 +425,10 @@ void NativeRenderSubpassBuilderImpl::addStorageBuffer( void NativeRenderSubpassBuilderImpl::addStorageImage( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addSubpassComputeViewImpl( + RasterSubpassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -887,7 +508,7 @@ RenderQueueBuilder *NativeRenderSubpassBuilderImpl::addQueue( const auto phaseLayoutID = locate(layoutID, phaseName, *layoutGraph); CC_ENSURES(phaseLayoutID != LayoutGraphData::null_vertex()); - auto queueID = addVertex( + auto queueID = addVertex2( QueueTag{}, std::forward_as_tuple(phaseName), std::forward_as_tuple(phaseName), @@ -912,12 +533,19 @@ void NativeRenderSubpassBuilderImpl::setShowStatistics(bool enable) { void NativeMultisampleRenderSubpassBuilder::resolveRenderTarget( const ccstd::string &source, const ccstd::string &target) { // NOLINT(bugprone-easily-swappable-parameters) auto &subpass = get(RasterSubpassTag{}, nodeID, *renderGraph); + + auto parentID = parent(nodeID, *renderGraph); + auto &pass = get(RasterPassTag{}, parentID, *renderGraph); + auto &subpassData = get(SubpassGraph::SubpassTag{}, pass.subpassGraph, subpass.subpassID); + subpass.resolvePairs.emplace_back( ccstd::pmr::string(source.data(), renderGraph->get_allocator()), ccstd::pmr::string(target.data(), renderGraph->get_allocator()), ResolveFlags::COLOR, gfx::ResolveMode::AVERAGE, gfx::ResolveMode::NONE); + + subpassData.resolvePairs.emplace_back(subpass.resolvePairs.back()); } void NativeMultisampleRenderSubpassBuilder::resolveDepthStencil( @@ -931,12 +559,19 @@ void NativeMultisampleRenderSubpassBuilder::resolveDepthStencil( if (stencilMode != gfx::ResolveMode::NONE) { flags |= ResolveFlags::STENCIL; } + + auto parentID = parent(nodeID, *renderGraph); + auto &pass = get(RasterPassTag{}, parentID, *renderGraph); + auto &subpassData = get(SubpassGraph::SubpassTag{}, pass.subpassGraph, subpass.subpassID); + subpass.resolvePairs.emplace_back( ccstd::pmr::string(source.data(), renderGraph->get_allocator()), ccstd::pmr::string(target.data(), renderGraph->get_allocator()), flags, depthMode, stencilMode); + + subpassData.resolvePairs.emplace_back(subpass.resolvePairs.back()); } void NativeComputeSubpassBuilder::addRenderTarget(const ccstd::string &name, const ccstd::string &slotName) { @@ -958,8 +593,10 @@ void NativeComputeSubpassBuilder::addRenderTarget(const ccstd::string &name, con void NativeComputeSubpassBuilder::addTexture( const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) { - addComputeView( - *this, + addSubpassComputeViewImpl( + ComputeSubpassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -981,8 +618,10 @@ void NativeComputeSubpassBuilder::addTexture( void NativeComputeSubpassBuilder::addStorageBuffer( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addSubpassComputeViewImpl( + ComputeSubpassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -996,8 +635,10 @@ void NativeComputeSubpassBuilder::addStorageBuffer( void NativeComputeSubpassBuilder::addStorageImage( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addSubpassComputeViewImpl( + ComputeSubpassTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -1021,7 +662,7 @@ ComputeQueueBuilder *NativeComputeSubpassBuilder::addQueue(const ccstd::string & const auto phaseLayoutID = locate(layoutID, phaseName, *layoutGraph); CC_ENSURES(phaseLayoutID != LayoutGraphData::null_vertex()); - auto queueID = addVertex( + auto queueID = addVertex2( QueueTag{}, std::forward_as_tuple(phaseName), std::forward_as_tuple(phaseName), @@ -1033,315 +674,11 @@ ComputeQueueBuilder *NativeComputeSubpassBuilder::addQueue(const ccstd::string & return new NativeComputeQueueBuilder(pipelineRuntime, renderGraph, queueID, layoutGraph, phaseLayoutID); } -namespace { - -void setShadowUBOLightView( - gfx::Device *device, - const LayoutGraphData &layoutGraph, - const pipeline::PipelineSceneData &sceneData, - const scene::Light &light, - uint32_t level, - RenderData &data) { - const auto &shadowInfo = *sceneData.getShadows(); - const auto &csmLayers = *sceneData.getCSMLayers(); - const auto &packing = pipeline::supportsR32FloatTexture(device) ? 0.0F : 1.0F; - const auto &cap = device->getCapabilities(); - Vec4 vec4ShadowInfo{}; - - // ShadowMap - switch (light.getType()) { - case scene::LightType::DIRECTIONAL: { - const auto &mainLight = dynamic_cast(light); - if (shadowInfo.isEnabled() && mainLight.isShadowEnabled()) { - if (shadowInfo.getType() == scene::ShadowType::SHADOW_MAP) { - float near = 0.1F; - float far = 0.0F; - Mat4 matShadowView; - Mat4 matShadowProj; - Mat4 matShadowViewProj; - scene::CSMLevel levelCount{}; - if (mainLight.isShadowFixedArea() || mainLight.getCSMLevel() == scene::CSMLevel::LEVEL_1) { - matShadowView = csmLayers.getSpecialLayer()->getMatShadowView(); - matShadowProj = csmLayers.getSpecialLayer()->getMatShadowProj(); - matShadowViewProj = csmLayers.getSpecialLayer()->getMatShadowViewProj(); - if (mainLight.isShadowFixedArea()) { - near = mainLight.getShadowNear(); - far = mainLight.getShadowFar(); - levelCount = static_cast(0); - } else { - near = 0.1F; - far = csmLayers.getSpecialLayer()->getShadowCameraFar(); - levelCount = scene::CSMLevel::LEVEL_1; - } - vec4ShadowInfo.set(static_cast(scene::LightType::DIRECTIONAL), packing, mainLight.getShadowNormalBias(), 0); - setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); - } else { - const auto &layer = *csmLayers.getLayers()[level]; - matShadowView = layer.getMatShadowView(); - matShadowProj = layer.getMatShadowProj(); - matShadowViewProj = layer.getMatShadowViewProj(); - - near = layer.getSplitCameraNear(); - far = layer.getSplitCameraFar(); - levelCount = mainLight.getCSMLevel(); - } - setMat4Impl(data, layoutGraph, "cc_matLightView", matShadowView); - setVec4Impl(data, layoutGraph, "cc_shadowProjDepthInfo", - Vec4( - matShadowProj.m[10], - matShadowProj.m[14], - matShadowProj.m[11], - matShadowProj.m[15])); - setVec4Impl(data, layoutGraph, "cc_shadowProjInfo", - Vec4( - matShadowProj.m[00], - matShadowProj.m[05], - 1.0F / matShadowProj.m[00], - 1.0F / matShadowProj.m[05])); - setMat4Impl(data, layoutGraph, "cc_matLightViewProj", matShadowViewProj); - vec4ShadowInfo.set(near, far, 0, 1.0F - mainLight.getShadowSaturation()); - setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); - vec4ShadowInfo.set( - static_cast(scene::LightType::DIRECTIONAL), - packing, - mainLight.getShadowNormalBias(), - static_cast(levelCount)); - setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); - vec4ShadowInfo.set( - shadowInfo.getSize().x, - shadowInfo.getSize().y, - static_cast(mainLight.getShadowPcf()), - mainLight.getShadowBias()); - setVec4Impl(data, layoutGraph, "cc_shadowWHPBInfo", vec4ShadowInfo); - } - } - break; - } - case scene::LightType::SPOT: { - const auto &spotLight = dynamic_cast(light); - if (shadowInfo.isEnabled() && spotLight.isShadowEnabled()) { - const auto &matShadowCamera = spotLight.getNode()->getWorldMatrix(); - const auto matShadowView = matShadowCamera.getInversed(); - setMat4Impl(data, layoutGraph, "cc_matLightView", matShadowView); - - Mat4 matShadowViewProj{}; - Mat4::createPerspective(spotLight.getAngle(), 1.0F, 0.001F, - spotLight.getRange(), true, - cap.clipSpaceMinZ, cap.clipSpaceSignY, 0, &matShadowViewProj); - matShadowViewProj.multiply(matShadowView); - setMat4Impl(data, layoutGraph, "cc_matLightViewProj", matShadowViewProj); - - const Vec4 shadowNFLSInfos(0.01F, spotLight.getRange(), 0.0F, 0.0F); - setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", shadowNFLSInfos); - - const Vec4 shadowWHPBInfos( - shadowInfo.getSize().x, - shadowInfo.getSize().y, - spotLight.getShadowPcf(), - spotLight.getShadowBias()); - setVec4Impl(data, layoutGraph, "cc_shadowWHPBInfo", shadowWHPBInfos); - - const Vec4 shadowLPNNInfos(static_cast(scene::LightType::SPOT), packing, spotLight.getShadowNormalBias(), 0.0F); - setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", shadowLPNNInfos); - } - break; - } - default: - break; - } - - const auto &color = shadowInfo.getShadowColor4f(); - setColorImpl(data, layoutGraph, "cc_shadowColor", gfx::Color{color[0], color[1], color[2], color[3]}); -} - -float getPCFRadius( - const scene::Shadows &shadowInfo, - const scene::DirectionalLight &mainLight) { - const auto &shadowMapSize = shadowInfo.getSize().x; - switch (mainLight.getShadowPcf()) { - case scene::PCFType::HARD: - return 0.0F; - case scene::PCFType::SOFT: - return 1.0F / (shadowMapSize * 0.5F); - case scene::PCFType::SOFT_2X: - return 2.0F / (shadowMapSize * 0.5F); - case scene::PCFType::SOFT_4X: - return 3.0F / (shadowMapSize * 0.5F); - default: - break; - } - return 0.0F; -} - -void setShadowUBOView( - gfx::Device &device, - const LayoutGraphData &layoutGraph, - const pipeline::PipelineSceneData &sceneData, - const scene::DirectionalLight &mainLight, - RenderData &data) { - const auto &shadowInfo = *sceneData.getShadows(); - const auto &csmLayers = *sceneData.getCSMLayers(); - const auto &csmSupported = sceneData.getCSMSupported(); - const auto &packing = pipeline::supportsR32FloatTexture(&device) ? 0.0F : 1.0F; - Vec4 vec4ShadowInfo{}; - if (shadowInfo.isEnabled()) { - if (shadowInfo.getType() == scene::ShadowType::SHADOW_MAP) { - if (mainLight.isShadowEnabled()) { - if (mainLight.isShadowFixedArea() || - mainLight.getCSMLevel() == scene::CSMLevel::LEVEL_1 || !csmSupported) { - // Shadow - const auto &matShadowView = csmLayers.getSpecialLayer()->getMatShadowView(); - const auto &matShadowProj = csmLayers.getSpecialLayer()->getMatShadowProj(); - const auto &matShadowViewProj = csmLayers.getSpecialLayer()->getMatShadowViewProj(); - const auto &near = mainLight.getShadowNear(); - const auto &far = mainLight.getShadowFar(); - - setMat4Impl(data, layoutGraph, "cc_matLightView", matShadowView); - setVec4Impl(data, layoutGraph, "cc_shadowProjDepthInfo", - Vec4(matShadowProj.m[10], matShadowProj.m[14], - matShadowProj.m[11], matShadowProj.m[15])); - - setVec4Impl(data, layoutGraph, "cc_shadowProjInfo", - Vec4(matShadowProj.m[00], matShadowProj.m[05], - 1.0F / matShadowProj.m[00], 1.0F / matShadowProj.m[05])); - setMat4Impl(data, layoutGraph, "cc_matLightViewProj", matShadowViewProj); - vec4ShadowInfo.set(near, far, 0, 1.0F - mainLight.getShadowSaturation()); - setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); - vec4ShadowInfo.set(static_cast(scene::LightType::DIRECTIONAL), packing, mainLight.getShadowNormalBias(), 0); - setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); - } else { - { // CSM - const auto layerThreshold = getPCFRadius(shadowInfo, mainLight); - const auto numCascades = static_cast(mainLight.getCSMLevel()); - setVec4ArraySizeImpl(data, layoutGraph, "cc_csmViewDir0", numCascades); - setVec4ArraySizeImpl(data, layoutGraph, "cc_csmViewDir1", numCascades); - setVec4ArraySizeImpl(data, layoutGraph, "cc_csmViewDir2", numCascades); - setVec4ArraySizeImpl(data, layoutGraph, "cc_csmAtlas", numCascades); - setMat4ArraySizeImpl(data, layoutGraph, "cc_matCSMViewProj", numCascades); - setVec4ArraySizeImpl(data, layoutGraph, "cc_csmProjDepthInfo", numCascades); - setVec4ArraySizeImpl(data, layoutGraph, "cc_csmProjInfo", numCascades); - - Vec4 csmSplitsInfo{}; - for (uint32_t i = 0; i < numCascades; ++i) { - const auto &layer = *csmLayers.getLayers()[i]; - - const auto &matShadowView = layer.getMatShadowView(); - vec4ShadowInfo.set(matShadowView.m[0], matShadowView.m[4], matShadowView.m[8], layerThreshold); - setVec4ArrayElemImpl(data, layoutGraph, "cc_csmViewDir0", vec4ShadowInfo, i); - vec4ShadowInfo.set(matShadowView.m[1], matShadowView.m[5], matShadowView.m[9], layer.getSplitCameraNear()); - setVec4ArrayElemImpl(data, layoutGraph, "cc_csmViewDir1", vec4ShadowInfo, i); - vec4ShadowInfo.set(matShadowView.m[2], matShadowView.m[6], matShadowView.m[10], layer.getSplitCameraFar()); - setVec4ArrayElemImpl(data, layoutGraph, "cc_csmViewDir2", vec4ShadowInfo, i); - - const auto &csmAtlas = layer.getCSMAtlas(); - setVec4ArrayElemImpl(data, layoutGraph, "cc_csmAtlas", csmAtlas, i); - - const auto &matShadowViewProj = layer.getMatShadowViewProj(); - setMat4ArrayElemImpl(data, layoutGraph, "cc_matCSMViewProj", matShadowViewProj, i); - - const auto &matShadowProj = layer.getMatShadowProj(); - setVec4ArrayElemImpl(data, layoutGraph, - "cc_csmProjDepthInfo", - Vec4(matShadowProj.m[10], matShadowProj.m[14], - matShadowProj.m[11], matShadowProj.m[15]), - i); - - setVec4ArrayElemImpl(data, layoutGraph, - "cc_csmProjInfo", - Vec4(matShadowProj.m[00], matShadowProj.m[05], - 1.0F / matShadowProj.m[00], 1.0F / matShadowProj.m[05]), - i); - - (&csmSplitsInfo.x)[i] = layer.getSplitCameraFar() / mainLight.getShadowDistance(); - } - setVec4Impl(data, layoutGraph, "cc_csmSplitsInfo", csmSplitsInfo); - } - { // Shadow - vec4ShadowInfo.set(0, 0, 0, 1.0F - mainLight.getShadowSaturation()); - setVec4Impl(data, layoutGraph, "cc_shadowNFLSInfo", vec4ShadowInfo); - vec4ShadowInfo.set( - static_cast(scene::LightType::DIRECTIONAL), - packing, - mainLight.getShadowNormalBias(), - static_cast(mainLight.getCSMLevel())); - setVec4Impl(data, layoutGraph, "cc_shadowLPNNInfo", vec4ShadowInfo); - } - } - { // Shadow - vec4ShadowInfo.set( - shadowInfo.getSize().x, shadowInfo.getSize().y, - static_cast(mainLight.getShadowPcf()), mainLight.getShadowBias()); - setVec4Impl(data, layoutGraph, "cc_shadowWHPBInfo", vec4ShadowInfo); - } - } - } else { - Vec3 tempVec3 = shadowInfo.getNormal().getNormalized(); - setVec4Impl(data, layoutGraph, - "cc_planarNDInfo", - Vec4(tempVec3.x, tempVec3.y, tempVec3.z, -shadowInfo.getDistance())); - } - { - const auto &color = shadowInfo.getShadowColor4f(); - setColorImpl(data, layoutGraph, "cc_shadowColor", - gfx::Color{color[0], color[1], color[2], color[3]}); - } - } -} - -void setTextureUBOView( - gfx::Device &device, - const LayoutGraphData &layoutGraph, - const pipeline::PipelineSceneData &sceneData, - RenderData &data) { - const auto &skybox = *sceneData.getSkybox(); - if (skybox.getReflectionMap()) { - auto &texture = *skybox.getReflectionMap()->getGFXTexture(); - auto *sampler = device.getSampler(skybox.getReflectionMap()->getSamplerInfo()); - setTextureImpl(data, layoutGraph, "cc_environment", &texture); - setSamplerImpl(data, layoutGraph, "cc_environment", sampler); - } else { - const auto *envmap = - skybox.getEnvmap() - ? skybox.getEnvmap() - : BuiltinResMgr::getInstance()->get("default-cube-texture"); - if (envmap) { - auto *texture = envmap->getGFXTexture(); - auto *sampler = device.getSampler(envmap->getSamplerInfo()); - setTextureImpl(data, layoutGraph, "cc_environment", texture); - setSamplerImpl(data, layoutGraph, "cc_environment", sampler); - } - } - const auto *diffuseMap = - skybox.getDiffuseMap() - ? skybox.getDiffuseMap() - : BuiltinResMgr::getInstance()->get("default-cube-texture"); - if (diffuseMap) { - auto *texture = diffuseMap->getGFXTexture(); - auto *sampler = device.getSampler(diffuseMap->getSamplerInfo()); - setTextureImpl(data, layoutGraph, "cc_diffuseMap", texture); - setSamplerImpl(data, layoutGraph, "cc_diffuseMap", sampler); - } - gfx::SamplerInfo samplerPointInfo{ - gfx::Filter::POINT, - gfx::Filter::POINT, - gfx::Filter::NONE, - gfx::Address::CLAMP, - gfx::Address::CLAMP, - gfx::Address::CLAMP}; - auto *pointSampler = device.getSampler(samplerPointInfo); - setSamplerImpl(data, layoutGraph, "cc_shadowMap", pointSampler); - // setTextureImpl(data, layoutGraph, "cc_shadowMap", BuiltinResMgr::getInstance()->get("default-texture")->getGFXTexture()); - setSamplerImpl(data, layoutGraph, "cc_spotShadowMap", pointSampler); - // setTextureImpl(data, layoutGraph, "cc_spotShadowMap", BuiltinResMgr::getInstance()->get("default-texture")->getGFXTexture()); -} - -} // namespace - void NativeRenderQueueBuilder::addSceneOfCamera( scene::Camera *camera, LightInfo light, SceneFlags sceneFlags) { const auto *pLight = light.light.get(); SceneData scene(camera->getScene(), camera, sceneFlags, light); - auto sceneID = addVertex( + auto sceneID = addVertex2( SceneTag{}, std::forward_as_tuple("Camera"), std::forward_as_tuple(), @@ -1376,67 +713,103 @@ void NativeRenderQueueBuilder::addSceneOfCamera( *pDirLight, data); } } - setTextureUBOView( + setLegacyTextureUBOView( *pipelineRuntime->getDevice(), *layoutGraph, *pipelineRuntime->getPipelineSceneData(), data); } -// void NativeRenderQueueBuilder::addScene(const scene::Camera *camera, SceneFlags sceneFlags) { -// SceneData data(camera->getScene(), camera, sceneFlags, LightInfo{}); - -// auto sceneID = addVertex( -// SceneTag{}, -// std::forward_as_tuple("Scene"), -// std::forward_as_tuple(), -// std::forward_as_tuple(), -// std::forward_as_tuple(), -// std::forward_as_tuple(std::move(data)), -// *renderGraph, nodeID); -// CC_ENSURES(sceneID != RenderGraph::null_vertex()); -// } - -// void NativeRenderQueueBuilder::addSceneCulledByDirectionalLight( -// const scene::Camera *camera, SceneFlags sceneFlags, -// scene::DirectionalLight *light, uint32_t level) { -// CC_EXPECTS(light); -// CC_EXPECTS(light->getType() != scene::LightType::UNKNOWN); -// SceneData data(camera->getScene(), camera, sceneFlags, LightInfo{light, level}); - -// auto sceneID = addVertex( -// SceneTag{}, -// std::forward_as_tuple("Scene"), -// std::forward_as_tuple(), -// std::forward_as_tuple(), -// std::forward_as_tuple(), -// std::forward_as_tuple(std::move(data)), -// *renderGraph, nodeID); -// CC_ENSURES(sceneID != RenderGraph::null_vertex()); -// } - -// void NativeRenderQueueBuilder::addSceneCulledBySpotLight( -// const scene::Camera *camera, SceneFlags sceneFlags, -// scene::SpotLight *light) { -// CC_EXPECTS(light); -// CC_EXPECTS(light->getType() != scene::LightType::UNKNOWN); -// SceneData data(camera->getScene(), camera, sceneFlags, LightInfo{light, 0}); - -// auto sceneID = addVertex( -// SceneTag{}, -// std::forward_as_tuple("Scene"), -// std::forward_as_tuple(), -// std::forward_as_tuple(), -// std::forward_as_tuple(), -// std::forward_as_tuple(std::move(data)), -// *renderGraph, nodeID); -// CC_ENSURES(sceneID != RenderGraph::null_vertex()); -// } +void NativeRenderQueueBuilder::addScene(const scene::Camera *camera, SceneFlags sceneFlags) { + SceneData data(camera->getScene(), camera, sceneFlags, LightInfo{}); + + auto sceneID = addVertex2( + SceneTag{}, + std::forward_as_tuple("Scene"), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(data)), + *renderGraph, nodeID); + CC_ENSURES(sceneID != RenderGraph::null_vertex()); + + if (any(sceneFlags & SceneFlags::GPU_DRIVEN)) { + const auto passID = renderGraph->getPassID(nodeID); + const auto cullingID = dynamic_cast(pipelineRuntime)->nativeContext.sceneCulling.gpuCullingPassID; + CC_EXPECTS(cullingID != 0xFFFFFFFF); + if (holds(passID, *renderGraph)) { + ccstd::pmr::string drawIndirectBuffer("CCDrawIndirectBuffer"); + drawIndirectBuffer.append(std::to_string(cullingID)); + ccstd::pmr::string drawInstanceBuffer("CCDrawInstanceBuffer"); + drawInstanceBuffer.append(std::to_string(cullingID)); + + auto& rasterPass = get(RasterPassTag{}, passID, *renderGraph); + if (rasterPass.computeViews.find(drawIndirectBuffer) != rasterPass.computeViews.end()) { + auto res = rasterPass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(drawIndirectBuffer), + std::forward_as_tuple()); + CC_ENSURES(res.second); + auto& view = res.first->second.emplace_back(); + view.name = "CCDrawIndirectBuffer"; + view.accessType = AccessType::READ; + view.shaderStageFlags = gfx::ShaderStageFlagBit::VERTEX | gfx::ShaderStageFlagBit::FRAGMENT; + } + if (rasterPass.computeViews.find(drawInstanceBuffer) != rasterPass.computeViews.end()) { + auto res = rasterPass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(drawInstanceBuffer), + std::forward_as_tuple()); + CC_ENSURES(res.second); + auto& view = res.first->second.emplace_back(); + view.name = "CCDrawInstanceBuffer"; + view.accessType = AccessType::READ; + view.shaderStageFlags = gfx::ShaderStageFlagBit::VERTEX | gfx::ShaderStageFlagBit::FRAGMENT; + } + } + } +} + +void NativeRenderQueueBuilder::addSceneCulledByDirectionalLight( + const scene::Camera *camera, SceneFlags sceneFlags, + scene::DirectionalLight *light, uint32_t level) { + CC_EXPECTS(light); + CC_EXPECTS(light->getType() != scene::LightType::UNKNOWN); + SceneData data(camera->getScene(), camera, sceneFlags, LightInfo{light, level}); + + auto sceneID = addVertex2( + SceneTag{}, + std::forward_as_tuple("Scene"), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(data)), + *renderGraph, nodeID); + CC_ENSURES(sceneID != RenderGraph::null_vertex()); +} + +void NativeRenderQueueBuilder::addSceneCulledBySpotLight( + const scene::Camera *camera, SceneFlags sceneFlags, + scene::SpotLight *light) { + CC_EXPECTS(light); + CC_EXPECTS(light->getType() != scene::LightType::UNKNOWN); + SceneData data(camera->getScene(), camera, sceneFlags, LightInfo{light, 0}); + + auto sceneID = addVertex2( + SceneTag{}, + std::forward_as_tuple("Scene"), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(data)), + *renderGraph, nodeID); + CC_ENSURES(sceneID != RenderGraph::null_vertex()); +} void NativeRenderQueueBuilder::addFullscreenQuad( Material *material, uint32_t passID, SceneFlags sceneFlags) { std::string_view name = "FullscreenQuad"; - auto drawID = addVertex( + auto drawID = addVertex2( BlitTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -1451,7 +824,7 @@ void NativeRenderQueueBuilder::addCameraQuad( scene::Camera *camera, cc::Material *material, uint32_t passID, SceneFlags sceneFlags) { std::string_view name = "CameraQuad"; - auto drawID = addVertex( + auto drawID = addVertex2( BlitTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -1479,7 +852,7 @@ void NativeRenderQueueBuilder::addCameraQuad( *pDirLight, data); } } - setTextureUBOView( + setLegacyTextureUBOView( *pipelineRuntime->getDevice(), *layoutGraph, *pipelineRuntime->getPipelineSceneData(), @@ -1490,7 +863,7 @@ void NativeRenderQueueBuilder::clearRenderTarget(const ccstd::string &name, cons ccstd::pmr::vector clears(renderGraph->get_allocator()); clears.emplace_back(name.c_str(), gfx::ClearFlagBit::COLOR, color); - auto clearID = addVertex( + auto clearID = addVertex2( ClearTag{}, std::forward_as_tuple("ClearRenderTarget"), std::forward_as_tuple(), @@ -1508,7 +881,7 @@ void NativeRenderQueueBuilder::setViewport(const gfx::Viewport &viewport) { void NativeRenderQueueBuilder::addCustomCommand(std::string_view customBehavior) { std::string_view name = "FullscreenQuad"; - auto drawID = addVertex( + auto drawID = addVertex2( BlitTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -1533,7 +906,7 @@ RenderQueueBuilder *NativeRenderPassBuilder::addQueue( const auto phaseLayoutID = locate(layoutID, phaseName, *layoutGraph); CC_ENSURES(phaseLayoutID != LayoutGraphData::null_vertex()); - auto queueID = addVertex( + auto queueID = addVertex2( QueueTag{}, std::forward_as_tuple(phaseName), std::forward_as_tuple(phaseName), @@ -1554,40 +927,10 @@ SubpassBuilder *addRenderSubpassImpl( const LayoutGraphData &layoutGraph, LayoutGraphData::vertex_descriptor passLayoutID, const ccstd::string &subpassName, uint32_t count, uint32_t quality) { // NOLINT(bugprone-easily-swappable-parameters) - CC_EXPECTS(!subpassName.empty()); auto &pass = get(RasterPassTag{}, passID, renderGraph); - auto &subpassGraph = pass.subpassGraph; - const auto subpassIndex = num_vertices(pass.subpassGraph); - { - auto id = addVertex( - std::piecewise_construct, - std::forward_as_tuple(subpassName), - std::forward_as_tuple(), - subpassGraph); - CC_ENSURES(id == subpassIndex); - } - RasterSubpass subpass(subpassIndex, count, quality, renderGraph.get_allocator()); - subpass.viewport.width = pass.width; - subpass.viewport.height = pass.height; - - auto subpassID = addVertex( - RasterSubpassTag{}, - std::forward_as_tuple(subpassName), - std::forward_as_tuple(subpassName), - std::forward_as_tuple(), - std::forward_as_tuple(), - std::forward_as_tuple(std::move(subpass)), - renderGraph, passID); - - auto subpassLayoutID = LayoutGraphData::null_vertex(); - if constexpr (ENABLE_SUBPASS) { - subpassLayoutID = locate(passLayoutID, subpassName, layoutGraph); - } else { - subpassLayoutID = locate(LayoutGraphData::null_vertex(), subpassName, layoutGraph); - } - - CC_EXPECTS(subpassLayoutID != LayoutGraphData::null_vertex()); + auto [subpassID, subpassLayoutID] = addRenderSubpassVertex( + pass, renderGraph, passID, layoutGraph, passLayoutID, subpassName, count, quality); auto *builder = ccnew SubpassBuilder( pipelineRuntime, &renderGraph, subpassID, &layoutGraph, subpassLayoutID); @@ -1625,7 +968,7 @@ ComputeSubpassBuilder *NativeRenderPassBuilder::addComputeSubpass(const ccstd::s ComputeSubpass subpass(subpassIndex, renderGraph->get_allocator()); - auto subpassID = addVertex( + auto subpassID = addVertex2( ComputeSubpassTag{}, std::forward_as_tuple(subpassName), std::forward_as_tuple(subpassName), @@ -1658,12 +1001,187 @@ void NativeRenderPassBuilder::setVersion(const ccstd::string &name, uint64_t ver // noop } +void NativeMultisampleRenderPassBuilder::addRenderTarget( + const ccstd::string &name, gfx::LoadOp loadOp, gfx::StoreOp storeOp, const gfx::Color &color) { + addRasterViewImpl( + name, + "", + "", + AccessType::WRITE, + AttachmentType::RENDER_TARGET, + loadOp, + storeOp, + gfx::ClearFlagBit::COLOR, + color, + subpassID, + *renderGraph); +} + +void NativeMultisampleRenderPassBuilder::addDepthStencil( + const ccstd::string &name, gfx::LoadOp loadOp, gfx::StoreOp storeOp, + float depth, uint8_t stencil, gfx::ClearFlagBit clearFlags) { // NOLINT(bugprone-easily-swappable-parameters) + addRasterViewImpl( + name, + "", + "", + AccessType::WRITE, + AttachmentType::DEPTH_STENCIL, + loadOp, + storeOp, + clearFlags, + gfx::Color{depth, static_cast(stencil)}, + subpassID, + *renderGraph); +} + +void NativeMultisampleRenderPassBuilder::addTexture( + const ccstd::string &name, const ccstd::string &slotName, // NOLINT(bugprone-easily-swappable-parameters) + gfx::Sampler *sampler, uint32_t plane) { + addSubpassComputeViewImpl( + RasterSubpassTag{}, + *renderGraph, + subpassID, + name, + ComputeView{ + ccstd::pmr::string(slotName, renderGraph->get_allocator()), + AccessType::READ, + plane, + gfx::ClearFlagBit::NONE, + ClearValueType::NONE, + ClearValue{}, + gfx::ShaderStageFlagBit::NONE, + renderGraph->get_allocator()}); + if (sampler) { + auto iter = layoutGraph->attributeIndex.find(std::string_view{slotName}); + if (iter != layoutGraph->attributeIndex.end()) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, subpassID); + data.samplers[iter->second.value] = sampler; + } + } +} + +void NativeMultisampleRenderPassBuilder::addStorageBuffer( + const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { + addSubpassComputeViewImpl( + RasterSubpassTag{}, + *renderGraph, + subpassID, + name, + ComputeView{ + ccstd::pmr::string(slotName, renderGraph->get_allocator()), + accessType, + gfx::ClearFlagBit::NONE, + ClearValueType::NONE, + ClearValue{}, + gfx::ShaderStageFlagBit::NONE, + renderGraph->get_allocator()}); +} + +void NativeMultisampleRenderPassBuilder::addStorageImage( + const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { + addSubpassComputeViewImpl( + RasterSubpassTag{}, + *renderGraph, + subpassID, + name, + ComputeView{ + ccstd::pmr::string(slotName, renderGraph->get_allocator()), + accessType, + gfx::ClearFlagBit::NONE, + ClearValueType::NONE, + ClearValue{}, + gfx::ShaderStageFlagBit::NONE, + renderGraph->get_allocator()}); +} + +RenderQueueBuilder *NativeMultisampleRenderPassBuilder::addQueue( + QueueHint hint, const ccstd::string &phaseName) { + CC_EXPECTS(!phaseName.empty()); + CC_EXPECTS(subpassLayoutID == layoutID); + CC_EXPECTS(subpassLayoutID != LayoutGraphData::null_vertex()); + + const auto phaseLayoutID = locate(subpassLayoutID, phaseName, *layoutGraph); + CC_ENSURES(phaseLayoutID != LayoutGraphData::null_vertex()); + + auto queueID = addVertex2( + QueueTag{}, + std::forward_as_tuple(phaseName), + std::forward_as_tuple(phaseName), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(hint, phaseLayoutID), + *renderGraph, subpassID); + + return new NativeRenderQueueBuilder(pipelineRuntime, renderGraph, queueID, layoutGraph, phaseLayoutID); +} + +void NativeMultisampleRenderPassBuilder::setViewport(const gfx::Viewport &viewport) { + auto &subpass = get(RasterSubpassTag{}, subpassID, *renderGraph); + subpass.viewport = viewport; +} + +void NativeMultisampleRenderPassBuilder::setVersion(const ccstd::string &name, uint64_t version) { + // noop +} + +bool NativeMultisampleRenderPassBuilder::getShowStatistics() const { + const auto &subpass = get(RasterSubpassTag{}, subpassID, *renderGraph); + return subpass.showStatistics; +} + +void NativeMultisampleRenderPassBuilder::setShowStatistics(bool enable) { + auto &subpass = get(RasterSubpassTag{}, subpassID, *renderGraph); + subpass.showStatistics = enable; +} + +void NativeMultisampleRenderPassBuilder::resolveRenderTarget( + const ccstd::string &source, const ccstd::string &target) { // NOLINT(bugprone-easily-swappable-parameters) + auto &subpass = get(RasterSubpassTag{}, subpassID, *renderGraph); + + auto &pass = get(RasterPassTag{}, nodeID, *renderGraph); + auto &subpassData = get(SubpassGraph::SubpassTag{}, pass.subpassGraph, subpass.subpassID); + + subpass.resolvePairs.emplace_back( + ccstd::pmr::string(source.data(), renderGraph->get_allocator()), + ccstd::pmr::string(target.data(), renderGraph->get_allocator()), + ResolveFlags::COLOR, + gfx::ResolveMode::AVERAGE, + gfx::ResolveMode::NONE); + + subpassData.resolvePairs.emplace_back(subpass.resolvePairs.back()); +} + +void NativeMultisampleRenderPassBuilder::resolveDepthStencil( + const ccstd::string &source, const ccstd::string &target, // NOLINT(bugprone-easily-swappable-parameters) + gfx::ResolveMode depthMode, gfx::ResolveMode stencilMode) { // NOLINT(bugprone-easily-swappable-parameters) + auto &subpass = get(RasterSubpassTag{}, subpassID, *renderGraph); + ResolveFlags flags = ResolveFlags::NONE; + if (depthMode != gfx::ResolveMode::NONE) { + flags |= ResolveFlags::DEPTH; + } + if (stencilMode != gfx::ResolveMode::NONE) { + flags |= ResolveFlags::STENCIL; + } + + auto &pass = get(RasterPassTag{}, nodeID, *renderGraph); + auto &subpassData = get(SubpassGraph::SubpassTag{}, pass.subpassGraph, subpass.subpassID); + + subpass.resolvePairs.emplace_back( + ccstd::pmr::string(source.data(), renderGraph->get_allocator()), + ccstd::pmr::string(target.data(), renderGraph->get_allocator()), + flags, + depthMode, + stencilMode); + + subpassData.resolvePairs.emplace_back(subpass.resolvePairs.back()); +} + // NativeComputeQueue void NativeComputeQueueBuilder::addDispatch( uint32_t threadGroupCountX, uint32_t threadGroupCountY, uint32_t threadGroupCountZ, Material *material, uint32_t passID) { std::string_view name("Dispatch"); - addVertex( + addVertex2( DispatchTag{}, std::forward_as_tuple(name), std::forward_as_tuple(), @@ -1682,8 +1200,10 @@ void NativeComputeQueueBuilder::addDispatch( void NativeComputePassBuilder::addTexture( const ccstd::string &name, const ccstd::string &slotName, gfx::Sampler *sampler, uint32_t plane) { - addComputeView( - *this, + addPassComputeViewImpl( + ComputeTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -1705,8 +1225,10 @@ void NativeComputePassBuilder::addTexture( void NativeComputePassBuilder::addStorageBuffer( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addPassComputeViewImpl( + ComputeTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -1720,8 +1242,10 @@ void NativeComputePassBuilder::addStorageBuffer( void NativeComputePassBuilder::addStorageImage( const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) { - addComputeView( - *this, + addPassComputeViewImpl( + ComputeTag{}, + *renderGraph, + nodeID, name, ComputeView{ ccstd::pmr::string(slotName, renderGraph->get_allocator()), @@ -1759,7 +1283,7 @@ ComputeQueueBuilder *NativeComputePassBuilder::addQueue(const ccstd::string &pha const auto phaseLayoutID = locate(layoutID, phaseName, *layoutGraph); CC_ENSURES(phaseLayoutID != LayoutGraphData::null_vertex()); - auto queueID = addVertex( + auto queueID = addVertex2( QueueTag{}, std::forward_as_tuple(phaseName), std::forward_as_tuple(phaseName), @@ -1771,318 +1295,6 @@ ComputeQueueBuilder *NativeComputePassBuilder::addQueue(const ccstd::string &pha return new NativeComputeQueueBuilder(pipelineRuntime, renderGraph, queueID, layoutGraph, phaseLayoutID); } -namespace { - -const char *getName(const gfx::LoadOp &op) { - switch (op) { - case gfx::LoadOp::LOAD: - return "LOAD"; - case gfx::LoadOp::CLEAR: - return "CLEAR"; - case gfx::LoadOp::DISCARD: - return "DISCARD"; - default: - return "UNKNOWN"; - } - return "UNKNOWN"; -} - -const char *getName(const gfx::StoreOp &op) { - switch (op) { - case gfx::StoreOp::STORE: - return "STORE"; - case gfx::StoreOp::DISCARD: - return "DISCARD"; - default: - return "UNKNOWN"; - } - return "UNKNOWN"; -} - -std::string getName(const gfx::ClearFlagBit &flags) { - std::ostringstream oss; - int count = 0; - if (hasAnyFlags(flags, gfx::ClearFlagBit::COLOR)) { - if (count++) { - oss << "|"; - } - oss << "COLOR"; - } - if (hasAnyFlags(flags, gfx::ClearFlagBit::DEPTH)) { - if (count++) { - oss << "|"; - } - oss << "DEPTH"; - } - if (hasAnyFlags(flags, gfx::ClearFlagBit::STENCIL)) { - if (count++) { - oss << "|"; - } - oss << "STENCIL"; - } - if (flags == gfx::ClearFlagBit::NONE) { - oss << "NONE"; - } - return oss.str(); -} - -struct RenderGraphPrintVisitor : boost::dfs_visitor<> { - void discover_vertex( - RenderGraph::vertex_descriptor vertID, - const AddressableView &gv) const { - const auto &g = gv.mGraph; - const auto &name = get(RenderGraph::NameTag{}, g, vertID); - visitObject( - vertID, gv.mGraph, - [&](const RasterPass &pass) { - OSS << "RasterPass \"" << name << "\" {\n"; - indent(space); - for (const auto &[name, rasterView] : pass.rasterViews) { - OSS << "RasterView \"" << name << "\" {\n"; - { - INDENT(); - OSS << "slotName: \"" << rasterView.slotName << "\";\n"; - OSS << "accessType: " << getName(rasterView.accessType) << ";\n"; - OSS << "attachmentType: " << getName(rasterView.attachmentType) << ";\n"; - OSS << "loadOp: " << getName(rasterView.loadOp) << ";\n"; - OSS << "storeOp: " << getName(rasterView.storeOp) << ";\n"; - OSS << "clearFlags: " << getName(rasterView.clearFlags) << ";\n"; - const auto &c = rasterView.clearColor; - if (hasAnyFlags(rasterView.clearFlags, gfx::ClearFlagBit::COLOR)) { - OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; - } else if (hasAnyFlags(rasterView.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { - OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; - } - } - OSS << "}\n"; - } - for (const auto &[name, computeViews] : pass.computeViews) { - OSS << "ComputeViews \"" << name << "\" {\n"; - { - INDENT(); - for (const auto &computeView : computeViews) { - OSS << "ComputeView \"" << computeView.name << "\" {\n"; - { - INDENT(); - OSS << "accessType: " << getName(computeView.accessType) << ";\n"; - OSS << "clearFlags: " << getName(computeView.clearFlags) << ";\n"; - const auto &c = computeView.clearValue; - if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::COLOR)) { - OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; - } else if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { - OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; - } - } - OSS << "}\n"; - } - } - OSS << "}\n"; - } - }, - [&](const RasterSubpass &subpass) { - std::ignore = subpass; - }, - [&](const ComputeSubpass &subpass) { - std::ignore = subpass; - }, - [&](const ComputePass &pass) { - OSS << "ComputePass \"" << name << "\" {\n"; - indent(space); - for (const auto &[name, computeViews] : pass.computeViews) { - OSS << "ComputeViews \"" << name << "\" {\n"; - { - INDENT(); - for (const auto &computeView : computeViews) { - OSS << "ComputeView \"" << computeView.name << "\" {\n"; - { - INDENT(); - OSS << "accessType: " << getName(computeView.accessType) << ";\n"; - OSS << "clearFlags: " << getName(computeView.clearFlags) << ";\n"; - const auto &c = computeView.clearValue; - if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::COLOR)) { - OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; - } else if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { - OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; - } - } - OSS << "}\n"; - } - } - OSS << "}\n"; - } - }, - [&](const ResolvePass &pass) { - OSS << "ResolvePass \"" << name << "\" {\n"; - for (const auto &pair : pass.resolvePairs) { - INDENT(); - OSS << "source: \"" << pair.source << "\", target: \"" << pair.target << "\"\n"; - } - indent(space); - }, - [&](const CopyPass &pass) { - OSS << "CopyPass \"" << name << "\" {\n"; - for (const auto &pair : pass.copyPairs) { - INDENT(); - OSS << "source: \"" << pair.source << "\", target: \"" << pair.target << "\"\n"; - } - indent(space); - }, - [&](const MovePass &pass) { - OSS << "MovePass \"" << name << "\" {\n"; - for (const auto &pair : pass.movePairs) { - INDENT(); - OSS << "source: \"" << pair.source << "\", target: \"" << pair.target << "\"\n"; - } - indent(space); - }, - [&](const RaytracePass &pass) { - std::ignore = pass; - OSS << "RaytracePass \"" << name << "\" {\n"; - indent(space); - }, - [&](const RenderQueue &queue) { - OSS << "Queue \"" << name << "\" {\n"; - { - INDENT(); - OSS << "hint: " << getName(queue.hint) << ";\n"; - } - indent(space); - }, - [&](const SceneData &scene) { - std::ignore = scene; - OSS << "Scene \"" << name << "\" {\n"; - indent(space); - }, - [&](const Blit &blit) { - std::ignore = blit; - OSS << "Blit \"" << name << "\";\n"; - }, - [&](const Dispatch &dispatch) { - OSS << "Dispatch \"" << name << "\", [" - << dispatch.threadGroupCountX << ", " - << dispatch.threadGroupCountY << ", " - << dispatch.threadGroupCountZ << "];\n"; - }, - [&](const ccstd::pmr::vector &clearViews) { - OSS << "Clear \"" << name << "\" {\n"; - indent(space); - for (const auto &view : clearViews) { - INDENT(); - OSS << "\"" << view.slotName << "\" {\n"; - { - INDENT(); - OSS << "clearFlags: " << getName(view.clearFlags) << ";\n"; - const auto &c = view.clearColor; - if (hasAnyFlags(view.clearFlags, gfx::ClearFlagBit::COLOR)) { - OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; - } else if (hasAnyFlags(view.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { - OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; - } - } - OSS << "}\n"; - } - }, - [&](const gfx::Viewport &vp) { - OSS << "Viewport \"" << name << "\" [" - << "left: " << vp.left << ", " - << "top: " << vp.top << ", " - << "width: " << vp.width << ", " - << "height: " << vp.height << ", " - << "minDepth: " << vp.minDepth << ", " - << "maxDepth: " << vp.maxDepth << "]\n"; - }); - } - - void finish_vertex( - RenderGraph::vertex_descriptor vertID, - const AddressableView &gv) const { - std::ignore = gv; - visitObject( - vertID, gv.mGraph, - [&](const RasterPass &pass) { - std::ignore = pass; - unindent(space); - OSS << "}\n"; - }, - [&](const RasterSubpass &subpass) { - std::ignore = subpass; - }, - [&](const ComputeSubpass &subpass) { - std::ignore = subpass; - }, - [&](const ComputePass &pass) { - std::ignore = pass; - unindent(space); - OSS << "}\n"; - }, - [&](const ResolvePass &pass) { - std::ignore = pass; - unindent(space); - OSS << "}\n"; - }, - [&](const CopyPass &pass) { - std::ignore = pass; - unindent(space); - OSS << "}\n"; - }, - [&](const MovePass &pass) { - std::ignore = pass; - unindent(space); - OSS << "}\n"; - }, - [&](const RaytracePass &pass) { - std::ignore = pass; - unindent(space); - OSS << "}\n"; - }, - [&](const RenderQueue &queue) { - std::ignore = queue; - unindent(space); - OSS << "}\n"; - }, - [&](const SceneData &scene) { - std::ignore = scene; - unindent(space); - OSS << "}\n"; - }, - [&](const Blit &blit) { - }, - [&](const Dispatch &dispatch) { - }, - [&](const ccstd::pmr::vector &clear) { - std::ignore = clear; - unindent(space); - OSS << "}\n"; - }, - [&](const gfx::Viewport &clear) { - }); - } - - std::ostringstream &oss; - ccstd::pmr::string &space; -}; - -} // namespace - -ccstd::string RenderGraph::print( - boost::container::pmr::memory_resource *scratch) const { - const auto &rg = *this; - std::ostringstream oss; - ccstd::pmr::string space(scratch); - oss << "\n"; - OSS << "RenderGraph {\n"; - { - INDENT(); - RenderGraphPrintVisitor visitor{ - {}, oss, space}; - AddressableView graphView(rg); - auto colors = rg.colors(scratch); - boost::depth_first_search(graphView, visitor, get(colors, rg)); - } - OSS << "}\n"; - return oss.str(); -} - } // namespace render } // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.cpp b/native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.cpp new file mode 100644 index 00000000000..dce7e2773fa --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.cpp @@ -0,0 +1,327 @@ +#include +#include +#include "cocos/renderer/pipeline/custom/RenderCommonNames.h" +#include "cocos/renderer/pipeline/custom/RenderGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/details/DebugUtils.h" +#include "cocos/renderer/pipeline/custom/details/GraphTypes.h" +#include "cocos/renderer/pipeline/custom/details/GraphView.h" + +namespace cc { + +namespace render { + +namespace { + +const char *getName(const gfx::LoadOp &op) { + switch (op) { + case gfx::LoadOp::LOAD: + return "LOAD"; + case gfx::LoadOp::CLEAR: + return "CLEAR"; + case gfx::LoadOp::DISCARD: + return "DISCARD"; + default: + return "UNKNOWN"; + } + return "UNKNOWN"; +} + +const char *getName(const gfx::StoreOp &op) { + switch (op) { + case gfx::StoreOp::STORE: + return "STORE"; + case gfx::StoreOp::DISCARD: + return "DISCARD"; + default: + return "UNKNOWN"; + } + return "UNKNOWN"; +} + +std::string getName(const gfx::ClearFlagBit &flags) { + std::ostringstream oss; + int count = 0; + if (hasAnyFlags(flags, gfx::ClearFlagBit::COLOR)) { + if (count++) { + oss << "|"; + } + oss << "COLOR"; + } + if (hasAnyFlags(flags, gfx::ClearFlagBit::DEPTH)) { + if (count++) { + oss << "|"; + } + oss << "DEPTH"; + } + if (hasAnyFlags(flags, gfx::ClearFlagBit::STENCIL)) { + if (count++) { + oss << "|"; + } + oss << "STENCIL"; + } + if (flags == gfx::ClearFlagBit::NONE) { + oss << "NONE"; + } + return oss.str(); +} + +struct RenderGraphPrintVisitor : boost::dfs_visitor<> { + void discover_vertex( + RenderGraph::vertex_descriptor vertID, + const AddressableView &gv) const { + const auto &g = gv.mGraph; + const auto &name = get(RenderGraph::NameTag{}, g, vertID); + visitObject( + vertID, gv.mGraph, + [&](const RasterPass &pass) { + OSS << "RasterPass \"" << name << "\" {\n"; + indent(space); + for (const auto &[name, rasterView] : pass.rasterViews) { + OSS << "RasterView \"" << name << "\" {\n"; + { + INDENT(); + OSS << "slotName: \"" << rasterView.slotName << "\";\n"; + OSS << "accessType: " << getName(rasterView.accessType) << ";\n"; + OSS << "attachmentType: " << getName(rasterView.attachmentType) << ";\n"; + OSS << "loadOp: " << getName(rasterView.loadOp) << ";\n"; + OSS << "storeOp: " << getName(rasterView.storeOp) << ";\n"; + OSS << "clearFlags: " << getName(rasterView.clearFlags) << ";\n"; + const auto &c = rasterView.clearColor; + if (hasAnyFlags(rasterView.clearFlags, gfx::ClearFlagBit::COLOR)) { + OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; + } else if (hasAnyFlags(rasterView.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { + OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; + } + } + OSS << "}\n"; + } + for (const auto &[name, computeViews] : pass.computeViews) { + OSS << "ComputeViews \"" << name << "\" {\n"; + { + INDENT(); + for (const auto &computeView : computeViews) { + OSS << "ComputeView \"" << computeView.name << "\" {\n"; + { + INDENT(); + OSS << "accessType: " << getName(computeView.accessType) << ";\n"; + OSS << "clearFlags: " << getName(computeView.clearFlags) << ";\n"; + const auto &c = computeView.clearValue; + if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::COLOR)) { + OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; + } else if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { + OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; + } + } + OSS << "}\n"; + } + } + OSS << "}\n"; + } + }, + [&](const RasterSubpass &subpass) { + std::ignore = subpass; + }, + [&](const ComputeSubpass &subpass) { + std::ignore = subpass; + }, + [&](const ComputePass &pass) { + OSS << "ComputePass \"" << name << "\" {\n"; + indent(space); + for (const auto &[name, computeViews] : pass.computeViews) { + OSS << "ComputeViews \"" << name << "\" {\n"; + { + INDENT(); + for (const auto &computeView : computeViews) { + OSS << "ComputeView \"" << computeView.name << "\" {\n"; + { + INDENT(); + OSS << "accessType: " << getName(computeView.accessType) << ";\n"; + OSS << "clearFlags: " << getName(computeView.clearFlags) << ";\n"; + const auto &c = computeView.clearValue; + if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::COLOR)) { + OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; + } else if (hasAnyFlags(computeView.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { + OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; + } + } + OSS << "}\n"; + } + } + OSS << "}\n"; + } + }, + [&](const ResolvePass &pass) { + OSS << "ResolvePass \"" << name << "\" {\n"; + for (const auto &pair : pass.resolvePairs) { + INDENT(); + OSS << "source: \"" << pair.source << "\", target: \"" << pair.target << "\"\n"; + } + indent(space); + }, + [&](const CopyPass &pass) { + OSS << "CopyPass \"" << name << "\" {\n"; + for (const auto &pair : pass.copyPairs) { + INDENT(); + OSS << "source: \"" << pair.source << "\", target: \"" << pair.target << "\"\n"; + } + indent(space); + }, + [&](const MovePass &pass) { + OSS << "MovePass \"" << name << "\" {\n"; + for (const auto &pair : pass.movePairs) { + INDENT(); + OSS << "source: \"" << pair.source << "\", target: \"" << pair.target << "\"\n"; + } + indent(space); + }, + [&](const RaytracePass &pass) { + std::ignore = pass; + OSS << "RaytracePass \"" << name << "\" {\n"; + indent(space); + }, + [&](const RenderQueue &queue) { + OSS << "Queue \"" << name << "\" {\n"; + { + INDENT(); + OSS << "hint: " << getName(queue.hint) << ";\n"; + } + indent(space); + }, + [&](const SceneData &scene) { + std::ignore = scene; + OSS << "Scene \"" << name << "\" {\n"; + indent(space); + }, + [&](const Blit &blit) { + std::ignore = blit; + OSS << "Blit \"" << name << "\";\n"; + }, + [&](const Dispatch &dispatch) { + OSS << "Dispatch \"" << name << "\", [" + << dispatch.threadGroupCountX << ", " + << dispatch.threadGroupCountY << ", " + << dispatch.threadGroupCountZ << "];\n"; + }, + [&](const ccstd::pmr::vector &clearViews) { + OSS << "Clear \"" << name << "\" {\n"; + indent(space); + for (const auto &view : clearViews) { + INDENT(); + OSS << "\"" << view.slotName << "\" {\n"; + { + INDENT(); + OSS << "clearFlags: " << getName(view.clearFlags) << ";\n"; + const auto &c = view.clearColor; + if (hasAnyFlags(view.clearFlags, gfx::ClearFlagBit::COLOR)) { + OSS << "clearColor: [" << c.x << ", " << c.y << ", " << c.z << ", " << c.z << "];\n"; + } else if (hasAnyFlags(view.clearFlags, gfx::ClearFlagBit::DEPTH_STENCIL)) { + OSS << "clearColor: [" << c.x << ", " << c.y << "];\n"; + } + } + OSS << "}\n"; + } + }, + [&](const gfx::Viewport &vp) { + OSS << "Viewport \"" << name << "\" [" + << "left: " << vp.left << ", " + << "top: " << vp.top << ", " + << "width: " << vp.width << ", " + << "height: " << vp.height << ", " + << "minDepth: " << vp.minDepth << ", " + << "maxDepth: " << vp.maxDepth << "]\n"; + }); + } + + void finish_vertex( + RenderGraph::vertex_descriptor vertID, + const AddressableView &gv) const { + std::ignore = gv; + visitObject( + vertID, gv.mGraph, + [&](const RasterPass &pass) { + std::ignore = pass; + unindent(space); + OSS << "}\n"; + }, + [&](const RasterSubpass &subpass) { + std::ignore = subpass; + }, + [&](const ComputeSubpass &subpass) { + std::ignore = subpass; + }, + [&](const ComputePass &pass) { + std::ignore = pass; + unindent(space); + OSS << "}\n"; + }, + [&](const ResolvePass &pass) { + std::ignore = pass; + unindent(space); + OSS << "}\n"; + }, + [&](const CopyPass &pass) { + std::ignore = pass; + unindent(space); + OSS << "}\n"; + }, + [&](const MovePass &pass) { + std::ignore = pass; + unindent(space); + OSS << "}\n"; + }, + [&](const RaytracePass &pass) { + std::ignore = pass; + unindent(space); + OSS << "}\n"; + }, + [&](const RenderQueue &queue) { + std::ignore = queue; + unindent(space); + OSS << "}\n"; + }, + [&](const SceneData &scene) { + std::ignore = scene; + unindent(space); + OSS << "}\n"; + }, + [&](const Blit &blit) { + }, + [&](const Dispatch &dispatch) { + }, + [&](const ccstd::pmr::vector &clear) { + std::ignore = clear; + unindent(space); + OSS << "}\n"; + }, + [&](const gfx::Viewport &clear) { + }); + } + + std::ostringstream &oss; + ccstd::pmr::string &space; +}; + +} // namespace + +ccstd::string RenderGraph::print( + boost::container::pmr::memory_resource *scratch) const { + const auto &rg = *this; + std::ostringstream oss; + ccstd::pmr::string space(scratch); + oss << "\n"; + OSS << "RenderGraph {\n"; + { + INDENT(); + RenderGraphPrintVisitor visitor{ + {}, oss, space}; + AddressableView graphView(rg); + auto colors = rg.colors(scratch); + boost::depth_first_search(graphView, visitor, get(colors, rg)); + } + OSS << "}\n"; + return oss.str(); +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h b/native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h new file mode 100644 index 00000000000..18858869210 --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h @@ -0,0 +1,216 @@ +#pragma once +#include "cocos/renderer/pipeline/custom/LayoutGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/NativeTypes.h" +#include "cocos/renderer/pipeline/custom/RenderGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" +#include "pipeline/custom/RenderGraphTypes.h" + +namespace cc { + +namespace render { + +template +RenderGraph::vertex_descriptor +addVertex2(Tag tag, Component0 &&c0, Component1 &&c1, Component2 &&c2, Component3 &&c3, ValueT &&val, + RenderGraph &g, RenderGraph::vertex_descriptor u = RenderGraph::null_vertex()) { + auto v = addVertex( + tag, + std::forward(c0), + std::forward(c1), + std::forward(c2), + std::forward(c3), + std::forward(val), + g, + u); + g.sortedVertices.emplace_back(v); + CC_EXPECTS(g.sortedVertices.size() == num_vertices(g)); + return v; +} + +inline LayoutGraphData::vertex_descriptor getSubpassOrPassID( + RenderGraph::vertex_descriptor vertID, + const RenderGraph &rg, const LayoutGraphData &lg) { + const auto queueID = parent(vertID, rg); + CC_ENSURES(queueID != RenderGraph::null_vertex()); + const auto subpassOrPassID = parent(queueID, rg); + CC_ENSURES(subpassOrPassID != RenderGraph::null_vertex()); + const auto passID = parent(subpassOrPassID, rg); + + auto layoutID = LayoutGraphData::null_vertex(); + if (passID == RenderGraph::null_vertex()) { // single render pass + const auto &layoutName = get(RenderGraph::LayoutTag{}, rg, subpassOrPassID); + CC_ENSURES(!layoutName.empty()); + layoutID = locate(LayoutGraphData::null_vertex(), layoutName, lg); + } else { // render pass + const auto &passLayoutName = get(RenderGraph::LayoutTag{}, rg, passID); + CC_ENSURES(!passLayoutName.empty()); + const auto passLayoutID = locate(LayoutGraphData::null_vertex(), passLayoutName, lg); + CC_ENSURES(passLayoutID != LayoutGraphData::null_vertex()); + + const auto &subpassLayoutName = get(RenderGraph::LayoutTag{}, rg, subpassOrPassID); + if (subpassLayoutName.empty()) { + layoutID = passLayoutID; // expect to be multisample pass + } else { + const auto subpassLayoutID = locate(passLayoutID, subpassLayoutName, lg); + CC_ENSURES(subpassLayoutID != LayoutGraphData::null_vertex()); + layoutID = subpassLayoutID; + } + + } + CC_ENSURES(layoutID != LayoutGraphData::null_vertex()); + return layoutID; +} + +inline std::tuple +addRenderPassVertex( + RenderGraph &renderGraph, const LayoutGraphData &layoutGraph, + uint32_t width, uint32_t height, // NOLINT(bugprone-easily-swappable-parameters) + uint32_t count, uint32_t quality, // NOLINT(bugprone-easily-swappable-parameters) + const ccstd::string &passName) { + RasterPass pass(renderGraph.get_allocator()); + pass.width = width; + pass.height = height; + pass.viewport.width = width; + pass.viewport.height = height; + pass.count = count; + pass.quality = quality; + + auto passID = addVertex2( + RasterPassTag{}, + std::forward_as_tuple(passName), + std::forward_as_tuple(passName), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(pass)), + renderGraph); + + auto passLayoutID = locate(LayoutGraphData::null_vertex(), passName, layoutGraph); + CC_EXPECTS(passLayoutID != LayoutGraphData::null_vertex()); + + return {passID, passLayoutID}; +} + +inline std::tuple +addRenderSubpassVertex( + RasterPass &pass, + RenderGraph &renderGraph, RenderGraph::vertex_descriptor passID, + const LayoutGraphData &layoutGraph, LayoutGraphData::vertex_descriptor passLayoutID, + const ccstd::string &subpassName, + uint32_t count, uint32_t quality) { // NOLINT(bugprone-easily-swappable-parameters) + + // if subpassName is empty, it must be basic multisample render pass + CC_EXPECTS(!subpassName.empty() || count > 1); + + auto &subpassGraph = pass.subpassGraph; + const auto subpassIndex = num_vertices(pass.subpassGraph); + { + auto id = addVertex( + std::piecewise_construct, + std::forward_as_tuple(subpassName), + std::forward_as_tuple(), + subpassGraph); + CC_ENSURES(id == subpassIndex); + } + + RasterSubpass subpass(subpassIndex, count, quality, renderGraph.get_allocator()); + subpass.viewport.width = pass.width; + subpass.viewport.height = pass.height; + + auto subpassID = addVertex2( + RasterSubpassTag{}, + std::forward_as_tuple(subpassName), + std::forward_as_tuple(subpassName), + std::forward_as_tuple(), + std::forward_as_tuple(), + std::forward_as_tuple(std::move(subpass)), + renderGraph, passID); + + auto subpassLayoutID = LayoutGraphData::null_vertex(); + if (subpassName.empty()) { // Basic multisample render pass (single subpass) + CC_EXPECTS(count > 1); + subpassLayoutID = passLayoutID; + } else { + if constexpr (ENABLE_SUBPASS) { + subpassLayoutID = locate(passLayoutID, subpassName, layoutGraph); + } else { + subpassLayoutID = locate(LayoutGraphData::null_vertex(), subpassName, layoutGraph); + } + } + CC_ENSURES(subpassLayoutID != LayoutGraphData::null_vertex()); + + return {subpassID, subpassLayoutID}; +} + +template +void addPassComputeViewImpl( + Tag tag, + RenderGraph &renderGraph, + RenderGraph::vertex_descriptor passID, + const ccstd::string &name, const ComputeView &view) { + std::ignore = tag; + CC_EXPECTS(!name.empty()); + CC_EXPECTS(!view.name.empty()); + auto &pass = get(Tag{}, passID, renderGraph); + auto iter = pass.computeViews.find(name.c_str()); + if (iter == pass.computeViews.end()) { + bool added = false; + std::tie(iter, added) = pass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(name.c_str()), + std::forward_as_tuple()); + CC_ENSURES(added); + } + iter->second.emplace_back(view); +} + +template +void addSubpassComputeViewImpl( + Tag tag, + RenderGraph &renderGraph, + RenderGraph::vertex_descriptor subpassID, + const ccstd::string &name, const ComputeView &view) { + std::ignore = tag; + CC_EXPECTS(!name.empty()); + CC_EXPECTS(!view.name.empty()); + auto &subpass = get(Tag{}, subpassID, renderGraph); + const auto passID = parent(subpassID, renderGraph); + CC_EXPECTS(passID != RenderGraph::null_vertex()); + CC_EXPECTS(holds(passID, renderGraph)); + auto &pass = get(RasterPassTag{}, passID, renderGraph); + CC_EXPECTS(subpass.subpassID < num_vertices(pass.subpassGraph)); + auto &subpassData = get(SubpassGraph::SubpassTag{}, pass.subpassGraph, subpass.subpassID); + CC_EXPECTS(subpass.computeViews.size() == subpassData.computeViews.size()); + { + auto iter = subpassData.computeViews.find(name.c_str()); + if (iter == subpassData.computeViews.end()) { + bool added = false; + std::tie(iter, added) = subpassData.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(name.c_str()), + std::forward_as_tuple()); + CC_ENSURES(added); + } + iter->second.emplace_back(view); + } + { + auto iter = subpass.computeViews.find(name.c_str()); + if (iter == subpass.computeViews.end()) { + bool added = false; + std::tie(iter, added) = subpass.computeViews.emplace( + std::piecewise_construct, + std::forward_as_tuple(name.c_str()), + std::forward_as_tuple()); + CC_ENSURES(added); + } + iter->second.emplace_back(view); + } + CC_ENSURES(subpass.computeViews.size() == subpassData.computeViews.size()); + CC_ENSURES(subpass.computeViews.find(std::string_view{name}) != subpass.computeViews.end()); + CC_ENSURES(subpassData.computeViews.find(std::string_view{name}) != subpassData.computeViews.end()); + CC_ENSURES(subpass.computeViews.find(std::string_view{name})->second.size() == + subpassData.computeViews.find(std::string_view{name})->second.size()); +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp b/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp index 20709a6f97f..984e215a9ad 100644 --- a/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeResourceGraph.cpp @@ -126,7 +126,7 @@ gfx::TextureInfo getTextureInfo(const ResourceDesc& desc, bool bCube = false) { } // usage - TextureUsage usage = TextureUsage::SAMPLED | TextureUsage::TRANSFER_SRC | TextureUsage::TRANSFER_DST; + TextureUsage usage = TextureUsage::NONE; if (any(desc.flags & ResourceFlags::COLOR_ATTACHMENT)) { usage |= TextureUsage::COLOR_ATTACHMENT; } @@ -143,6 +143,15 @@ gfx::TextureInfo getTextureInfo(const ResourceDesc& desc, bool bCube = false) { if (any(desc.flags & ResourceFlags::SHADING_RATE)) { usage |= TextureUsage::SHADING_RATE; } + if (any(desc.flags & ResourceFlags::SAMPLED)) { + usage |= TextureUsage::SAMPLED; + } + if (any(desc.flags & ResourceFlags::TRANSFER_SRC)) { + usage |= TextureUsage::TRANSFER_SRC; + } + if (any(desc.flags & ResourceFlags::TRANSFER_DST)) { + usage |= TextureUsage::TRANSFER_DST; + } return { type, diff --git a/native/cocos/renderer/pipeline/custom/NativeSceneCulling.cpp b/native/cocos/renderer/pipeline/custom/NativeSceneCulling.cpp index 28f590b1b5f..f2cfd0111b0 100644 --- a/native/cocos/renderer/pipeline/custom/NativeSceneCulling.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeSceneCulling.cpp @@ -1,16 +1,11 @@ -#include "LayoutGraphGraphs.h" -#include "NativePipelineTypes.h" -#include "NativeUtils.h" -#include "RenderGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/NativePipelineTypes.h" +#include "cocos/renderer/pipeline/custom/NativeRenderGraphUtils.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" +#include "cocos/renderer/pipeline/custom/details/Range.h" #include "cocos/scene/Octree.h" #include "cocos/scene/RenderScene.h" #include "cocos/scene/Skybox.h" #include "cocos/scene/SpotLight.h" -#include "details/GslUtils.h" -#include "details/Range.h" -#include "pipeline/custom/LayoutGraphTypes.h" -#include "pipeline/custom/NativeUtils.h" -#include "pipeline/custom/RenderCommonTypes.h" namespace cc { diff --git a/native/cocos/renderer/pipeline/custom/NativeSetter.cpp b/native/cocos/renderer/pipeline/custom/NativeSetter.cpp new file mode 100644 index 00000000000..6f4e2ca6fd9 --- /dev/null +++ b/native/cocos/renderer/pipeline/custom/NativeSetter.cpp @@ -0,0 +1,153 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "cocos/renderer/pipeline/custom/NativeBuiltinUtils.h" +#include "cocos/renderer/pipeline/custom/NativePipelineTypes.h" +#include "cocos/renderer/pipeline/custom/NativeUtils.h" +#include "cocos/renderer/pipeline/custom/RenderGraphGraphs.h" +#include "cocos/scene/RenderScene.h" +#include "cocos/scene/SpotLight.h" + +namespace cc { + +namespace render { + +void NativeSetter::setMat4(const ccstd::string &name, const Mat4 &mat) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setMat4Impl(data, *layoutGraph, name, mat); +} + +void NativeSetter::setQuaternion(const ccstd::string &name, const Quaternion &quat) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setQuaternionImpl(data, *layoutGraph, name, quat); +} + +void NativeSetter::setColor(const ccstd::string &name, const gfx::Color &color) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setColorImpl(data, *layoutGraph, name, color); +} + +void NativeSetter::setVec4(const ccstd::string &name, const Vec4 &vec) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setVec4Impl(data, *layoutGraph, name, vec); +} + +void NativeSetter::setVec2(const ccstd::string &name, const Vec2 &vec) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setVec2Impl(data, *layoutGraph, name, vec); +} + +void NativeSetter::setFloat(const ccstd::string &name, float v) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setFloatImpl(data, *layoutGraph, name, v); +} + +void NativeSetter::setArrayBuffer(const ccstd::string &name, const ArrayBuffer *buffer) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setArrayBufferImpl(data, *layoutGraph, name, *buffer); +} + +void NativeSetter::setBuffer(const ccstd::string &name, gfx::Buffer *buffer) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setBufferImpl(data, *layoutGraph, name, buffer); +} + +void NativeSetter::setTexture(const ccstd::string &name, gfx::Texture *texture) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setTextureImpl(data, *layoutGraph, name, texture); +} + +void NativeSetter::setReadWriteBuffer(const ccstd::string &name, gfx::Buffer *buffer) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setReadWriteBufferImpl(data, *layoutGraph, name, buffer); +} + +void NativeSetter::setReadWriteTexture(const ccstd::string &name, gfx::Texture *texture) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setReadWriteTextureImpl(data, *layoutGraph, name, texture); +} + +void NativeSetter::setSampler(const ccstd::string &name, gfx::Sampler *sampler) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setSamplerImpl(data, *layoutGraph, name, sampler); +} + +void NativeSetter::setVec4ArraySize(const ccstd::string &name, uint32_t sz) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setVec4ArraySizeImpl(data, *layoutGraph, name, sz); +} + +void NativeSetter::setVec4ArrayElem(const ccstd::string &name, const cc::Vec4 &vec, uint32_t id) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setVec4ArrayElemImpl(data, *layoutGraph, name, vec, id); +} + +void NativeSetter::setMat4ArraySize(const ccstd::string &name, uint32_t sz) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setMat4ArraySizeImpl(data, *layoutGraph, name, sz); +} + +void NativeSetter::setMat4ArrayElem(const ccstd::string &name, const cc::Mat4 &mat, uint32_t id) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setMat4ArrayElemImpl(data, *layoutGraph, name, mat, id); +} + +void NativeSetter::setBuiltinCameraConstants(const scene::Camera *camera) { + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setCameraUBOValues( + *camera, + *layoutGraph, + *pipelineRuntime->getPipelineSceneData(), + camera->getScene()->getMainLight(), data); +} + +void NativeSetter::setBuiltinDirectionalLightViewConstants( + const scene::DirectionalLight *light, uint32_t level) { + CC_EXPECTS(light); + auto *device = pipelineRuntime->getDevice(); + const auto &sceneData = *pipelineRuntime->getPipelineSceneData(); + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setShadowUBOLightView(device, *layoutGraph, sceneData, *light, level, data); +} + +void NativeSetter::setBuiltinSpotLightViewConstants(const scene::SpotLight *light) { + CC_EXPECTS(light); + auto *device = pipelineRuntime->getDevice(); + const auto &sceneData = *pipelineRuntime->getPipelineSceneData(); + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setShadowUBOLightView(device, *layoutGraph, sceneData, *light, 0, data); +} + +void NativeSetter::setBuiltinShadowMapConstants( + const scene::DirectionalLight *light) { + CC_EXPECTS(light); + auto *device = pipelineRuntime->getDevice(); + const auto &sceneData = *pipelineRuntime->getPipelineSceneData(); + auto &data = get(RenderGraph::DataTag{}, *renderGraph, nodeID); + setShadowUBOView(*device, *layoutGraph, sceneData, *light, data); +} + +} // namespace render + +} // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeUtils.cpp b/native/cocos/renderer/pipeline/custom/NativeUtils.cpp index 75af2336a16..4edad502350 100644 --- a/native/cocos/renderer/pipeline/custom/NativeUtils.cpp +++ b/native/cocos/renderer/pipeline/custom/NativeUtils.cpp @@ -1,98 +1,36 @@ -#include "NativeUtils.h" -#include "LayoutGraphGraphs.h" -#include "NativePipelineTypes.h" -#include "RenderGraphGraphs.h" -#include "cocos/application/ApplicationManager.h" -#include "cocos/core/Root.h" -#include "details/GslUtils.h" +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + +#include "cocos/renderer/pipeline/custom/NativeUtils.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/NativePipelineTypes.h" +#include "cocos/renderer/pipeline/custom/RenderGraphGraphs.h" +#include "cocos/renderer/pipeline/custom/details/GslUtils.h" namespace cc { -namespace render { - -void setupQuadVertexBuffer(gfx::Device &device, const Vec4 &viewport, float vbData[16]) { - auto minX = static_cast(viewport.x); - auto maxX = static_cast(viewport.x + viewport.z); - auto minY = static_cast(viewport.y); - auto maxY = static_cast(viewport.y + viewport.w); - if (device.getCapabilities().screenSpaceSignY > 0) { - std::swap(minY, maxY); - } - int n = 0; - vbData[n++] = -1.0F; - vbData[n++] = -1.0F; - vbData[n++] = minX; // uv - vbData[n++] = maxY; - vbData[n++] = 1.0F; - vbData[n++] = -1.0F; - vbData[n++] = maxX; - vbData[n++] = maxY; - vbData[n++] = -1.0F; - vbData[n++] = 1.0F; - vbData[n++] = minX; - vbData[n++] = minY; - vbData[n++] = 1.0F; - vbData[n++] = 1.0F; - vbData[n++] = maxX; - vbData[n++] = minY; -} -// NOLINTNEXTLINE(bugprone-easily-swappable-parameters) -void updateRasterPassConstants(uint32_t width, uint32_t height, Setter &setter) { - const auto &root = *Root::getInstance(); - const auto shadingWidth = static_cast(width); - const auto shadingHeight = static_cast(height); - setter.setVec4( - "cc_time", - Vec4( - root.getCumulativeTime(), - root.getFrameTime(), - static_cast(CC_CURRENT_ENGINE()->getTotalFrames()), - 0.0F)); - - setter.setVec4( - "cc_screenSize", - Vec4(shadingWidth, shadingHeight, 1.0F / shadingWidth, 1.0F / shadingHeight)); - setter.setVec4( - "cc_nativeSize", - Vec4(shadingWidth, shadingHeight, 1.0F / shadingWidth, 1.0F / shadingHeight)); -#if 0 - const auto *debugView = root.getDebugView(); - if (debugView) { - setter.setVec4( - "cc_debug_view_mode", - Vec4(static_cast(debugView->getSingleMode()), - debugView->isLightingWithAlbedo() ? 1.0F : 0.0F, - debugView->isCsmLayerColoration() ? 1.0F : 0.0F, - 0.0F)); - Vec4 debugPackVec{}; - for (auto i = static_cast(pipeline::DebugViewCompositeType::DIRECT_DIFFUSE); - i < static_cast(pipeline::DebugViewCompositeType::MAX_BIT_COUNT); ++i) { - const auto idx = i % 4; - (&debugPackVec.x)[idx] = debugView->isCompositeModeEnabled(i) ? 1.0F : 0.0F; - const auto packIdx = static_cast(floor(static_cast(i) / 4.0F)); - if (idx == 3) { - std::string name("cc_debug_view_composite_pack_"); - name.append(std::to_string(packIdx + 1)); - setter.setVec4(name, debugPackVec); - } - } - } else { - setter.setVec4("cc_debug_view_mode", Vec4(0.0F, 1.0F, 0.0F, 0.0F)); - Vec4 debugPackVec{}; - for (auto i = static_cast(pipeline::DebugViewCompositeType::DIRECT_DIFFUSE); - i < static_cast(pipeline::DebugViewCompositeType::MAX_BIT_COUNT); ++i) { - const auto idx = i % 4; - (&debugPackVec.x)[idx] = 1.0F; - const auto packIdx = static_cast(floor(i / 4.0)); - if (idx == 3) { - std::string name("cc_debug_view_composite_pack_"); - name.append(std::to_string(packIdx + 1)); - setter.setVec4(name, debugPackVec); - } - } - } -#endif -} +namespace render { namespace { @@ -225,35 +163,6 @@ void setSamplerImpl(RenderData &data, const LayoutGraphData &lg, const ccstd::st data.samplers[nameID.value] = sampler; } -LayoutGraphData::vertex_descriptor getSubpassOrPassID( - RenderGraph::vertex_descriptor vertID, - const RenderGraph &rg, const LayoutGraphData &lg) { - const auto queueID = parent(vertID, rg); - CC_ENSURES(queueID != RenderGraph::null_vertex()); - const auto subpassOrPassID = parent(queueID, rg); - CC_ENSURES(subpassOrPassID != RenderGraph::null_vertex()); - const auto passID = parent(subpassOrPassID, rg); - - auto layoutID = LayoutGraphData::null_vertex(); - if (passID == RenderGraph::null_vertex()) { // single render pass - const auto &layoutName = get(RenderGraph::LayoutTag{}, rg, subpassOrPassID); - CC_ENSURES(!layoutName.empty()); - layoutID = locate(LayoutGraphData::null_vertex(), layoutName, lg); - } else { // render pass - const auto &passLayoutName = get(RenderGraph::LayoutTag{}, rg, passID); - CC_ENSURES(!passLayoutName.empty()); - const auto passLayoutID = locate(LayoutGraphData::null_vertex(), passLayoutName, lg); - CC_ENSURES(passLayoutID != LayoutGraphData::null_vertex()); - - const auto &subpassLayoutName = get(RenderGraph::LayoutTag{}, rg, subpassOrPassID); - CC_ENSURES(!subpassLayoutName.empty()); - const auto subpassLayoutID = locate(passLayoutID, subpassLayoutName, lg); - CC_ENSURES(subpassLayoutID != LayoutGraphData::null_vertex()); - layoutID = subpassLayoutID; - } - CC_ENSURES(layoutID != LayoutGraphData::null_vertex()); - return layoutID; -} - } // namespace render + } // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/NativeUtils.h b/native/cocos/renderer/pipeline/custom/NativeUtils.h index 620aa64b3e2..82595dc3c92 100644 --- a/native/cocos/renderer/pipeline/custom/NativeUtils.h +++ b/native/cocos/renderer/pipeline/custom/NativeUtils.h @@ -1,18 +1,37 @@ +/**************************************************************************** + Copyright (c) 2021-2023 Xiamen Yaji Software Co., Ltd. + + http://www.cocos.com + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +****************************************************************************/ + #pragma once #include "cocos/core/ArrayBuffer.h" #include "cocos/math/Vec4.h" -#include "cocos/renderer/pipeline/custom/LayoutGraphTypes.h" -#include "cocos/renderer/pipeline/custom/RenderGraphTypes.h" +#include "cocos/renderer/pipeline/custom/LayoutGraphFwd.h" +#include "cocos/renderer/pipeline/custom/RenderGraphFwd.h" #include "cocos/renderer/pipeline/custom/RenderInterfaceFwd.h" namespace cc { -namespace gfx { -class Device; -} -namespace render { -void setupQuadVertexBuffer(gfx::Device &device, const Vec4 &viewport, float vbData[16]); -void updateRasterPassConstants(uint32_t width, uint32_t height, Setter &setter); +namespace render { void setMat4Impl( RenderData &data, const LayoutGraphData &lg, std::string_view name, @@ -56,11 +75,6 @@ void setReadWriteTextureImpl(RenderData &data, const LayoutGraphData &lg, const void setSamplerImpl(RenderData &data, const LayoutGraphData &lg, const ccstd::string &name, gfx::Sampler *sampler); -// Implementation -LayoutGraphData::vertex_descriptor getSubpassOrPassID( - RenderGraph::vertex_descriptor vertID, - const RenderGraph &rg, const LayoutGraphData &lg); - } // namespace render } // namespace cc diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h b/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h index 8f54ad52ca6..1628d725ef7 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonFwd.h @@ -29,6 +29,7 @@ */ // clang-format off #pragma once +#include "cocos/base/std/hash/hash.h" #include "cocos/base/std/variant.h" #include "cocos/renderer/gfx-base/GFXDef-common.h" @@ -84,4 +85,13 @@ struct PipelineStatistics; } // namespace cc +namespace ccstd { + +template <> +struct hash { + hash_t operator()(const cc::render::ResolvePair& val) const noexcept; +}; + +} // namespace ccstd + // clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h b/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h index fea8e265f87..eb6dfe6a9b3 100644 --- a/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderCommonTypes.h @@ -32,6 +32,7 @@ #include "cocos/base/Ptr.h" #include "cocos/base/std/container/map.h" #include "cocos/base/std/container/string.h" +#include "cocos/base/std/hash/hash.h" #include "cocos/renderer/gfx-base/GFXDef-common.h" #include "cocos/renderer/pipeline/custom/RenderCommonFwd.h" #include "cocos/scene/Light.h" @@ -101,6 +102,8 @@ enum class ResourceFlags : uint32_t { DEPTH_STENCIL_ATTACHMENT = 0x20, INPUT_ATTACHMENT = 0x40, SHADING_RATE = 0x80, + TRANSFER_SRC = 0x100, + TRANSFER_DST = 0x200, }; constexpr ResourceFlags operator|(const ResourceFlags lhs, const ResourceFlags rhs) noexcept { @@ -154,6 +157,7 @@ enum class SceneFlags : uint32_t { DRAW_INSTANCING = 0x800, DRAW_NON_INSTANCING = 0x1000, REFLECTION_PROBE = 0x2000, + GPU_DRIVEN = 0x4000, ALL = 0xFFFFFFFF, }; @@ -325,6 +329,15 @@ struct ResolvePair { gfx::ResolveMode mode1{gfx::ResolveMode::SAMPLE_ZERO}; }; +inline bool operator==(const ResolvePair& lhs, const ResolvePair& rhs) noexcept { + return std::forward_as_tuple(lhs.source, lhs.target, lhs.resolveFlags, lhs.mode, lhs.mode1) == + std::forward_as_tuple(rhs.source, rhs.target, rhs.resolveFlags, rhs.mode, rhs.mode1); +} + +inline bool operator!=(const ResolvePair& lhs, const ResolvePair& rhs) noexcept { + return !(lhs == rhs); +} + struct CopyPair { using allocator_type = boost::container::pmr::polymorphic_allocator; allocator_type get_allocator() const noexcept { // NOLINT @@ -420,4 +433,18 @@ struct PipelineStatistics { } // namespace cc +namespace ccstd { + +inline hash_t hash::operator()(const cc::render::ResolvePair& val) const noexcept { + hash_t seed = 0; + hash_combine(seed, val.source); + hash_combine(seed, val.target); + hash_combine(seed, val.resolveFlags); + hash_combine(seed, val.mode); + hash_combine(seed, val.mode1); + return seed; +} + +} // namespace ccstd + // clang-format on diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp index 0d6236eb388..bcb977b9e35 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp +++ b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.cpp @@ -124,15 +124,18 @@ ComputeView::ComputeView(ComputeView const& rhs, const allocator_type& alloc) Subpass::Subpass(const allocator_type& alloc) noexcept : rasterViews(alloc), - computeViews(alloc) {} + computeViews(alloc), + resolvePairs(alloc) {} Subpass::Subpass(Subpass&& rhs, const allocator_type& alloc) : rasterViews(std::move(rhs.rasterViews), alloc), - computeViews(std::move(rhs.computeViews), alloc) {} + computeViews(std::move(rhs.computeViews), alloc), + resolvePairs(std::move(rhs.resolvePairs), alloc) {} Subpass::Subpass(Subpass const& rhs, const allocator_type& alloc) : rasterViews(rhs.rasterViews, alloc), - computeViews(rhs.computeViews, alloc) {} + computeViews(rhs.computeViews, alloc), + resolvePairs(rhs.resolvePairs, alloc) {} SubpassGraph::SubpassGraph(const allocator_type& alloc) noexcept : _vertices(alloc), @@ -416,7 +419,8 @@ RenderGraph::RenderGraph(const allocator_type& alloc) noexcept dispatches(alloc), clearViews(alloc), viewports(alloc), - index(alloc) {} + index(alloc), + sortedVertices(alloc) {} RenderGraph::RenderGraph(RenderGraph&& rhs, const allocator_type& alloc) : objects(std::move(rhs.objects), alloc), @@ -439,7 +443,8 @@ RenderGraph::RenderGraph(RenderGraph&& rhs, const allocator_type& alloc) dispatches(std::move(rhs.dispatches), alloc), clearViews(std::move(rhs.clearViews), alloc), viewports(std::move(rhs.viewports), alloc), - index(std::move(rhs.index), alloc) {} + index(std::move(rhs.index), alloc), + sortedVertices(std::move(rhs.sortedVertices), alloc) {} // ContinuousContainer void RenderGraph::reserve(vertices_size_type sz) { diff --git a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h index d0f7e0aa9f7..acf43826fd8 100644 --- a/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderGraphTypes.h @@ -166,7 +166,7 @@ struct ResourceDesc { uint16_t depthOrArraySize{0}; uint16_t mipLevels{0}; gfx::Format format{gfx::Format::UNKNOWN}; - gfx::SampleCount sampleCount{gfx::SampleCount::ONE}; + gfx::SampleCount sampleCount{gfx::SampleCount::X1}; gfx::TextureFlagBit textureFlags{gfx::TextureFlagBit::NONE}; ResourceFlags flags{ResourceFlags::NONE}; }; @@ -242,11 +242,12 @@ struct Subpass { PmrTransparentMap rasterViews; PmrTransparentMap> computeViews; + ccstd::pmr::vector resolvePairs; }; inline bool operator==(const Subpass& lhs, const Subpass& rhs) noexcept { - return std::forward_as_tuple(lhs.rasterViews, lhs.computeViews) == - std::forward_as_tuple(rhs.rasterViews, rhs.computeViews); + return std::forward_as_tuple(lhs.rasterViews, lhs.computeViews, lhs.resolvePairs) == + std::forward_as_tuple(rhs.rasterViews, rhs.computeViews, rhs.resolvePairs); } inline bool operator!=(const Subpass& lhs, const Subpass& rhs) noexcept { @@ -1047,6 +1048,7 @@ struct RenderGraph { impl::ValueHandle, impl::ValueHandle>; + vertex_descriptor getPassID(vertex_descriptor nodeID) const; ccstd::string print(boost::container::pmr::memory_resource* scratch) const; // ContinuousContainer @@ -1123,6 +1125,7 @@ struct RenderGraph { ccstd::pmr::vector viewports; // Members PmrUnorderedStringMap index; + ccstd::pmr::vector sortedVertices; }; } // namespace render @@ -1168,6 +1171,7 @@ inline hash_t hash::operator()(const cc::render::Subpass& v hash_t seed = 0; hash_combine(seed, val.rasterViews); hash_combine(seed, val.computeViews); + hash_combine(seed, val.resolvePairs); return seed; } diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h b/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h index c88d1732b0d..7a72a5f60e8 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h @@ -49,16 +49,15 @@ class RenderNode; class Setter; class RenderQueueBuilder; class BasicRenderPassBuilder; +class BasicMultisampleRenderPassBuilder; class BasicPipeline; class RenderSubpassBuilder; class MultisampleRenderSubpassBuilder; class ComputeQueueBuilder; class ComputeSubpassBuilder; class RenderPassBuilder; +class MultisampleRenderPassBuilder; class ComputePassBuilder; -class SceneVisitor; -class SceneTask; -class SceneTransversal; class Pipeline; class PipelineBuilder; class RenderingModule; diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h index 3a2d25b3a39..4c5e015b567 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h @@ -290,6 +290,11 @@ enum class SubpassCapabilities : uint32_t { * @zh 支持读取当前像素任意颜色值 */ INPUT_COLOR_MRT = 1 << 2, + /** + * @en Each subpass has its own sample count. + * @zh 每个Subpass拥有不同的采样数 + */ + HETEROGENEOUS_SAMPLE_COUNT = 1 << 3, }; constexpr SubpassCapabilities operator|(const SubpassCapabilities lhs, const SubpassCapabilities rhs) noexcept { @@ -445,6 +450,13 @@ class Setter : public RenderNode { * @param name @en descriptor name in shader. @zh 填写着色器中的描述符(descriptor)名字 */ virtual void setSampler(const ccstd::string &name, gfx::Sampler *sampler) = 0; + virtual void setBuiltinCameraConstants(const scene::Camera *camera) = 0; + virtual void setBuiltinShadowMapConstants(const scene::DirectionalLight *light) = 0; + virtual void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light, uint32_t level) = 0; + virtual void setBuiltinSpotLightViewConstants(const scene::SpotLight *light) = 0; + void setBuiltinDirectionalLightViewConstants(const scene::DirectionalLight *light) { + setBuiltinDirectionalLightViewConstants(light, 0); + } }; /** @@ -468,6 +480,9 @@ class RenderQueueBuilder : public Setter { * @param sceneFlags @en Rendering flags of the scene @zh 场景渲染标志位 */ virtual void addSceneOfCamera(scene::Camera *camera, LightInfo light, SceneFlags sceneFlags) = 0; + virtual void addScene(const scene::Camera *camera, SceneFlags sceneFlags) = 0; + virtual void addSceneCulledByDirectionalLight(const scene::Camera *camera, SceneFlags sceneFlags, scene::DirectionalLight *light, uint32_t level) = 0; + virtual void addSceneCulledBySpotLight(const scene::Camera *camera, SceneFlags sceneFlags, scene::SpotLight *light) = 0; /** * @en Render a full-screen quad. * @zh 渲染全屏四边形 @@ -636,6 +651,20 @@ class BasicRenderPassBuilder : public Setter { } }; +class BasicMultisampleRenderPassBuilder : public BasicRenderPassBuilder { +public: + BasicMultisampleRenderPassBuilder() noexcept = default; + + virtual void resolveRenderTarget(const ccstd::string &source, const ccstd::string &target) = 0; + virtual void resolveDepthStencil(const ccstd::string &source, const ccstd::string &target, gfx::ResolveMode depthMode, gfx::ResolveMode stencilMode) = 0; + void resolveDepthStencil(const ccstd::string &source, const ccstd::string &target) { + resolveDepthStencil(source, target, gfx::ResolveMode::SAMPLE_ZERO, gfx::ResolveMode::SAMPLE_ZERO); + } + void resolveDepthStencil(const ccstd::string &source, const ccstd::string &target, gfx::ResolveMode depthMode) { + resolveDepthStencil(source, target, depthMode, gfx::ResolveMode::SAMPLE_ZERO); + } +}; + /** * @en BasicPipeline * Basic pipeline provides basic rendering features which are supported on all platforms. @@ -731,6 +760,8 @@ class BasicPipeline : public PipelineRuntime { * @param format @en Format of the resource @zh 资源的格式 */ virtual void updateDepthStencil(const ccstd::string &name, uint32_t width, uint32_t height, gfx::Format format) = 0; + virtual uint32_t addResource(const ccstd::string &name, ResourceDimension dimension, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount, ResourceFlags flags, ResourceResidency residency) = 0; + virtual void updateResource(const ccstd::string &name, gfx::Format format, uint32_t width, uint32_t height, uint32_t depth, uint32_t arraySize, uint32_t mipLevels, gfx::SampleCount sampleCount) = 0; /** * @engineInternal * @en Begin rendering one frame @@ -770,7 +801,7 @@ class BasicPipeline : public PipelineRuntime { * @param passName @en Pass name declared in the effect. Default value is 'default' @zh effect中的pass name,缺省为'default' * @returns Multisample basic render pass builder */ - virtual BasicRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality, const ccstd::string &passName) = 0; + virtual BasicMultisampleRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality, const ccstd::string &passName) = 0; /** * @deprecated Method will be removed in 3.9.0 */ @@ -815,7 +846,7 @@ class BasicPipeline : public PipelineRuntime { BasicRenderPassBuilder *addRenderPass(uint32_t width, uint32_t height) { return addRenderPass(width, height, "default"); } - BasicRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality) { + BasicMultisampleRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality) { return addMultisampleRenderPass(width, height, count, quality, "default"); } }; @@ -1187,6 +1218,14 @@ class RenderPassBuilder : public BasicRenderPassBuilder { } }; +class MultisampleRenderPassBuilder : public BasicMultisampleRenderPassBuilder { +public: + MultisampleRenderPassBuilder() noexcept = default; + + virtual void addStorageBuffer(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) = 0; + virtual void addStorageImage(const ccstd::string &name, AccessType accessType, const ccstd::string &slotName) = 0; +}; + /** * @en Compute pass * @zh 计算通道 @@ -1271,61 +1310,6 @@ class ComputePassBuilder : public Setter { } }; -/** - * @deprecated @en Not used @zh 未使用 - */ -class SceneVisitor { -public: - SceneVisitor() noexcept = default; - SceneVisitor(SceneVisitor&& rhs) = delete; - SceneVisitor(SceneVisitor const& rhs) = delete; - SceneVisitor& operator=(SceneVisitor&& rhs) = delete; - SceneVisitor& operator=(SceneVisitor const& rhs) = delete; - virtual ~SceneVisitor() noexcept = default; - - virtual const pipeline::PipelineSceneData *getPipelineSceneData() const = 0; - virtual void setViewport(const gfx::Viewport &vp) = 0; - virtual void setScissor(const gfx::Rect &rect) = 0; - virtual void bindPipelineState(gfx::PipelineState *pso) = 0; - virtual void bindDescriptorSet(uint32_t set, gfx::DescriptorSet *descriptorSet, uint32_t dynamicOffsetCount, const uint32_t *dynamicOffsets) = 0; - virtual void bindInputAssembler(gfx::InputAssembler *ia) = 0; - virtual void updateBuffer(gfx::Buffer *buff, const void *data, uint32_t size) = 0; - virtual void draw(const gfx::DrawInfo &info) = 0; -}; - -/** - * @deprecated @en Not used @zh 未使用 - */ -class SceneTask { -public: - SceneTask() noexcept = default; - SceneTask(SceneTask&& rhs) = delete; - SceneTask(SceneTask const& rhs) = delete; - SceneTask& operator=(SceneTask&& rhs) = delete; - SceneTask& operator=(SceneTask const& rhs) = delete; - virtual ~SceneTask() noexcept = default; - - virtual TaskType getTaskType() const noexcept = 0; - virtual void start() = 0; - virtual void join() = 0; - virtual void submit() = 0; -}; - -/** - * @deprecated @en Not used @zh 未使用 - */ -class SceneTransversal { -public: - SceneTransversal() noexcept = default; - SceneTransversal(SceneTransversal&& rhs) = delete; - SceneTransversal(SceneTransversal const& rhs) = delete; - SceneTransversal& operator=(SceneTransversal&& rhs) = delete; - SceneTransversal& operator=(SceneTransversal const& rhs) = delete; - virtual ~SceneTransversal() noexcept = default; - - virtual SceneTask *transverse(SceneVisitor *visitor) const = 0; -}; - /** * @en Render pipeline. * @zh 渲染管线 @@ -1389,6 +1373,7 @@ class Pipeline : public BasicPipeline { */ virtual void updateShadingRateTexture(const ccstd::string &name, uint32_t width, uint32_t height) = 0; RenderPassBuilder *addRenderPass(uint32_t width, uint32_t height, const ccstd::string &passName) override = 0 /* covariant */; + MultisampleRenderPassBuilder *addMultisampleRenderPass(uint32_t width, uint32_t height, uint32_t count, uint32_t quality, const ccstd::string &passName) override = 0 /* covariant */; /** * @en Add compute pass * @zh 添加计算通道 @@ -1438,6 +1423,8 @@ class Pipeline : public BasicPipeline { * @param movePairs @en Array of move source and target @zh 移动来源与目标的数组 */ virtual void addMovePass(const ccstd::vector &movePairs) = 0; + virtual void addBuiltinGpuCullingPass(const scene::Camera *camera, const std::string &hzbName, const scene::Light *light) = 0; + virtual void addBuiltinHzbGenerationPass(const std::string &sourceDepthStencilName, const std::string &targetHzbName) = 0; /** * @experimental */ @@ -1461,6 +1448,12 @@ class Pipeline : public BasicPipeline { void updateStorageTexture(const ccstd::string &name, uint32_t width, uint32_t height) { updateStorageTexture(name, width, height, gfx::Format::UNKNOWN); } + void addBuiltinGpuCullingPass(const scene::Camera *camera) { + addBuiltinGpuCullingPass(camera, "", nullptr); + } + void addBuiltinGpuCullingPass(const scene::Camera *camera, const std::string &hzbName) { + addBuiltinGpuCullingPass(camera, hzbName, nullptr); + } }; /** diff --git a/native/cocos/renderer/pipeline/custom/test/test.h b/native/cocos/renderer/pipeline/custom/test/test.h index cb28556b1dc..ed8f44f5eec 100644 --- a/native/cocos/renderer/pipeline/custom/test/test.h +++ b/native/cocos/renderer/pipeline/custom/test/test.h @@ -149,7 +149,7 @@ static void fillTestGraph(const ViewInfo &rasterData, const ResourceInfo &rescIn nameSet.emplace(viewName); } - auto &rasterViews = hasSubpass ? (*subpass).rasterViews : raster.rasterViews; + auto &views = hasSubpass ? (*subpass).rasterViews : raster.rasterViews; auto view = RasterView{ viewName.c_str(), isOutput ? AccessType::WRITE : AccessType::READ, @@ -161,7 +161,7 @@ static void fillTestGraph(const ViewInfo &rasterData, const ResourceInfo &rescIn gfx::ShaderStageFlagBit::NONE, }; view.slotID = slot; - rasterViews.emplace(viewName.c_str(), view); + views.emplace(viewName.c_str(), view); if (subpassViews) { subpassViews->emplace(viewName.c_str(), view); @@ -170,6 +170,7 @@ static void fillTestGraph(const ViewInfo &rasterData, const ResourceInfo &rescIn if (iter == raster.attachmentIndexMap.end()) { raster.attachmentIndexMap.emplace(viewName, newID); } + rasterViews.emplace(viewName, view); } ++slot; } @@ -566,117 +567,117 @@ static void runTestGraph(const RenderGraph &renderGraph, const ResourceGraph &re using cc::gfx::TextureFlagBit; \ ResourceInfo resources = { \ {"0", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"1", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"2", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"3", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"4", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"5", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"6", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"7", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"8", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"9", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"10", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"11", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"12", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"13", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"14", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"15", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"16", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"17", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"18", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::MANAGED}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"19", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::EXTERNAL}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"20", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::EXTERNAL}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"21", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::EXTERNAL}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ {"22", \ - {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::ONE, TextureFlagBit::NONE, \ + {ResourceDimension::TEXTURE2D, 4, 960, 640, 1, 0, Format::RGBA8, SampleCount::X1, TextureFlagBit::NONE, \ ResourceFlags::SAMPLED | ResourceFlags::COLOR_ATTACHMENT | ResourceFlags::INPUT_ATTACHMENT}, \ {ResourceResidency::BACKBUFFER}, \ {AccessFlagBit::FRAGMENT_SHADER_READ_TEXTURE | AccessFlagBit::COLOR_ATTACHMENT_WRITE}}, \ diff --git a/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp b/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp index adc4639b49c..115e2fe5ca8 100644 --- a/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp +++ b/native/cocos/renderer/pipeline/shadow/ShadowFlow.cpp @@ -283,7 +283,7 @@ void ShadowFlow::initShadowFrameBuffer(const RenderPipeline *pipeline, const sce const gfx::ColorAttachment colorAttachment{ format, - gfx::SampleCount::ONE, + gfx::SampleCount::X1, gfx::LoadOp::CLEAR, gfx::StoreOp::STORE, device->getGeneralBarrier({ @@ -294,7 +294,7 @@ void ShadowFlow::initShadowFrameBuffer(const RenderPipeline *pipeline, const sce const gfx::DepthStencilAttachment depthStencilAttachment{ gfx::Format::DEPTH, - gfx::SampleCount::ONE, + gfx::SampleCount::X1, gfx::LoadOp::CLEAR, gfx::StoreOp::DISCARD, gfx::LoadOp::CLEAR, diff --git a/native/tests/unit-test/src/complicated_barrier_case.cpp b/native/tests/unit-test/src/complicated_barrier_case.cpp index ec1f32703e2..3fdb5ae8a40 100644 --- a/native/tests/unit-test/src/complicated_barrier_case.cpp +++ b/native/tests/unit-test/src/complicated_barrier_case.cpp @@ -136,7 +136,11 @@ TEST(complicatedBarrierTest, test12) { const auto& node3 = barrierMap.at(3); ExpectEq(node3.blockBarrier.frontBarriers.empty(), true); ExpectEq(node3.blockBarrier.rearBarriers.empty(), true); - ExpectEq(node3.subpassBarriers.empty(), true); + + // subpass barrier size is the same as renderpass subpassinfo, though maybe empty. + ExpectEq(node3.subpassBarriers.size() == 1, true); + ExpectEq(node3.subpassBarriers.front().frontBarriers.empty(), true); + ExpectEq(node3.subpassBarriers.front().rearBarriers.empty(), true); //node4 const auto& node4 = barrierMap.at(4); @@ -181,6 +185,7 @@ TEST(complicatedBarrierTest, test12) { const auto& node5 = barrierMap.at(5); ExpectEq(node5.blockBarrier.frontBarriers.size() == 1, true); ExpectEq(node5.blockBarrier.rearBarriers.size() == 1, true); + // not raster pass ExpectEq(node5.subpassBarriers.empty(), true); auto iter7in5 = findBarrierByResID(node5.blockBarrier.rearBarriers, 7); @@ -198,6 +203,7 @@ TEST(complicatedBarrierTest, test12) { ExpectEq(node6.blockBarrier.frontBarriers.size() == 1, true); // resource later used by raster pass, so that layout can be transferred automatically. ExpectEq(node6.blockBarrier.rearBarriers.empty(), true); + // not a raster pass ExpectEq(node6.subpassBarriers.empty(), true); // node7 @@ -205,7 +211,7 @@ TEST(complicatedBarrierTest, test12) { // undefined layout already in initial layout ExpectEq(node7.blockBarrier.frontBarriers.empty(), true); ExpectEq(node7.blockBarrier.rearBarriers.empty(), true); - ExpectEq(node7.subpassBarriers.empty(), true); + ExpectEq(node7.subpassBarriers.empty(), false); ExpectEq(node7.blockBarrier.rearBarriers.size(), 0); @@ -219,7 +225,7 @@ TEST(complicatedBarrierTest, test12) { const auto& node13 = barrierMap.at(13); ExpectEq(node13.blockBarrier.frontBarriers.size(), 0); ExpectEq(node13.blockBarrier.rearBarriers.size(), 0); - ExpectEq(node13.subpassBarriers.empty(), true); + ExpectEq(node13.subpassBarriers.empty(), false); //node14: almost the same as 13 @@ -234,6 +240,7 @@ TEST(complicatedBarrierTest, test12) { const auto& node16 = barrierMap.at(16); ExpectEq(node16.blockBarrier.frontBarriers.empty(), true); ExpectEq(node16.blockBarrier.rearBarriers.empty(), true); + // not raster pass ExpectEq(node16.subpassBarriers.empty(), true); //runTestGraph(renderGraph, rescGraph, layoutGraphData, fgDispatcher); diff --git a/native/tests/unit-test/src/simple_closed_barrier_test.cpp b/native/tests/unit-test/src/simple_closed_barrier_test.cpp index 6cfbcc275e2..644132e90fb 100644 --- a/native/tests/unit-test/src/simple_closed_barrier_test.cpp +++ b/native/tests/unit-test/src/simple_closed_barrier_test.cpp @@ -54,7 +54,9 @@ TEST(simpleClosedBarrierTest, test11) { const auto& node1 = barrierMap.at(1); ExpectEq(node1.blockBarrier.frontBarriers.size(), 0); ExpectEq(node1.blockBarrier.rearBarriers.size(), 0); - ExpectEq(node1.subpassBarriers.empty(), true); + ExpectEq(node1.subpassBarriers.size() == 1, true); + ExpectEq(node1.subpassBarriers.front().frontBarriers.empty(), true); + ExpectEq(node1.subpassBarriers.front().rearBarriers.empty(), true); // transitioned by renderpass info //ExpectEq(node1.blockBarrier.rearBarriers[0].type == cc::gfx::BarrierType::FULL, true); @@ -65,7 +67,9 @@ TEST(simpleClosedBarrierTest, test11) { const auto& node2 = barrierMap.at(2); ExpectEq(node2.blockBarrier.frontBarriers.size(), 0); ExpectEq(node2.blockBarrier.rearBarriers.size(), 0); - ExpectEq(node2.subpassBarriers.empty(), true); + ExpectEq(node2.subpassBarriers.size() == 1, true); + ExpectEq(node2.subpassBarriers.front().frontBarriers.empty(), true); + ExpectEq(node2.subpassBarriers.front().rearBarriers.empty(), true); // ditto //// res3 diff --git a/native/tools/swig-config/gfx.i b/native/tools/swig-config/gfx.i index 452f7b47ae9..a0944e0ffd7 100644 --- a/native/tools/swig-config/gfx.i +++ b/native/tools/swig-config/gfx.i @@ -65,6 +65,7 @@ namespace cc { namespace gfx { %ignore CommandBuffer::execute; %ignore CommandBuffer::updateBuffer; +%ignore CommandBuffer::resolveTexture; %ignore CommandBuffer::copyBuffersToTexture; %rename(drawWithInfo) CommandBuffer::draw(const DrawInfo&); diff --git a/native/tools/swig-config/render.i b/native/tools/swig-config/render.i index 4db861b41f0..dbaf304bec1 100644 --- a/native/tools/swig-config/render.i +++ b/native/tools/swig-config/render.i @@ -47,8 +47,6 @@ using namespace cc::render; %ignore cc::render::PipelineRuntime::isOcclusionQueryEnabled; %ignore cc::render::PipelineRuntime::resetRenderQueue; %ignore cc::render::PipelineRuntime::isRenderQueueReset; -%ignore cc::render::SceneVisitor::bindDescriptorSet; -%ignore cc::render::SceneVisitor::updateBuffer; // ----- Rename Section ------ // Brief: Classes, methods or attributes needs to be renamed @@ -118,8 +116,6 @@ using namespace cc::render; %attribute(cc::render::BasicPipeline, cc::render::PipelineType, type, getType); %attribute(cc::render::BasicPipeline, cc::render::PipelineCapabilities, capabilities, getCapabilities); %attribute(cc::render::RenderSubpassBuilder, bool, showStatistics, getShowStatistics, setShowStatistics); -%attribute(cc::render::SceneVisitor, cc::pipeline::PipelineSceneData*, pipelineSceneData, getPipelineSceneData); -%attribute(cc::render::SceneTask, cc::render::TaskType, taskType, getTaskType); // ----- Import Section ------ // Brief: Import header files which are depended by 'Include Section' From b21499ffce8182853c2e71155a215e8c324753dc Mon Sep 17 00:00:00 2001 From: bofeng-song Date: Wed, 19 Jul 2023 10:38:20 +0800 Subject: [PATCH 24/26] Fix potential error: cache invalid player due to object's destroy (#15746) * Fix potential error: cache invalid player due to object's destroy --- cocos/audio/audio-source.ts | 74 ++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 26 deletions(-) diff --git a/cocos/audio/audio-source.ts b/cocos/audio/audio-source.ts index 7f966341c8b..07f35a44f39 100644 --- a/cocos/audio/audio-source.ts +++ b/cocos/audio/audio-source.ts @@ -22,7 +22,7 @@ THE SOFTWARE. */ -import { AudioPlayer } from 'pal/audio'; +import { AudioPlayer, OneShotAudio } from 'pal/audio'; import { ccclass, help, menu, tooltip, type, range, serializable } from 'cc.decorator'; import { AudioPCMDataView, AudioState } from '../../pal/audio/type'; import { Component } from '../scene-graph/component'; @@ -59,6 +59,7 @@ export class AudioSource extends Component { @type(AudioClip) protected _clip: AudioClip | null = null; protected _player: AudioPlayer | null = null; + private _hasRegisterListener: boolean = false; @serializable protected _loop = false; @@ -78,9 +79,7 @@ export class AudioSource extends Component { private _resetPlayer (): void { if (this._player) { audioManager.removePlaying(this._player); - this._player.offEnded(); - this._player.offInterruptionBegin(); - this._player.offInterruptionEnd(); + this._unregisterListener(); this._player.destroy(); this._player = null; } @@ -137,6 +136,14 @@ export class AudioSource extends Component { // clear old player this._resetPlayer(); this._player = player; + this._syncStates(); + this.node?.emit(_LOADED_EVENT); + }).catch((e) => {}); + } + + private _registerListener (): void { + if (!this._hasRegisterListener && this._player) { + const player = this._player; player.onEnded(() => { audioManager.removePlaying(player); this.node?.emit(AudioSourceEventType.ENDED, this); @@ -145,11 +152,21 @@ export class AudioSource extends Component { audioManager.removePlaying(player); }); player.onInterruptionEnd(() => { - audioManager.addPlaying(player); + if (this._player === player) { + audioManager.addPlaying(player); + } }); - this._syncStates(); - this.node?.emit(_LOADED_EVENT); - }).catch((e) => {}); + this._hasRegisterListener = true; + } + } + + private _unregisterListener (): void { + if (this._player && this._hasRegisterListener) { + this._player.offEnded(); + this._player.offInterruptionBegin(); + this._player.offInterruptionEnd(); + this._hasRegisterListener = false; + } } /** @@ -231,8 +248,7 @@ export class AudioSource extends Component { public onDestroy (): void { this.stop(); - this._player?.destroy(); - this._player = null; + this.clip = null;// It will trigger _syncPlayer then call resetPlayer } /** * @en @@ -332,16 +348,21 @@ export class AudioSource extends Component { this._operationsBeforeLoading.push('play'); return; } + this._registerListener(); audioManager.discardOnePlayingIfNeeded(); // Replay if the audio is playing if (this.state === AudioState.PLAYING) { this._player?.stop().catch((e) => {}); } const player = this._player; - this._player?.play().then(() => { - audioManager.addPlaying(player!); - this.node?.emit(AudioSourceEventType.STARTED, this); - }).catch((e) => {}); + if (player) { + player.play().then(() => { + this.node?.emit(AudioSourceEventType.STARTED, this); + }).catch((e) => { + audioManager.removePlaying(player); + }); + audioManager.addPlaying(player); + } } /** @@ -355,10 +376,7 @@ export class AudioSource extends Component { this._operationsBeforeLoading.push('pause'); return; } - const player = this._player; - this._player?.pause().then(() => { - audioManager.removePlaying(player!); - }).catch((e) => {}); + this._player?.pause().catch((e) => {}); } /** @@ -372,10 +390,10 @@ export class AudioSource extends Component { this._operationsBeforeLoading.push('stop'); return; } - const player = this._player; - this._player?.stop().then(() => { - audioManager.removePlaying(player!); - }).catch((e) => {}); + if (this._player) { + this._player.stop().catch((e) => {}); + audioManager.removePlaying(this._player); + } } /** @@ -391,18 +409,22 @@ export class AudioSource extends Component { console.error('Invalid audio clip'); return; } + let player: OneShotAudio; AudioPlayer.loadOneShotAudio(clip._nativeAsset.url, this._volume * volumeScale, { audioLoadMode: clip.loadMode, }).then((oneShotAudio) => { + player = oneShotAudio; audioManager.discardOnePlayingIfNeeded(); - oneShotAudio.onPlay = (): void => { - audioManager.addPlaying(oneShotAudio); - }; oneShotAudio.onEnd = (): void => { audioManager.removePlaying(oneShotAudio); }; oneShotAudio.play(); - }).catch((e): void => {}); + audioManager.addPlaying(oneShotAudio); + }).catch((e): void => { + if (player) { + audioManager.removePlaying(player); + } + }); } protected _syncStates (): void { From 839a086ecadeaccecf9f2589e1d5da7453dee6d7 Mon Sep 17 00:00:00 2001 From: bofeng-song Date: Wed, 19 Jul 2023 10:38:59 +0800 Subject: [PATCH 25/26] Add smallestScreenSize to Manifest.xml (#15763) --- templates/android/template/app/AndroidManifest.xml | 4 ++-- templates/android/template/instantapp/AndroidManifest.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/android/template/app/AndroidManifest.xml b/templates/android/template/app/AndroidManifest.xml index 7aeabfd8f3c..a85bb7ca777 100644 --- a/templates/android/template/app/AndroidManifest.xml +++ b/templates/android/template/app/AndroidManifest.xml @@ -20,7 +20,7 @@ diff --git a/templates/android/template/instantapp/AndroidManifest.xml b/templates/android/template/instantapp/AndroidManifest.xml index 5aee933752e..0216ac9da8f 100644 --- a/templates/android/template/instantapp/AndroidManifest.xml +++ b/templates/android/template/instantapp/AndroidManifest.xml @@ -25,7 +25,7 @@ From 3b24391a3d25d78868d72dcfc6180e3d247f3843 Mon Sep 17 00:00:00 2001 From: Zhou Zhenglong Date: Wed, 19 Jul 2023 15:11:54 +0800 Subject: [PATCH 26/26] fix eslint --- cocos/gfx/base/define.ts | 1 - cocos/gfx/webgl/webgl-commands.ts | 1 - cocos/gfx/webgl2/webgl2-commands.ts | 1 - 3 files changed, 3 deletions(-) diff --git a/cocos/gfx/base/define.ts b/cocos/gfx/base/define.ts index 137a782e8e2..ed23330b928 100644 --- a/cocos/gfx/base/define.ts +++ b/cocos/gfx/base/define.ts @@ -2444,4 +2444,3 @@ export function formatAlignment (format: Format): FormatAlignment { export function alignTo (size: number, alignment: number): number { return Math.ceil(size / alignment) * alignment; } - diff --git a/cocos/gfx/webgl/webgl-commands.ts b/cocos/gfx/webgl/webgl-commands.ts index 343d7377ede..7355454b65b 100644 --- a/cocos/gfx/webgl/webgl-commands.ts +++ b/cocos/gfx/webgl/webgl-commands.ts @@ -2992,4 +2992,3 @@ export function WebGLCmdFuncBlitTexture ( // logic different from native, because framebuffer map is not implemented in webgl device.blitManager.draw(srcTexture, dstTexture, regions as TextureBlit[], filter); } - diff --git a/cocos/gfx/webgl2/webgl2-commands.ts b/cocos/gfx/webgl2/webgl2-commands.ts index 355b4423f3f..698558c8a6f 100644 --- a/cocos/gfx/webgl2/webgl2-commands.ts +++ b/cocos/gfx/webgl2/webgl2-commands.ts @@ -3373,4 +3373,3 @@ export function WebGL2CmdFuncBlitTexture ( cache.glFramebuffer = origDrawFBO; } } -