mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
fix(rendering): 修复 addShadingRateTexture 重复注册时的无限递归 (#406)
同名资源已存在时调用 updateShadingRateTexture 更新尺寸,保留资源 ID 和资源数量。 Co-authored-by: vanitynie <vanitynie@qq.com>
This commit is contained in:
@@ -1624,7 +1624,7 @@ export class WebPipeline extends WebSetter implements BasicPipeline {
|
||||
addShadingRateTexture (name: string, width: number, height: number, residency = ResourceResidency.MANAGED): number {
|
||||
const resID = this._resourceGraph.find(name);
|
||||
if (resID !== 0xFFFFFFFF) {
|
||||
this.addShadingRateTexture(name, width, height);
|
||||
this.updateShadingRateTexture(name, width, height);
|
||||
return resID;
|
||||
}
|
||||
const desc = new ResourceDesc();
|
||||
|
||||
Reference in New Issue
Block a user