Fix the issue of inconsistent attachment sizes (#18455)

* Fix the issue of inconsistent attachment sizes

* Update
This commit is contained in:
GengineJS
2025-03-13 17:50:46 +08:00
committed by GitHub
parent 7e753818d5
commit f02e9438fc
6 changed files with 9 additions and 9 deletions
+2 -1
View File
@@ -39,6 +39,7 @@ import {
Filter,
TextureBlit,
DescriptorSetInfo,
Format,
} from '../base/define';
import { Framebuffer } from '../base/framebuffer';
import { InputAssembler } from '../base/input-assembler';
@@ -232,7 +233,7 @@ export class WebGPUCommandBuffer extends CommandBuffer {
this._nativePassDesc.colorAttachments[i].clearValue = [clearColors[i].x, clearColors[i].y, clearColors[i].z, clearColors[i].w];
}
if (this._wgpuRenderPass.depthStencilAttachment) {
if (this._wgpuRenderPass.depthStencilAttachment?.format !== Format.UNKNOWN) {
const tex = gpuFramebuffer.gpuDepthStencilTexture?.gpuTexture;
const depthTex = tex ? tex.createView() : swapchain.gpuDepthStencilTextureView;
const depthStencilAttachment = this._nativePassDesc.depthStencilAttachment!;