-
Notifications
You must be signed in to change notification settings - Fork 345
Closed
Description
How about making GPUBufferBinding size optional? If not specified, it would be the same as the buffer size passed in the binding resource of device.createBindGroup()?
I believe this would make code easier to read and digest for newcomers.
const gpuBufferSize = 4;
const gpuBuffer = device.createBuffer({
size: gpuBufferSize,
usage: GPUBufferUsage.STORAGE
});
const bindGroup = device.createBindGroup({
layout: bindGroupLayout,
bindings: [
{
binding: 0,
resource: {
buffer: myGpuBuffer,
- size: gpuBufferSize
}
}
]
});Metadata
Metadata
Assignees
Labels
No labels