-
Notifications
You must be signed in to change notification settings - Fork 335
Describe tight-packing of image-copy ops, including depth/stencil #2331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6582137
to
6fd03f7
Compare
6fd03f7
to
0b22936
Compare
spec/index.bs
Outdated
WebGPU provides {{GPUCommandEncoder/copyBufferToTexture()}} for buffer-to-texture copies and | ||
{{GPUCommandEncoder/copyTextureToBuffer()}} for texture-to-buffer copies. | ||
|
||
Pixels are tightly-packed in the linear-memory layout of each row of an image copy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe worth explaining what this is, then adding a note saying "this is often referred to as linear memory layout"?
I.e. say that texel (i+1, j) follows (i, j), and row (, j+1) follows row (, j).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to sidestep this by only explaining the layout of each individual row, not the whole image, but we do need this somewhere eventually. GPUImageDataLayout has TODOs to describe linear memory layouts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved this to that section (which makes more sense) and rewrote it in terms of texel blocks.
And add a note on how to read/write depth/stencil formats which are not copyable.
Fixes #652 (
remaining open questions there are being split out to separate issuesdecided not to do that, just added notes in the spec).CC #2328
Preview | Diff