这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow binding zero-sized GPUBufferBindings #5312

@magcius

Description

@magcius

If I create a bind group layout with buffer bindings A, B, and C. If a shader only uses buffer A, then it would be nice if I could bind a GPUBufferBinding with size 0 for slots B and C, however, the steps for creating buffer bindings don't allow for zero-sized buffers:

The bound part designated by bufferBinding.offset and bufferBinding.size resides inside the buffer and has non-zero size.

This strikes me as an unusual requirement; as long as the matching pipeline's minBindingSize is 0, I would expect it to be allowed.

See also #2134.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU APIbugneeds-cts-issueThis change requires tests (or would need tests if accepted), but may not have a CTS issue filed yet

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions