commit | 52fe07d05ae285c970f115bc7672f017e51fa74f | [log] [tgz] |
---|---|---|
author | Colin Blundell <blundell@chromium.org> | Wed Jan 10 12:55:49 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Jan 10 12:55:49 2024 +0000 |
tree | a6fd0f0017545b50d64dc5b0a3c793b29cb4d7c1 | |
parent | eb5ed1ef6957feb1cc8c80b601287e51407534ae [diff] |
[SharedTextureMemory] Add documentation of texture creation constraints These constraints are enforced here [1]. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/dawn/src/dawn/native/SharedTextureMemory.cpp;l=159-168?q=SharedTextureMemory.cp&ss=chromium Change-Id: Ib875f6730637f789ab9ed3fe0c0ccd8609783f9c Bug: dawn:2152 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/168649 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/docs/dawn/features/shared_texture_memory.md b/docs/dawn/features/shared_texture_memory.md index b499859..14293cf 100644 --- a/docs/dawn/features/shared_texture_memory.md +++ b/docs/dawn/features/shared_texture_memory.md
@@ -43,6 +43,13 @@ wgpu::Texture texture = memory.CreateTexture(&textureDesc); ``` +Note: There are restrictions on the configuration that can be requested for +textures created from SharedTextureMemory objects: +- they must be single-sampled +- they must be 2D +- they must have a single mip level +- they must have an array layer count of 1 + Textures created from shared texture memory are not valid to use inside a queue operation until access to the memory is explicitly started using `BeginAccess`. Access is ended using `EndAccess`. For example: ```c++