-
Notifications
You must be signed in to change notification settings - Fork 329
Closed
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specification
Milestone
Description
copyBufferToBuffer
currently has this signature:
encoder.copyBufferToBuffer(source, sourceOffset, destination, destinationOffset, size)
Where all 5 parameters are required. So far, 9 times out of 10 I'm copying one entire buffer to another entire buffer, so I'm wondering, could we make destinationOffset
default to 0 and size
default to min(sourceBuffer.size - sourceOffset, destinationBuffer.size - destinationOffset)
?
Then I could just do
encoder.copyBufferToBuffer(someStorageBuffer, 0, someMappableBuffer)
vs what I have to do now
encoder.copyBufferToBuffer(someStorageBuffer, 0, someMappableBuffer, 0, someMappableBuffer.size)
It's really only a minor inconvenience so not a big deal but I thought I'd ask anyway. writeBuffer
has defaults for offset and size.
kainino0x
Metadata
Metadata
Assignees
Labels
apiWebGPU APIWebGPU APIapi resolvedResolved - waiting for a change to the API specificationResolved - waiting for a change to the API specification