mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-15 09:35:57 +00:00
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:
parent
f6eb890f4c
commit
e568fe138e
@ -76,17 +76,6 @@ namespace dawn_native { namespace vulkan {
|
|||||||
: ExternalImageDescriptorFD(ExternalImageDescriptorType::DmaBuf) {
|
: 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) {
|
int ExportSignalSemaphoreOpaqueFD(WGPUDevice cDevice, WGPUTexture cTexture) {
|
||||||
Device* device = reinterpret_cast<Device*>(cDevice);
|
Device* device = reinterpret_cast<Device*>(cDevice);
|
||||||
Texture* texture = reinterpret_cast<Texture*>(cTexture);
|
Texture* texture = reinterpret_cast<Texture*>(cTexture);
|
||||||
|
@ -80,17 +80,6 @@ namespace dawn_native { namespace vulkan {
|
|||||||
uint64_t drmModifier; // DRM modifier of the buffer
|
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
|
// Exports a signal semaphore from a wrapped texture. This must be called on wrapped
|
||||||
// textures before they are destroyed. On failure, returns -1
|
// textures before they are destroyed. On failure, returns -1
|
||||||
DAWN_NATIVE_EXPORT int ExportSignalSemaphoreOpaqueFD(WGPUDevice cDevice,
|
DAWN_NATIVE_EXPORT int ExportSignalSemaphoreOpaqueFD(WGPUDevice cDevice,
|
||||||
|
@ -165,8 +165,7 @@ namespace {
|
|||||||
descriptor.memoryFD = memoryFd;
|
descriptor.memoryFD = memoryFd;
|
||||||
descriptor.waitFDs = waitFDs;
|
descriptor.waitFDs = waitFDs;
|
||||||
|
|
||||||
WGPUTexture texture =
|
WGPUTexture texture = dawn_native::vulkan::WrapVulkanImage(device.Get(), &descriptor);
|
||||||
dawn_native::vulkan::WrapVulkanImageOpaqueFD(device.Get(), &descriptor);
|
|
||||||
|
|
||||||
if (expectValid) {
|
if (expectValid) {
|
||||||
EXPECT_NE(texture, nullptr) << "Failed to wrap image, are external memory / "
|
EXPECT_NE(texture, nullptr) << "Failed to wrap image, are external memory / "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user