DiligentCore icon indicating copy to clipboard operation
DiligentCore copied to clipboard

[bug] WebGPU: Begin/EndDebugGroup broken

Open WangHoi opened this issue 1 year ago • 3 comments

Problem

Bug only happens in WebGPU backend, D3D11/12/Vulkan works.

WebGPU validation error:

Diligent Engine: ERROR: WebGPU: Command cannot be recorded while [CommandEncoder (unlabeled)] is locked and [ComputePassEncoder (unlabeled)] is currently open.
 - While encoding [CommandEncoder (unlabeled)].PopDebugGroup().

Environment

Diligent Engine: newest master branch OS: Win11 24H2 Hardware: Ryzen AI9 370HX, RTX 4060 Laptop.

Sample to re-produce:

wgpu_dbgrp.zip

Simplified sample: a DispatchCompute, follows by two Draw.

WangHoi avatar Oct 04 '24 07:10 WangHoi

Personal reason suspect:

Outer command pass debug group commands, submitted with compute pass encoder open.

WangHoi avatar Oct 04 '24 07:10 WangHoi

In WebGPU, you can have a debug group that either spans draw commands or compute commands. Debug groups that cover both draw and compute don't work.

TheMostDiligent avatar Oct 04 '24 19:10 TheMostDiligent

The sample is three Debug group, one cover just Compute, two cover just Draw. No mixed debug spans.

WangHoi avatar Oct 05 '24 01:10 WangHoi