Pass the old/new VkImageLayouts to Vulkan image import/export

Returning the layouts from an export operation and then using
them in a subsequent import operation allows the import to preserve
the texture contents.

This fixes Vukan image wrapping on some AMD/NVIDIA devices.

Bug: dawn:200
Change-Id: Icbb6e759856d410bb69724b9f439bc3088756d19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28380
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Austin Eng
2020-09-22 20:10:46 +00:00
committed by Commit Bot service account
parent 670858da9b
commit 0b29732cd8
19 changed files with 635 additions and 377 deletions

View File

@@ -195,8 +195,14 @@ namespace dawn_native {
return GetProcMapNamesForTestingInternal();
}
ExternalImageDescriptor::ExternalImageDescriptor(ExternalImageDescriptorType type)
: type(type) {
// ExternalImageDescriptor
ExternalImageDescriptor::ExternalImageDescriptor(ExternalImageType type) : type(type) {
}
// ExternalImageExportInfo
ExternalImageExportInfo::ExternalImageExportInfo(ExternalImageType type) : type(type) {
}
} // namespace dawn_native