mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 19:42:39 +08:00
Fix the issue of inconsistent attachment sizes (#18455)
* Fix the issue of inconsistent attachment sizes * Update
This commit is contained in:
@@ -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!;
|
||||
|
||||
Reference in New Issue
Block a user