-
Notifications
You must be signed in to change notification settings - Fork 345
Closed
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specificationfeature requestA request for a new GPU feature exposed in the APIA request for a new GPU feature exposed in the API
Milestone
Description
Following up on #331, we could make things even simpler for developers if we'd support GPUBuffer in GPUBindingResource. Because we don't, developers have to think about treating GPUBuffer differently in simple cases (where size and offset don't matter). By simply adding GPUBuffer in GPUBindingResource, this would allow developers to write the following code:
const bindGroup = device.createBindGroup({
layout: pipeline.getBindGroupLayout(0),
entries: [
{ binding: 0, resource: mySampler },
{ binding: 1, resource: myTextureView },
{ binding: 2, resource: myExternalTexture },
- { binding: 3, resource: { buffer: myBuffer } }, // Why is that different?
+ { binding: 3, resource: myBuffer }, // Yeah for consistency in simple cases!
],
});Here's the proposed IDL modification:
- typedef (GPUSampler or GPUTextureView or GPUBufferBinding or GPUExternalTexture) GPUBindingResource;
+ typedef (GPUSampler or GPUTextureView or GPUBuffer or GPUBufferBinding or GPUExternalTexture) GPUBindingResource;iampi31415
Metadata
Metadata
Assignees
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specificationfeature requestA request for a new GPU feature exposed in the APIA request for a new GPU feature exposed in the API