D3D12: Pass usage to ProduceTexture

Allow external images to specify all allowed texture usages which will
be checked by ProduceTexture. This avoids needing to assume the usage
between multiple calls to ProduceTexture is always the same.

Bug=dawn:625

Change-Id: I9fdb59af23e6c160e939ab1c51de03542248c0c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44260
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Bryan Bernhart
2021-03-12 02:27:56 +00:00
committed by Commit Bot service account
parent 0702b70469
commit 2f72aeda4f
4 changed files with 41 additions and 1 deletions

View File

@@ -231,6 +231,7 @@ namespace dawn_native {
struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptor {
public:
bool isInitialized; // Whether the texture is initialized on import
WGPUTextureUsageFlags usage;
};
struct DAWN_NATIVE_EXPORT ExternalImageExportInfo {