mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Fix VulkanImageWrappingUsageTests.ClearImageAcrossDevicesAliased
In Vulkan, importing memory by file descriptor takes ownership of the file descriptor. It is necessary to dup it in ClearImageAcrossDevicesAliased because the texture is imported twice. This fixes these tests on SwiftShader. Bug: dawn:417 Change-Id: I08b6464c4b8bd31f738037678e29fd6d066e7888 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22020 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
bd0ad7921d
commit
65ee6497d6
@@ -34,7 +34,10 @@ namespace dawn_native { namespace vulkan {
|
||||
|
||||
// Can't use DAWN_PLATFORM_LINUX since header included in both dawn and chrome
|
||||
#ifdef __linux__
|
||||
// Common properties of external images represented by FDs
|
||||
// Common properties of external images represented by FDs. On successful import the file
|
||||
// descriptor's ownership is transferred to the Dawn implementation and they shouldn't be
|
||||
// used outside of Dawn again. TODO(enga): Also transfer ownership in the error case so the
|
||||
// caller can assume the FD is always consumed.
|
||||
struct DAWN_NATIVE_EXPORT ExternalImageDescriptorFD : ExternalImageDescriptor {
|
||||
public:
|
||||
int memoryFD; // A file descriptor from an export of the memory of the image
|
||||
|
||||
Reference in New Issue
Block a user