d3d12: Add support for fences for external images

DXGI external images can now be imported with both fence and texture
shared handles. Fence wait and signal values can be specified for
ProduceTexture. Keyed mutex functionality is kept as is with no change.
The D3D12 resource wrapping tests now run in both keyed mutex and fence
modes.

Bug: dawn:576
Change-Id: Ic793bcc828e5a8850c1367ecffabedd1c67184d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78604
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
This commit is contained in:
Sunny Sachanandani
2022-06-10 18:47:05 +00:00
committed by Dawn LUCI CQ
parent faf98b1bbc
commit 7ce85091b9
9 changed files with 347 additions and 139 deletions

View File

@@ -237,13 +237,13 @@ struct DAWN_NATIVE_EXPORT ExternalImageDescriptor {
struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptor {
public:
bool isInitialized; // Whether the texture is initialized on import
WGPUTextureUsageFlags usage;
bool isInitialized = false; // Whether the texture is initialized on import
WGPUTextureUsageFlags usage = WGPUTextureUsage_None;
};
struct DAWN_NATIVE_EXPORT ExternalImageExportInfo {
public:
bool isInitialized; // Whether the texture is initialized after export
bool isInitialized = false; // Whether the texture is initialized after export
ExternalImageType GetType() const;
protected: