Conversation
| }; | ||
|
|
||
| typedef u32 WebGPUTextureAspectFlags; | ||
| interface WebGPUTextureAspect { |
There was a problem hiding this comment.
I assumed this would be an enum instead of a bitfield because of the following line in the vulkan spec for the validation of VkBufferImageCopy:
The aspectMask member of imageSubresource must only have a single bit set
That said it would be ok to allow both aspects to be copied at once and split the copy on the Vulkan backend
There was a problem hiding this comment.
FYI, Vulkan doesn't require an implementation to support buffer-to-texture (or texture-to-texture for the matter) copies with depth-stencil involved. See Table 31.19. Mandatory format support: 64-bit/uneven channels and depth/stencil.
I don't think we want to support copying depth/stencil separately, although I'd be open to discuss this :)
Maybe this aspect flag isn't needed here at all then?
There was a problem hiding this comment.
The aspect flag is also used for texture views and sampling. It's how you choose between sampling the depth or stencil components of a DS texture.
There was a problem hiding this comment.
Sure, and for texture views it doesn't make sense for it to be an enum. I suggest to leave it as bitflags and remove the use of it from WebGPUTextureCopyView
|
This seems non-controversial, landing to unblock #90 |
The changes in #69 reference
WebGPUTextureAspectbut it wasn't added in the PR.Not sure if it has been discussed outside #69 yet, but I guess something like this definition would be reasonable.