[金属] 渲染/计算步骤会在最后强制命令缓冲区完成
作者: lukaschod创建于 2024年5月24日更新于 2026年9月18日
标签area: performancebackend: metal
Description During my investigation of case #5721, I noticed that wgpu produces a lot of command buffers. Each render or compute pass forces a command buffer to finish. After further investigation, I found that this happens because of the resource state tracking code, which injects additional command buffers with the correct resource state changes. This is only relevant in Vulkan, Dx12, and maybe some other APIs that require explicit resource state tracking; it is not required for Metal. As a result, Metal simply produces a lot of empty command buffers and unnecessary splitting.
内容来源: gfx-rs/wgpu