From e568fe138ed0d79af71256d47c6ea57c8c382134 Mon Sep 17 00:00:00 2001 From: Brian Ho Date: Fri, 22 Nov 2019 21:00:43 +0000 Subject: [PATCH] Remove WrapVulkanImageOpaqueFD This CL removes the deprecated WrapVulkanImageOpaqueFD now that it no longer being called in Chromium [1]. [1] https://chromium-review.googlesource.com/c/chromium/src/+/1931145 BUG=chromium:996470 Change-Id: I19a7ff36e39b5ed07c68f422cd053f480a7c177e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13980 Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Brian Ho --- src/dawn_native/vulkan/VulkanBackend.cpp | 11 ----------- src/include/dawn_native/VulkanBackend.h | 11 ----------- src/tests/white_box/VulkanImageWrappingTests.cpp | 3 +-- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/dawn_native/vulkan/VulkanBackend.cpp b/src/dawn_native/vulkan/VulkanBackend.cpp index 02c3c3832d..ad99a27401 100644 --- a/src/dawn_native/vulkan/VulkanBackend.cpp +++ b/src/dawn_native/vulkan/VulkanBackend.cpp @@ -76,17 +76,6 @@ namespace dawn_native { namespace vulkan { : ExternalImageDescriptorFD(ExternalImageDescriptorType::DmaBuf) { } - // TODO(hob): Remove this once we switch over to WrapVulkanImage in Chromium. - WGPUTexture WrapVulkanImageOpaqueFD(WGPUDevice cDevice, - const ExternalImageDescriptorOpaqueFD* descriptor) { - Device* device = reinterpret_cast(cDevice); - - TextureBase* texture = device->CreateTextureWrappingVulkanImage( - descriptor, descriptor->memoryFD, descriptor->waitFDs); - - return reinterpret_cast(texture); - } - int ExportSignalSemaphoreOpaqueFD(WGPUDevice cDevice, WGPUTexture cTexture) { Device* device = reinterpret_cast(cDevice); Texture* texture = reinterpret_cast(cTexture); diff --git a/src/include/dawn_native/VulkanBackend.h b/src/include/dawn_native/VulkanBackend.h index 83ff65f135..30dbb05b84 100644 --- a/src/include/dawn_native/VulkanBackend.h +++ b/src/include/dawn_native/VulkanBackend.h @@ -80,17 +80,6 @@ namespace dawn_native { namespace vulkan { uint64_t drmModifier; // DRM modifier of the buffer }; - // Imports an external vulkan image from an opaque file descriptor. Internally, this uses - // external memory / semaphore extensions to import the image. Then, waits on the provided - // |descriptor->waitFDs| before the texture can be used. Finally, a signal semaphore - // can be exported, transferring control back to the caller. - // On failure, returns a nullptr - // NOTE: This is deprecated. Use WrapVulkanImage instead. - // TODO(hob): Remove this once Chromium has switched over to WrapVulkanImage. - DAWN_NATIVE_EXPORT WGPUTexture - WrapVulkanImageOpaqueFD(WGPUDevice cDevice, - const ExternalImageDescriptorOpaqueFD* descriptor); - // Exports a signal semaphore from a wrapped texture. This must be called on wrapped // textures before they are destroyed. On failure, returns -1 DAWN_NATIVE_EXPORT int ExportSignalSemaphoreOpaqueFD(WGPUDevice cDevice, diff --git a/src/tests/white_box/VulkanImageWrappingTests.cpp b/src/tests/white_box/VulkanImageWrappingTests.cpp index 8f38b17f55..541554fcf3 100644 --- a/src/tests/white_box/VulkanImageWrappingTests.cpp +++ b/src/tests/white_box/VulkanImageWrappingTests.cpp @@ -165,8 +165,7 @@ namespace { descriptor.memoryFD = memoryFd; descriptor.waitFDs = waitFDs; - WGPUTexture texture = - dawn_native::vulkan::WrapVulkanImageOpaqueFD(device.Get(), &descriptor); + WGPUTexture texture = dawn_native::vulkan::WrapVulkanImage(device.Get(), &descriptor); if (expectValid) { EXPECT_NE(texture, nullptr) << "Failed to wrap image, are external memory / "