Skip to content

push_debug_group requires cfg!(debug_assertions) under Vulkan #3954

Closed
@Aaron1011

Description

Description

The RenderPass::push_debug_group method is very useful for debugging a complex application. However, wgpu-core only enables the required InstanceFlags::DEBUG when cfg!(debug_assertions) is enabled:

https://github.com/gfx-rs/wgpu/blob/4ab9dbea8f7efbad518c3e39db07c30177a1a6af/wgpu-core/src/instance.rs#L77C20-L80

I couldn't find this documented anywhere. Ideally, this could be explicitly enabled when calling wgpu::Instance::new, without the need to turn on debug assertions for the entire program.

Repro steps
Run any of the examples that use encoder.push_debug_group (e.g. examples/cube) with and without debug assertions (for example, in both debug and release mode) under a program like RenderDoc.

Expected vs observed behavior
Debug groups are not shown in Renderdoc unless debug assertions are enabled.

Extra materials

Platform
wgpu 0.16.2
Linux
Vulkan

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions