Add experimental stubs for shared texture memory and fences

Bug: dawn:1745
Change-Id: Ie664d9eb4343627809e0772cd9653ac439f624c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/142402
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
diff --git a/dawn.json b/dawn.json
index 19ab4d2..86f8862 100644
--- a/dawn.json
+++ b/dawn.json
@@ -1118,6 +1118,22 @@
                 ]
             },
             {
+                "name": "import shared texture memory",
+                "returns": "shared texture memory",
+                "tags": ["dawn", "native"],
+                "args": [
+                    {"name": "descriptor", "type": "shared texture memory descriptor", "annotation": "const*"}
+                ]
+            },
+            {
+                "name": "import shared fence",
+                "returns": "shared fence",
+                "tags": ["dawn", "native"],
+                "args": [
+                    {"name": "descriptor", "type": "shared fence descriptor", "annotation": "const*"}
+                ]
+            },
+            {
                 "name": "create error texture",
                 "returns": "texture",
                 "tags": ["dawn"],
@@ -1433,6 +1449,335 @@
             {"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"}
         ]
     },
+    "shared texture memory": {
+        "category": "object",
+        "tags": ["dawn", "native"],
+        "methods": [
+            {
+                "name": "set label",
+                "returns": "void",
+                "args": [
+                    {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
+                ]
+            },
+            {
+                "name": "get properties",
+                "returns": "void",
+                "args": [
+                    {"name": "properties", "type": "shared texture memory properties", "annotation": "*"}
+                ]
+            },
+            {
+                "name": "create texture",
+                "returns": "texture",
+                "args": [
+                    {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
+                ]
+            },
+            {
+                "name": "begin access",
+                "args": [
+                    {"name": "texture", "type": "texture"},
+                    {"name": "descriptor", "type": "shared texture memory begin access descriptor", "annotation": "const*"}
+                ]
+            },
+            {
+                "name": "end access",
+                "args": [
+                    {"name": "texture", "type": "texture"},
+                    {"name": "descriptor", "type": "shared texture memory end access state", "annotation": "*"}
+                ]
+            }
+        ]
+    },
+    "shared texture memory properties": {
+        "category": "structure",
+        "extensible": "out",
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "usage", "type": "texture usage"},
+            {"name": "size", "type": "extent 3D"},
+            {"name": "format", "type": "texture format"}
+        ]
+    },
+    "shared texture memory descriptor": {
+        "category": "structure",
+        "extensible": "in",
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
+        ]
+    },
+    "shared texture memory vk image descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "vk format", "type": "int32_t"},
+            {"name": "vk usage flags", "type": "int32_t"},
+            {"name": "vk extent 3D", "type": "extent 3D"}
+        ]
+    },
+    "shared texture memory vk dedicated allocation descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "dedicated allocation", "type": "bool"}
+        ]
+    },
+    "shared texture memory a hardware buffer descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "void *"}
+        ]
+    },
+    "shared texture memory dma buf descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "memory FD", "type": "int"},
+            {"name": "allocation size", "type": "uint64_t"},
+            {"name": "drm modifier", "type": "uint64_t"},
+            {"name": "plane count", "type": "size_t"},
+            {"name": "plane offsets", "type": "uint64_t", "annotation": "const*", "length": "plane count"},
+            {"name": "plane strides", "type": "uint32_t", "annotation": "const*", "length": "plane count"}
+        ]
+    },
+    "shared texture memory opaque FD descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "memory FD", "type": "int"},
+            {"name": "allocation size", "type": "uint64_t"}
+        ]
+    },
+    "shared texture memory zircon handle descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "memory FD", "type": "uint32_t"},
+            {"name": "allocation size", "type": "uint64_t"}
+        ]
+    },
+    "shared texture memory DXGI shared handle descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "handle", "type": "void *"}
+        ]
+    },
+    "shared texture memory IO surface descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "io surface", "type": "void *"}
+        ]
+    },
+    "shared texture memory EGL image descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory descriptor"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "image", "type": "void *"}
+        ]
+    },
+    "shared texture memory begin access descriptor": {
+        "category": "structure",
+        "extensible": "in",
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "initialized", "type": "bool"},
+            {"name": "fence count", "type": "size_t"},
+            {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"},
+            {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"}
+        ]
+    },
+    "shared texture memory end access state": {
+        "category": "structure",
+        "extensible": "out",
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "initialized", "type": "bool"},
+            {"name": "fence count", "type": "size_t"},
+            {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"},
+            {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"}
+        ]
+    },
+    "shared texture memory vk image layout begin state": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared texture memory begin access descriptor"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "old layout", "type": "int32_t"},
+            {"name": "new layout", "type": "int32_t"}
+        ]
+    },
+    "shared texture memory vk image layout end state": {
+        "category": "structure",
+        "chained": "out",
+        "chain roots": ["shared texture memory end access state"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "old layout", "type": "int32_t"},
+            {"name": "new layout", "type": "int32_t"}
+        ]
+    },
+    "shared fence": {
+        "category": "object",
+        "tags": ["dawn", "native"],
+        "methods": [
+            {
+                "name": "export info",
+                "returns": "void",
+                "args": [
+                    {"name": "info", "type": "shared fence export info", "annotation": "*"}
+                ]
+            }
+        ]
+    },
+    "shared fence descriptor": {
+        "category": "structure",
+        "extensible": "in",
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
+        ]
+    },
+    "shared fence vk semaphore opaque FD descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared fence descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "int"}
+        ]
+    },
+    "shared fence vk semaphore sync FD descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared fence descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "int"}
+        ]
+    },
+    "shared fence vk semaphore zircon handle descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared fence descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "uint32_t"}
+        ]
+    },
+    "shared fence DXGI shared handle descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared fence descriptor"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "void *"}
+        ]
+    },
+    "shared fence MTL shared event descriptor": {
+        "category": "structure",
+        "chained": "in",
+        "chain roots": ["shared fence descriptor"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "shared event", "type": "void *"}
+        ]
+    },
+    "shared fence type": {
+        "category": "enum",
+        "tags": ["dawn", "native"],
+        "values": [
+            {"value": 0, "name": "undefined", "valid": false},
+            {"value": 1, "name": "vk semaphore opaque FD"},
+            {"value": 2, "name": "vk semaphore sync FD"},
+            {"value": 3, "name": "vk semaphore zircon handle"},
+            {"value": 4, "name": "DXGI shared handle"},
+            {"value": 5, "name": "MTL shared event"}
+        ]
+    },
+    "shared fence export info": {
+        "category": "structure",
+        "extensible": "out",
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "type", "type": "shared fence type"}
+        ]
+    },
+    "shared fence vk semaphore opaque FD export info": {
+        "category": "structure",
+        "chained": "out",
+        "chain roots": ["shared fence export info"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "int"}
+        ]
+    },
+    "shared fence vk semaphore sync FD export info": {
+        "category": "structure",
+        "chained": "out",
+        "chain roots": ["shared fence export info"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "int"}
+        ]
+    },
+    "shared fence vk semaphore zircon handle export info": {
+        "category": "structure",
+        "chained": "out",
+        "chain roots": ["shared fence export info"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "uint32_t"}
+        ]
+    },
+    "shared fence DXGI shared handle export info": {
+        "category": "structure",
+        "chained": "out",
+        "chain roots": ["shared fence export info"],
+        "tags": ["dawn", "native"],
+        "members": [
+            {"name": "handle", "type": "void *"}
+        ]
+    },
+    "shared fence MTL shared event export info": {
+        "category": "structure",
+        "chained": "out",
+        "chain roots": ["shared fence export info"],
+        "tags": ["dawn", "native"],
+        "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
+        "members": [
+            {"name": "shared event", "type": "void *"}
+        ]
+    },
     "feature name": {
         "category": "enum",
         "values": [
@@ -1461,7 +1806,22 @@
             {"value": 1010, "name": "MSAA render to single sampled", "tags": ["dawn"]},
             {"value": 1011, "name": "dual source blending", "tags": ["dawn"]},
             {"value": 1012, "name": "D3D11 multithread protected", "tags": ["dawn", "native"]},
-            {"value": 1013, "name": "ANGLE texture sharing", "tags": ["dawn", "native"]}
+            {"value": 1013, "name": "ANGLE texture sharing", "tags": ["dawn", "native"]},
+
+            {"value": 1100, "name": "shared texture memory vk dedicated allocation", "tags": ["dawn", "native"]},
+            {"value": 1101, "name": "shared texture memory a hardware buffer", "tags": ["dawn", "native"]},
+            {"value": 1102, "name": "shared texture memory dma buf", "tags": ["dawn", "native"]},
+            {"value": 1103, "name": "shared texture memory opaque FD", "tags": ["dawn", "native"]},
+            {"value": 1104, "name": "shared texture memory zircon handle", "tags": ["dawn", "native"]},
+            {"value": 1105, "name": "shared texture memory DXGI shared handle", "tags": ["dawn", "native"]},
+            {"value": 1106, "name": "shared texture memory D3D11 texture 2D", "tags": ["dawn", "native"]},
+            {"value": 1107, "name": "shared texture memory IO surface", "tags": ["dawn", "native"]},
+            {"value": 1108, "name": "shared texture memory EGL image", "tags": ["dawn", "native"]},
+            {"value": 1200, "name": "shared fence vk semaphore opaque FD", "tags": ["dawn", "native"]},
+            {"value": 1201, "name": "shared fence vk semaphore sync FD", "tags": ["dawn", "native"]},
+            {"value": 1202, "name": "shared fence vk semaphore zircon handle", "tags": ["dawn", "native"]},
+            {"value": 1203, "name": "shared fence DXGI shared handle", "tags": ["dawn", "native"]},
+            {"value": 1204, "name": "shared fence MTL shared event", "tags": ["dawn", "native"]}
         ]
     },
     "filter mode": {
@@ -2230,7 +2590,7 @@
 
     "request device callback": {
         "category": "function pointer",
-        "_TODO": "crbug.com/1234617: Revisit optional status of device once requestDevice can return lost devices",
+        "_comment": "crbug.com/1234617: Revisit optional status of device once requestDevice can return lost devices",
         "args": [
             {"name": "status", "type": "request device status"},
             {"name": "device", "type": "device", "optional": true},
@@ -2643,7 +3003,32 @@
             {"value": 1010, "name": "request adapter options LUID", "tags": ["dawn", "native"]},
             {"value": 1011, "name": "request adapter options get GL proc", "tags": ["dawn", "native"]},
             {"value": 1012, "name": "dawn multisample state render to single sampled", "tags": ["dawn"]},
-            {"value": 1013, "name": "dawn render pass color attachment render to single sampled", "tags": ["dawn"]}
+            {"value": 1013, "name": "dawn render pass color attachment render to single sampled", "tags": ["dawn"]},
+
+            {"value": 1100, "name": "shared texture memory vk image descriptor", "tags": ["dawn", "native"]},
+            {"value": 1101, "name": "shared texture memory vk dedicated allocation descriptor", "tags": ["dawn", "native"]},
+            {"value": 1102, "name": "shared texture memory a hardware buffer descriptor", "tags": ["dawn", "native"]},
+            {"value": 1103, "name": "shared texture memory dma buf descriptor", "tags": ["dawn", "native"]},
+            {"value": 1104, "name": "shared texture memory opaque FD descriptor", "tags": ["dawn", "native"]},
+            {"value": 1105, "name": "shared texture memory zircon handle descriptor", "tags": ["dawn", "native"]},
+            {"value": 1106, "name": "shared texture memory DXGI shared handle descriptor", "tags": ["dawn", "native"]},
+            {"value": 1107, "name": "shared texture memory D3D11 texture 2D descriptor", "tags": ["dawn", "native"]},
+            {"value": 1108, "name": "shared texture memory IO surface descriptor", "tags": ["dawn", "native"]},
+            {"value": 1109, "name": "shared texture memory EGL image descriptor", "tags": ["dawn", "native"]},
+            {"value": 1200, "name": "shared texture memory initialized begin state", "tags": ["dawn", "native"]},
+            {"value": 1201, "name": "shared texture memory initialized end state", "tags": ["dawn", "native"]},
+            {"value": 1202, "name": "shared texture memory vk image layout begin state", "tags": ["dawn", "native"]},
+            {"value": 1203, "name": "shared texture memory vk image layout end state", "tags": ["dawn", "native"]},
+            {"value": 1204, "name": "shared fence vk semaphore opaque FD descriptor", "tags": ["dawn", "native"]},
+            {"value": 1205, "name": "shared fence vk semaphore opaque FD export info", "tags": ["dawn", "native"]},
+            {"value": 1206, "name": "shared fence vk semaphore sync FD descriptor", "tags": ["dawn", "native"]},
+            {"value": 1207, "name": "shared fence vk semaphore sync FD export info", "tags": ["dawn", "native"]},
+            {"value": 1208, "name": "shared fence vk semaphore zircon handle descriptor", "tags": ["dawn", "native"]},
+            {"value": 1209, "name": "shared fence vk semaphore zircon handle export info", "tags": ["dawn", "native"]},
+            {"value": 1210, "name": "shared fence DXGI shared handle descriptor", "tags": ["dawn", "native"]},
+            {"value": 1211, "name": "shared fence DXGI shared handle export info", "tags": ["dawn", "native"]},
+            {"value": 1212, "name": "shared fence MTL shared event descriptor", "tags": ["dawn", "native"]},
+            {"value": 1213, "name": "shared fence MTL shared event export info", "tags": ["dawn", "native"]}
         ]
     },
     "texture": {
@@ -2995,6 +3380,9 @@
     "void const *": {
         "category": "native"
     },
+    "int": {
+        "category": "native"
+    },
     "int32_t": {
         "category": "native"
     },
diff --git a/docs/dawn/features/shared_fence.md b/docs/dawn/features/shared_fence.md
new file mode 100644
index 0000000..747de19
--- /dev/null
+++ b/docs/dawn/features/shared_fence.md
@@ -0,0 +1,15 @@
+# Shared Fence (Experimental!)
+
+## Overview
+
+A variety of features may be used to externally synchronize usage of resources on the GPU.
+
+- `wgpu::FeatureName::SharedFenceVkSemaphoreOpaqueFD`
+- `wgpu::FeatureName::SharedFenceVkSemaphoreSyncFD`
+- `wgpu::FeatureName::SharedFenceVkSemaphoreZirconHandle`
+- `wgpu::FeatureName::SharedFenceDXGISharedHandle`
+- `wgpu::FeatureName::SharedFenceMTLSharedEvent`
+
+TODO(crbug.com/dawn/1745): additional documentation
+
+Work-in-progress: https://docs.google.com/document/d/1uRGL6vE1mSbpWd2v_KU5--RT5EjTXtruwiC7Ri3ZKz4/edit
\ No newline at end of file
diff --git a/docs/dawn/features/shared_texture_memory.md b/docs/dawn/features/shared_texture_memory.md
new file mode 100644
index 0000000..276f332
--- /dev/null
+++ b/docs/dawn/features/shared_texture_memory.md
@@ -0,0 +1,80 @@
+# Shared Texture Memory (Experimental!)
+
+## Overview
+
+A variety of features may be used to import externally allocated shared texture memory.
+
+- `wgpu::FeatureName::SharedTextureMemoryAHardwareBuffer`
+- `wgpu::FeatureName::SharedTextureMemoryDmaBuf`
+- `wgpu::FeatureName::SharedTextureMemoryOpaqueFD`
+- `wgpu::FeatureName::SharedTextureMemoryZirconHandle`
+- `wgpu::FeatureName::SharedTextureMemoryDXGISharedHandle`
+- `wgpu::FeatureName::SharedTextureMemoryD3D11Texture2D`
+- `wgpu::FeatureName::SharedTextureMemoryIOSurface`
+
+Each memory type uses an extension struct chained on `wgpu::SharedTextureMemoryDescriptor` to create the memory. For example:
+
+```c++
+wgpu::SharedTextureMemoryFooBarDescriptor fooBarDesc = {
+  .fooBar = ...,
+};
+wgpu::SharedTextureMemoryDescriptor desc = {};
+desc.nextInChain = &fooBarDesc;
+
+wgpu::SharedTextureMemory memory = device.CreateSharedTextureMemory(&desc);
+```
+
+After creating the memory, the properties such as the supported `wgpu::TextureUsage` can be queried.
+```c++
+wgpu::SharedTextureMemoryProperties properties;
+memory.GetProperties(&properties);
+
+switch (properties.usage) {
+  // ... handle supported usage
+}
+```
+
+Then, a texture can be created from it. For example:
+```c++
+wgpu::TextureDescriptor textureDesc = {
+  // usage must be a subset of the texture memory's usage
+  .usage = properties.usage
+};
+wgpu::Texture texture = memory.CreateTexture(&textureDesc);
+```
+
+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++
+wgpu::TextureDescriptor textureDesc = { ... };
+wgpu::Texture texture = memory.CreateTexture(&textureDesc);
+
+// It is valid to create a bind group and encode commands
+// referencing the texture.
+wgpu::BindGroup bg = device.CreateBindGroup({..., texture, ... });
+wgpu::CommandEncoder encoder = device.CreateCommandEncoder();
+wgpu::ComputePass pass = encoder.BeginComputePass();
+// ...
+pass.SetBindGroup(0, bg);
+// ...
+pass.End();
+wgpu::CommandBuffer commandBuffer = encoder.Finish();
+
+// Begin/EndAccess must wrap usage of the texture on the queue.
+wgpu::SharedTextureMemoryBeginAccessDescriptor beginAccessDesc = { ... };
+memory.BeginAccess(texture, &beginAccessDesc);
+
+queue.writeTexture(texture, ...);
+queue.submit(1, &commandBuffer);
+
+wgpu::SharedTextureMemoryEndAccessState endAccessDesc = { ... };
+memory.EndAccess(texture, &endAccessDesc);
+```
+
+Multiple textures may be created from the same SharedTextureMemory, but only one texture may have access to the memory at a time.
+
+The Begin/End access descriptors are used to pass data necessary to update and synchronize texture state since the texture may have been externally used. Chained structs that are supported or required vary depending on the memory type. These access descriptors communicate the texture's initialized state. They are also used to pass [Shared Fences](./shared_fence.md) to synchronize access to the texture. When passed in BeginAccess, the texture will wait for the shared fences to pass before use on the GPU, and on EndAccess, the shared fences for the texture's last usage will be exported. Passing shared fences to BeginAccess allows Dawn to wait on externally-enqueued GPU work, and exporting shared fences from EndAccess then allows other external code to wait for Dawn's GPU work to complete.
+
+TODO(crbug.com/dawn/1745): additional documentation
+
+Work-in-progress: https://docs.google.com/document/d/1uRGL6vE1mSbpWd2v_KU5--RT5EjTXtruwiC7Ri3ZKz4/edit
\ No newline at end of file
diff --git a/include/dawn/native/D3DBackend.h b/include/dawn/native/D3DBackend.h
index 1283a5d..4f02901 100644
--- a/include/dawn/native/D3DBackend.h
+++ b/include/dawn/native/D3DBackend.h
@@ -112,6 +112,17 @@
     std::unique_ptr<ExternalImageDXGIImpl> mImpl;
 };
 
+// May be chained on SharedTextureMemoryDescriptor
+struct DAWN_NATIVE_EXPORT SharedTextureMemoryID3D11Texture2DDescriptor : wgpu::ChainedStruct {
+    SharedTextureMemoryID3D11Texture2DDescriptor() {
+        sType = static_cast<wgpu::SType>(WGPUSType_SharedTextureMemoryD3D11Texture2DDescriptor);
+    }
+
+    // This ID3D11Texture2D object must be created from the same ID3D11Device used in the
+    // WGPUDevice.
+    Microsoft::WRL::ComPtr<IUnknown> texture;
+};
+
 }  // namespace dawn::native::d3d
 
 #endif  // INCLUDE_DAWN_NATIVE_D3DBACKEND_H_
diff --git a/src/dawn/native/BUILD.gn b/src/dawn/native/BUILD.gn
index c3f3e59..cd9c04d 100644
--- a/src/dawn/native/BUILD.gn
+++ b/src/dawn/native/BUILD.gn
@@ -336,6 +336,10 @@
     "Serializable.h",
     "ShaderModule.cpp",
     "ShaderModule.h",
+    "SharedFence.cpp",
+    "SharedFence.h",
+    "SharedTextureMemory.cpp",
+    "SharedTextureMemory.h",
     "StreamImplTint.cpp",
     "Subresource.cpp",
     "Subresource.h",
diff --git a/src/dawn/native/CMakeLists.txt b/src/dawn/native/CMakeLists.txt
index 3c2a231..2ca20c5 100644
--- a/src/dawn/native/CMakeLists.txt
+++ b/src/dawn/native/CMakeLists.txt
@@ -188,6 +188,10 @@
     "Serializable.h"
     "ShaderModule.cpp"
     "ShaderModule.h"
+    "SharedFence.cpp"
+    "SharedFence.h"
+    "SharedTextureMemory.cpp"
+    "SharedTextureMemory.h"
     "StreamImplTint.cpp"
     "Subresource.cpp"
     "Subresource.h"
diff --git a/src/dawn/native/Device.cpp b/src/dawn/native/Device.cpp
index 5fdbaf4..5915c8e 100644
--- a/src/dawn/native/Device.cpp
+++ b/src/dawn/native/Device.cpp
@@ -48,6 +48,8 @@
 #include "dawn/native/RenderBundleEncoder.h"
 #include "dawn/native/RenderPipeline.h"
 #include "dawn/native/Sampler.h"
+#include "dawn/native/SharedFence.h"
+#include "dawn/native/SharedTextureMemory.h"
 #include "dawn/native/Surface.h"
 #include "dawn/native/SwapChain.h"
 #include "dawn/native/Texture.h"
@@ -1357,6 +1359,35 @@
     return result.Detach();
 }
 
+SharedTextureMemoryBase* DeviceBase::APIImportSharedTextureMemory(
+    const SharedTextureMemoryDescriptor* descriptor) {
+    Ref<SharedTextureMemoryBase> result = nullptr;
+    if (ConsumedError(ImportSharedTextureMemoryImpl(descriptor), &result,
+                      "calling %s.ImportSharedTextureMemory(%s).", this, descriptor)) {
+        return SharedTextureMemoryBase::MakeError(this, descriptor);
+    }
+    return result.Detach();
+}
+
+ResultOrError<Ref<SharedTextureMemoryBase>> DeviceBase::ImportSharedTextureMemoryImpl(
+    const SharedTextureMemoryDescriptor* descriptor) {
+    return DAWN_UNIMPLEMENTED_ERROR("Not implemented");
+}
+
+SharedFenceBase* DeviceBase::APIImportSharedFence(const SharedFenceDescriptor* descriptor) {
+    Ref<SharedFenceBase> result = nullptr;
+    if (ConsumedError(ImportSharedFenceImpl(descriptor), &result,
+                      "calling %s.ImportSharedFence(%s).", this, descriptor)) {
+        return SharedFenceBase::MakeError(this, descriptor);
+    }
+    return result.Detach();
+}
+
+ResultOrError<Ref<SharedFenceBase>> DeviceBase::ImportSharedFenceImpl(
+    const SharedFenceDescriptor* descriptor) {
+    return DAWN_UNIMPLEMENTED_ERROR("Not implemented");
+}
+
 void DeviceBase::ApplyFeatures(const DeviceDescriptor* deviceDescriptor) {
     ASSERT(deviceDescriptor);
     // Validate all required features with device toggles.
diff --git a/src/dawn/native/Device.h b/src/dawn/native/Device.h
index bf337a8..827e32c 100644
--- a/src/dawn/native/Device.h
+++ b/src/dawn/native/Device.h
@@ -54,6 +54,7 @@
 class CallbackTaskManager;
 class DynamicUploader;
 class ErrorScopeStack;
+class SharedTextureMemory;
 class OwnedCompilationMessages;
 struct CallbackTask;
 struct InternalPipelineStore;
@@ -273,6 +274,9 @@
         const RenderBundleEncoderDescriptor* descriptor);
     RenderPipelineBase* APICreateRenderPipeline(const RenderPipelineDescriptor* descriptor);
     ExternalTextureBase* APICreateExternalTexture(const ExternalTextureDescriptor* descriptor);
+    SharedTextureMemoryBase* APIImportSharedTextureMemory(
+        const SharedTextureMemoryDescriptor* descriptor);
+    SharedFenceBase* APIImportSharedFence(const SharedFenceDescriptor* descriptor);
     SamplerBase* APICreateSampler(const SamplerDescriptor* descriptor);
     ShaderModuleBase* APICreateShaderModule(const ShaderModuleDescriptor* descriptor);
     ShaderModuleBase* APICreateErrorShaderModule(const ShaderModuleDescriptor* descriptor,
@@ -487,6 +491,10 @@
         const ComputePipelineDescriptor* descriptor) = 0;
     virtual Ref<RenderPipelineBase> CreateUninitializedRenderPipelineImpl(
         const RenderPipelineDescriptor* descriptor) = 0;
+    virtual ResultOrError<Ref<SharedTextureMemoryBase>> ImportSharedTextureMemoryImpl(
+        const SharedTextureMemoryDescriptor* descriptor);
+    virtual ResultOrError<Ref<SharedFenceBase>> ImportSharedFenceImpl(
+        const SharedFenceDescriptor* descriptor);
     virtual void SetLabelImpl();
 
     virtual ResultOrError<wgpu::TextureUsage> GetSupportedSurfaceUsageImpl(
diff --git a/src/dawn/native/Features.cpp b/src/dawn/native/Features.cpp
index 4a5a2aa..8e014d3 100644
--- a/src/dawn/native/Features.cpp
+++ b/src/dawn/native/Features.cpp
@@ -139,6 +139,82 @@
       "https://chromium.googlesource.com/angle/angle/+/refs/heads/main/extensions/"
       "EGL_ANGLE_display_texture_share_group.txt",
       FeatureInfo::FeatureState::Stable}},
+    {Feature::SharedTextureMemoryVkDedicatedAllocation,
+     {"shared-texture-memory-vk-dedicated-allocation",
+      "Support specifying whether a Vulkan allocation for shared texture memory is a dedicated "
+      "memory allocation.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryAHardwareBuffer,
+     {"shared-texture-memory-a-hardware-buffer",
+      "Support importing AHardwareBuffer as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryDmaBuf,
+     {"shared-texture-memory-dma-buf", "Support importing DmaBuf as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryOpaqueFD,
+     {"shared-texture-memory-opaque-fd", "Support importing OpaqueFD as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryZirconHandle,
+     {"shared-texture-memory-zircon-handle",
+      "Support importing ZirconHandle as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryDXGISharedHandle,
+     {"shared-texture-memory-dxgi-handle",
+      "Support importing DXGISharedHandle as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryD3D11Texture2D,
+     {"shared-texture-memory-d3d11-texture-2d",
+      "Support importing D3D11Texture2D as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryIOSurface,
+     {"shared-texture-memory-io-surface", "Support importing IOSurface as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedTextureMemoryEGLImage,
+     {"shared-texture-memory-egl-image", "Support importing EGLImage as shared texture memory.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/"
+      "shared_texture_memory.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedFenceVkSemaphoreOpaqueFD,
+     {"shared-fence-vk-semaphore-opaque-fd",
+      "Support for importing and exporting VkSemaphoreOpaqueFD used for GPU synchronization.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/shared_fence.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedFenceVkSemaphoreSyncFD,
+     {"shared-fence-vk-semaphore-sync-fd",
+      "Support for importing and exporting VkSemaphoreSyncFD used for GPU synchronization.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/shared_fence.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedFenceVkSemaphoreZirconHandle,
+     {"shared-fence-vk-semaphore-zircon-handle",
+      "Support for importing and exporting VkSemaphoreZirconHandle used for GPU synchronization.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/shared_fence.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedFenceDXGISharedHandle,
+     {"shared-fence-vk-semaphore-dxgi-fence-handle",
+      "Support for importing and exporting DXGISharedHandle used for GPU synchronization.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/shared_fence.md",
+      FeatureInfo::FeatureState::Experimental}},
+    {Feature::SharedFenceMTLSharedEvent,
+     {"shared-fence-vk-semaphore-mtl-shared-event",
+      "Support for importing and exporting MTLSharedEvent used for GPU synchronization.",
+      "https://dawn.googlesource.com/dawn/+/refs/heads/main/docs/dawn/features/shared_fence.md",
+      FeatureInfo::FeatureState::Experimental}},
 }};
 
 Feature FromAPIFeature(wgpu::FeatureName feature) {
@@ -197,6 +273,34 @@
             return Feature::D3D11MultithreadProtected;
         case wgpu::FeatureName::ANGLETextureSharing:
             return Feature::ANGLETextureSharing;
+        case wgpu::FeatureName::SharedTextureMemoryVkDedicatedAllocation:
+            return Feature::SharedTextureMemoryVkDedicatedAllocation;
+        case wgpu::FeatureName::SharedTextureMemoryAHardwareBuffer:
+            return Feature::SharedTextureMemoryAHardwareBuffer;
+        case wgpu::FeatureName::SharedTextureMemoryDmaBuf:
+            return Feature::SharedTextureMemoryDmaBuf;
+        case wgpu::FeatureName::SharedTextureMemoryOpaqueFD:
+            return Feature::SharedTextureMemoryOpaqueFD;
+        case wgpu::FeatureName::SharedTextureMemoryZirconHandle:
+            return Feature::SharedTextureMemoryZirconHandle;
+        case wgpu::FeatureName::SharedTextureMemoryDXGISharedHandle:
+            return Feature::SharedTextureMemoryDXGISharedHandle;
+        case wgpu::FeatureName::SharedTextureMemoryD3D11Texture2D:
+            return Feature::SharedTextureMemoryD3D11Texture2D;
+        case wgpu::FeatureName::SharedTextureMemoryIOSurface:
+            return Feature::SharedTextureMemoryIOSurface;
+        case wgpu::FeatureName::SharedTextureMemoryEGLImage:
+            return Feature::SharedTextureMemoryEGLImage;
+        case wgpu::FeatureName::SharedFenceVkSemaphoreOpaqueFD:
+            return Feature::SharedFenceVkSemaphoreOpaqueFD;
+        case wgpu::FeatureName::SharedFenceVkSemaphoreSyncFD:
+            return Feature::SharedFenceVkSemaphoreSyncFD;
+        case wgpu::FeatureName::SharedFenceVkSemaphoreZirconHandle:
+            return Feature::SharedFenceVkSemaphoreZirconHandle;
+        case wgpu::FeatureName::SharedFenceDXGISharedHandle:
+            return Feature::SharedFenceDXGISharedHandle;
+        case wgpu::FeatureName::SharedFenceMTLSharedEvent:
+            return Feature::SharedFenceMTLSharedEvent;
     }
     return Feature::InvalidEnum;
 }
@@ -251,6 +355,34 @@
             return wgpu::FeatureName::D3D11MultithreadProtected;
         case Feature::ANGLETextureSharing:
             return wgpu::FeatureName::ANGLETextureSharing;
+        case Feature::SharedTextureMemoryVkDedicatedAllocation:
+            return wgpu::FeatureName::SharedTextureMemoryVkDedicatedAllocation;
+        case Feature::SharedTextureMemoryAHardwareBuffer:
+            return wgpu::FeatureName::SharedTextureMemoryAHardwareBuffer;
+        case Feature::SharedTextureMemoryDmaBuf:
+            return wgpu::FeatureName::SharedTextureMemoryDmaBuf;
+        case Feature::SharedTextureMemoryOpaqueFD:
+            return wgpu::FeatureName::SharedTextureMemoryOpaqueFD;
+        case Feature::SharedTextureMemoryZirconHandle:
+            return wgpu::FeatureName::SharedTextureMemoryZirconHandle;
+        case Feature::SharedTextureMemoryDXGISharedHandle:
+            return wgpu::FeatureName::SharedTextureMemoryDXGISharedHandle;
+        case Feature::SharedTextureMemoryD3D11Texture2D:
+            return wgpu::FeatureName::SharedTextureMemoryD3D11Texture2D;
+        case Feature::SharedTextureMemoryIOSurface:
+            return wgpu::FeatureName::SharedTextureMemoryIOSurface;
+        case Feature::SharedTextureMemoryEGLImage:
+            return wgpu::FeatureName::SharedTextureMemoryEGLImage;
+        case Feature::SharedFenceVkSemaphoreOpaqueFD:
+            return wgpu::FeatureName::SharedFenceVkSemaphoreOpaqueFD;
+        case Feature::SharedFenceVkSemaphoreSyncFD:
+            return wgpu::FeatureName::SharedFenceVkSemaphoreSyncFD;
+        case Feature::SharedFenceVkSemaphoreZirconHandle:
+            return wgpu::FeatureName::SharedFenceVkSemaphoreZirconHandle;
+        case Feature::SharedFenceDXGISharedHandle:
+            return wgpu::FeatureName::SharedFenceDXGISharedHandle;
+        case Feature::SharedFenceMTLSharedEvent:
+            return wgpu::FeatureName::SharedFenceMTLSharedEvent;
         case Feature::EnumCount:
             break;
     }
diff --git a/src/dawn/native/Features.h b/src/dawn/native/Features.h
index 6fb7c86..4cb5530 100644
--- a/src/dawn/native/Features.h
+++ b/src/dawn/native/Features.h
@@ -54,6 +54,22 @@
     D3D11MultithreadProtected,
     ANGLETextureSharing,
 
+    SharedTextureMemoryVkDedicatedAllocation,
+    SharedTextureMemoryAHardwareBuffer,
+    SharedTextureMemoryDmaBuf,
+    SharedTextureMemoryOpaqueFD,
+    SharedTextureMemoryZirconHandle,
+    SharedTextureMemoryDXGISharedHandle,
+    SharedTextureMemoryD3D11Texture2D,
+    SharedTextureMemoryIOSurface,
+    SharedTextureMemoryEGLImage,
+
+    SharedFenceVkSemaphoreOpaqueFD,
+    SharedFenceVkSemaphoreSyncFD,
+    SharedFenceVkSemaphoreZirconHandle,
+    SharedFenceDXGISharedHandle,
+    SharedFenceMTLSharedEvent,
+
     EnumCount,
     InvalidEnum = EnumCount,
     FeatureMin = TextureCompressionBC,
diff --git a/src/dawn/native/Forward.h b/src/dawn/native/Forward.h
index a2529fc..af6c1dc 100644
--- a/src/dawn/native/Forward.h
+++ b/src/dawn/native/Forward.h
@@ -36,6 +36,7 @@
 class CommandEncoder;
 class ComputePassEncoder;
 class ExternalTextureBase;
+class SharedTextureMemoryBase;
 class InstanceBase;
 class PhysicalDeviceBase;
 class PipelineBase;
@@ -49,6 +50,7 @@
 class RenderPipelineBase;
 class ResourceHeapBase;
 class SamplerBase;
+class SharedFenceBase;
 class Surface;
 class ShaderModuleBase;
 class SwapChainBase;
diff --git a/src/dawn/native/SharedFence.cpp b/src/dawn/native/SharedFence.cpp
new file mode 100644
index 0000000..38a9796
--- /dev/null
+++ b/src/dawn/native/SharedFence.cpp
@@ -0,0 +1,43 @@
+// Copyright 2023 The Dawn Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "dawn/native/SharedFence.h"
+
+#include "dawn/native/Device.h"
+#include "dawn/native/dawn_platform.h"
+
+namespace dawn::native {
+
+// static
+SharedFenceBase* SharedFenceBase::MakeError(DeviceBase* device,
+                                            const SharedFenceDescriptor* descriptor) {
+    return new SharedFenceBase(device, descriptor, ObjectBase::kError);
+}
+
+SharedFenceBase::SharedFenceBase(DeviceBase* device,
+                                 const SharedFenceDescriptor* descriptor,
+                                 ObjectBase::ErrorTag tag)
+    : ApiObjectBase(device, tag, descriptor->label) {}
+
+ObjectType SharedFenceBase::GetType() const {
+    return ObjectType::SharedFence;
+}
+
+void SharedFenceBase::APIExportInfo(SharedFenceExportInfo* info) const {
+    DAWN_UNUSED(GetDevice()->ConsumedError(DAWN_UNIMPLEMENTED_ERROR("Not implemented")));
+}
+
+void SharedFenceBase::DestroyImpl() {}
+
+}  // namespace dawn::native
diff --git a/src/dawn/native/SharedFence.h b/src/dawn/native/SharedFence.h
new file mode 100644
index 0000000..53b6734
--- /dev/null
+++ b/src/dawn/native/SharedFence.h
@@ -0,0 +1,43 @@
+// Copyright 2023 The Dawn Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_DAWN_NATIVE_SHAREDFENCE_H_
+#define SRC_DAWN_NATIVE_SHAREDFENCE_H_
+
+#include "dawn/native/ObjectBase.h"
+
+namespace dawn::native {
+
+struct SharedFenceDescriptor;
+struct SharedFenceExportInfo;
+
+class SharedFenceBase : public ApiObjectBase {
+  public:
+    static SharedFenceBase* MakeError(DeviceBase* device, const SharedFenceDescriptor* descriptor);
+
+    ObjectType GetType() const override;
+
+    void APIExportInfo(SharedFenceExportInfo* info) const;
+
+  private:
+    void DestroyImpl() override;
+
+    SharedFenceBase(DeviceBase* device,
+                    const SharedFenceDescriptor* descriptor,
+                    ObjectBase::ErrorTag tag);
+};
+
+}  // namespace dawn::native
+
+#endif  // SRC_DAWN_NATIVE_SHAREDFENCE_H_
diff --git a/src/dawn/native/SharedTextureMemory.cpp b/src/dawn/native/SharedTextureMemory.cpp
new file mode 100644
index 0000000..b097e64
--- /dev/null
+++ b/src/dawn/native/SharedTextureMemory.cpp
@@ -0,0 +1,58 @@
+// Copyright 2023 The Dawn Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "dawn/native/SharedTextureMemory.h"
+
+#include "dawn/native/Device.h"
+#include "dawn/native/dawn_platform.h"
+
+namespace dawn::native {
+
+// static
+SharedTextureMemoryBase* SharedTextureMemoryBase::MakeError(
+    DeviceBase* device,
+    const SharedTextureMemoryDescriptor* descriptor) {
+    return new SharedTextureMemoryBase(device, descriptor, ObjectBase::kError);
+}
+
+SharedTextureMemoryBase::SharedTextureMemoryBase(DeviceBase* device,
+                                                 const SharedTextureMemoryDescriptor* descriptor,
+                                                 ObjectBase::ErrorTag tag)
+    : ApiObjectBase(device, tag, descriptor->label) {}
+
+ObjectType SharedTextureMemoryBase::GetType() const {
+    return ObjectType::SharedTextureMemory;
+}
+
+void SharedTextureMemoryBase::DestroyImpl() {}
+
+void SharedTextureMemoryBase::APIGetProperties(SharedTextureMemoryProperties* properties) const {
+    DAWN_UNUSED(GetDevice()->ConsumedError(DAWN_UNIMPLEMENTED_ERROR("Not implemented")));
+}
+
+TextureBase* SharedTextureMemoryBase::APICreateTexture(const TextureDescriptor* descriptor) {
+    DAWN_UNUSED(GetDevice()->ConsumedError(DAWN_UNIMPLEMENTED_ERROR("Not implemented")));
+    return TextureBase::MakeError(GetDevice(), descriptor);
+}
+
+void SharedTextureMemoryBase::APIBeginAccess(TextureBase* texture,
+                                             const BeginAccessDescriptor* descriptor) {
+    DAWN_UNUSED(GetDevice()->ConsumedError(DAWN_UNIMPLEMENTED_ERROR("Not implemented")));
+}
+
+void SharedTextureMemoryBase::APIEndAccess(TextureBase* texture, EndAccessState* state) {
+    DAWN_UNUSED(GetDevice()->ConsumedError(DAWN_UNIMPLEMENTED_ERROR("Not implemented")));
+}
+
+}  // namespace dawn::native
diff --git a/src/dawn/native/SharedTextureMemory.h b/src/dawn/native/SharedTextureMemory.h
new file mode 100644
index 0000000..0c95ca0
--- /dev/null
+++ b/src/dawn/native/SharedTextureMemory.h
@@ -0,0 +1,53 @@
+// Copyright 2023 The Dawn Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef SRC_DAWN_NATIVE_SHAREDTEXTUREMEMORY_H_
+#define SRC_DAWN_NATIVE_SHAREDTEXTUREMEMORY_H_
+
+#include "dawn/native/ObjectBase.h"
+
+namespace dawn::native {
+
+struct SharedTextureMemoryDescriptor;
+struct SharedTextureMemoryBeginAccessDescriptor;
+struct SharedTextureMemoryEndAccessState;
+struct SharedTextureMemoryProperties;
+struct TextureDescriptor;
+
+class SharedTextureMemoryBase : public ApiObjectBase {
+  public:
+    using BeginAccessDescriptor = SharedTextureMemoryBeginAccessDescriptor;
+    using EndAccessState = SharedTextureMemoryEndAccessState;
+
+    static SharedTextureMemoryBase* MakeError(DeviceBase* device,
+                                              const SharedTextureMemoryDescriptor* descriptor);
+
+    void APIGetProperties(SharedTextureMemoryProperties* properties) const;
+    TextureBase* APICreateTexture(const TextureDescriptor* descriptor);
+    void APIBeginAccess(TextureBase* texture, const BeginAccessDescriptor* descriptor);
+    void APIEndAccess(TextureBase* texture, EndAccessState* state);
+
+    ObjectType GetType() const override;
+
+  private:
+    void DestroyImpl() override;
+
+    SharedTextureMemoryBase(DeviceBase* device,
+                            const SharedTextureMemoryDescriptor* descriptor,
+                            ObjectBase::ErrorTag tag);
+};
+
+}  // namespace dawn::native
+
+#endif  // SRC_DAWN_NATIVE_SHAREDTEXTUREMEMORY_H_
diff --git a/src/dawn/wire/SupportedFeatures.cpp b/src/dawn/wire/SupportedFeatures.cpp
index 97f87eb..f14aef7 100644
--- a/src/dawn/wire/SupportedFeatures.cpp
+++ b/src/dawn/wire/SupportedFeatures.cpp
@@ -27,6 +27,20 @@
         case WGPUFeatureName_ImplicitDeviceSynchronization:
         case WGPUFeatureName_SurfaceCapabilities:
         case WGPUFeatureName_D3D11MultithreadProtected:
+        case WGPUFeatureName_SharedTextureMemoryVkDedicatedAllocation:
+        case WGPUFeatureName_SharedTextureMemoryAHardwareBuffer:
+        case WGPUFeatureName_SharedTextureMemoryDmaBuf:
+        case WGPUFeatureName_SharedTextureMemoryOpaqueFD:
+        case WGPUFeatureName_SharedTextureMemoryZirconHandle:
+        case WGPUFeatureName_SharedTextureMemoryDXGISharedHandle:
+        case WGPUFeatureName_SharedTextureMemoryD3D11Texture2D:
+        case WGPUFeatureName_SharedTextureMemoryIOSurface:
+        case WGPUFeatureName_SharedTextureMemoryEGLImage:
+        case WGPUFeatureName_SharedFenceVkSemaphoreOpaqueFD:
+        case WGPUFeatureName_SharedFenceVkSemaphoreSyncFD:
+        case WGPUFeatureName_SharedFenceVkSemaphoreZirconHandle:
+        case WGPUFeatureName_SharedFenceDXGISharedHandle:
+        case WGPUFeatureName_SharedFenceMTLSharedEvent:
             return false;
         case WGPUFeatureName_Depth32FloatStencil8:
         case WGPUFeatureName_TimestampQuery: