Skip to content

Add more/better WebGPU labels #32037

@greggman

Description

@greggman

Description

In trying to debug WebGPU I found a few places that better/more labels would have been super helpful.

Solution

Label more things where possible.

Examples:

  • Label Textures: It would be super helpful if they were labeled "shadowDepthMap" and "offscreenColorTexture", "offscreenDepthTexture". For loaded image, the filename would good, so "https://example.com/path/bricks.jpg" the label "bricks.jpg"

  • Label Buffers: 'cubePositions', 'sphereNormals', 'suzanne.glft/normals', 'sharedProjectionUniforms', 'materialUniforms(nameOfMaterial)'

  • Label render/compute passes: 'shadowMapPass', 'opaquePass'

  • Label encoders: There are labeled currently but the label is generic "renderContext". If there is a more descriptive name

  • Label textureViews:" (this is less important because we can hack labels onto texture views if the texture itself has a label)

  • Label bindGroups: (this is probably difficult to decide on a name but might be helpful)

Alternatives

leave this to be hand labeled after capture while debugging?

Additional context

Tools like the webgpu_inspector and webgpu_recorder use/display labels. It makes it helpful to look at the capture to see 'depthMapTexture' instead of 'texture37'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions