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 <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Ali Chraghi 2023-01-12 16:11:44 +00:00 committed by Dawn LUCI CQ
parent 1f9e50edd4
commit 2d94a0c075
1 changed files with 3 additions and 1 deletions

View File

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