diff --git a/cocos/rendering/custom/compiler.ts b/cocos/rendering/custom/compiler.ts index 225ec4252c..f53c98e425 100644 --- a/cocos/rendering/custom/compiler.ts +++ b/cocos/rendering/custom/compiler.ts @@ -22,7 +22,6 @@ THE SOFTWARE. ****************************************************************************/ import { Buffer, Framebuffer, Texture, Viewport } from '../../gfx'; -import { genHashValue } from './define'; import { VectorGraphColorMap } from './effect'; import { DefaultVisitor, depthFirstSearch, ReferenceGraphView } from './graph'; import { LayoutGraphData } from './layout-graph'; @@ -199,7 +198,6 @@ class PassVisitor implements RenderGraphVisitor { resourceGraph.visitVertex(this._resVisitor, vertID); } } - genHashValue(pass); } } applyID (id: number, resId: number): void { diff --git a/cocos/rendering/custom/web-pipeline.ts b/cocos/rendering/custom/web-pipeline.ts index 465e66d653..222ee961bb 100644 --- a/cocos/rendering/custom/web-pipeline.ts +++ b/cocos/rendering/custom/web-pipeline.ts @@ -1663,13 +1663,16 @@ export class WebPipeline extends WebSetter implements BasicPipeline { this._compiler = new Compiler(this, this._renderGraph, this._resourceGraph, this._lg); } this._compiler.compile(this._renderGraph); - } else { - this._renderGraph.x.forEach((vert) => { - if (vert.t === RenderGraphValue.RasterPass) { - genHashValue(vert.j as RasterPass); - } - }); } + this._renderGraph.x.forEach((vert, v) => { + if (vert.t !== RenderGraphValue.RasterPass) { + return; + } + if (DEBUG && !this._renderGraph!.getValid(v)) { + return; + } + genHashValue(vert.j as RasterPass); + }); } execute (): void {