Start introducing a "backend" for vulkan image wrapping tests

Bug: dawn:221

Change-Id: I8077d6a873bbd4f4ed549b386014e10020ffc725
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75424
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2022-01-13 13:11:17 +00:00
committed by Dawn LUCI CQ
parent 22bd21ef74
commit 3148b49730
10 changed files with 1168 additions and 1030 deletions

View File

@@ -217,12 +217,15 @@ namespace dawn::native {
// Common properties of external images
struct DAWN_NATIVE_EXPORT ExternalImageDescriptor {
public:
const ExternalImageType type;
const WGPUTextureDescriptor* cTextureDescriptor; // Must match image creation params
bool isInitialized; // Whether the texture is initialized on import
ExternalImageType GetType() const;
protected:
ExternalImageDescriptor(ExternalImageType type);
private:
ExternalImageType mType;
};
struct DAWN_NATIVE_EXPORT ExternalImageAccessDescriptor {
@@ -233,11 +236,14 @@ namespace dawn::native {
struct DAWN_NATIVE_EXPORT ExternalImageExportInfo {
public:
const ExternalImageType type;
bool isInitialized; // Whether the texture is initialized after export
ExternalImageType GetType() const;
protected:
ExternalImageExportInfo(ExternalImageType type);
private:
ExternalImageType mType;
};
DAWN_NATIVE_EXPORT const char* GetObjectLabelForTesting(void* objectHandle);