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 <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
This commit is contained in:
Brian Ho 2019-11-22 21:00:43 +00:00 committed by Commit Bot service account
parent f6eb890f4c
commit e568fe138e
3 changed files with 1 additions and 24 deletions

View File

@ -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<Device*>(cDevice);
TextureBase* texture = device->CreateTextureWrappingVulkanImage(
descriptor, descriptor->memoryFD, descriptor->waitFDs);
return reinterpret_cast<WGPUTexture>(texture);
}
int ExportSignalSemaphoreOpaqueFD(WGPUDevice cDevice, WGPUTexture cTexture) {
Device* device = reinterpret_cast<Device*>(cDevice);
Texture* texture = reinterpret_cast<Texture*>(cTexture);

View File

@ -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,

View File

@ -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 / "