From 2d94a0c07514b90536dc0aa7c63a727bbb638432 Mon Sep 17 00:00:00 2001 From: Ali Chraghi Date: Thu, 12 Jan 2023 16:11:44 +0000 Subject: [PATCH] Add missing Surface creation calls to get wayland surfaces working Change-Id: I50e7b830769333dee4b865c3c0ab6e6016d81a9f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/116922 Reviewed-by: Corentin Wallez Reviewed-by: Austin Eng Commit-Queue: Austin Eng Kokoro: Kokoro --- src/dawn/native/Surface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dawn/native/Surface.cpp b/src/dawn/native/Surface.cpp index 39b0cbb4b3..f3786014e9 100644 --- a/src/dawn/native/Surface.cpp +++ b/src/dawn/native/Surface.cpp @@ -74,7 +74,8 @@ MaybeError ValidateSurfaceDescriptor(const InstanceBase* instance, wgpu::SType::SurfaceDescriptorFromMetalLayer, wgpu::SType::SurfaceDescriptorFromWindowsHWND, wgpu::SType::SurfaceDescriptorFromWindowsCoreWindow, wgpu::SType::SurfaceDescriptorFromWindowsSwapChainPanel, - wgpu::SType::SurfaceDescriptorFromXlibWindow)); + wgpu::SType::SurfaceDescriptorFromXlibWindow, + wgpu::SType::SurfaceDescriptorFromWaylandSurface)); #if defined(DAWN_ENABLE_BACKEND_METAL) const SurfaceDescriptorFromMetalLayer* metalDesc = nullptr; @@ -188,6 +189,7 @@ Surface::Surface(InstanceBase* instance, const SurfaceDescriptor* descriptor) FindInChain(descriptor->nextInChain, &coreWindowDesc); FindInChain(descriptor->nextInChain, &swapChainPanelDesc); FindInChain(descriptor->nextInChain, &xDesc); + FindInChain(descriptor->nextInChain, &waylandDesc); if (metalDesc) { mType = Type::MetalLayer; mMetalLayer = metalDesc->layer;