-
Notifications
You must be signed in to change notification settings - Fork 361
Closed
Labels
Description
Given that buffer/texture usage belongs to an internal state of a resource (users don't set it explicitly), and we allow multiple read-only usages to co-exist, what is the point to distinguish between different read-only usages (from the specification point of view) at all?
Perhaps, we should write the specification in such a way that there is a single "Read" usage, and a resource can only be in one of the allowed usages at a time. I.e. the rules become simpler, and usage becomes purely exclusive.
For example, buffer usage rules would be rewritten as:
Buffers have the following usages (and commands inducing that usage):
READfor buffers that are read only by the following commands:WebGPUCommandEncoder.setVertexBuffersparameter `buffersWebGPUCommandEncoder.setIndexBufferparameterbufferWebGPUCommandEncoder.{draw|drawIndexed|dispatch}IndirectparameterindirectBuffersetBindGroupparameterbindGroupcreated with one of the following types:- "uniform-buffer"
- "dynamic-uniform-buffer"
copyBufferToBufferparametersrccopyBufferToTextureparametersource.buffer
STORAGEforsetBindGroupparameterbindGroupcreated with one the following types:- "storage-buffer"
- "dynamic-storage-buffer"
TRANSFERfor buffers used as the copy destination ofcopy{Buffer,Texture}ToBuffer