Path: blob/21.2-virgl/src/virtio/vulkan/vn_wsi_wayland.c
4560 views
/*1* Copyright 2020 Google LLC2* SPDX-License-Identifier: MIT3*4* based in part on anv and radv which are:5* Copyright © 2015 Intel Corporation6* Copyright © 2016 Red Hat.7* Copyright © 2016 Bas Nieuwenhuizen8*/910#include "wsi_common_wayland.h"1112#include "vn_device.h"13#include "vn_wsi.h"1415VkResult16vn_CreateWaylandSurfaceKHR(VkInstance _instance,17const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,18const VkAllocationCallbacks *pAllocator,19VkSurfaceKHR *pSurface)20{21struct vn_instance *instance = vn_instance_from_handle(_instance);22const VkAllocationCallbacks *alloc =23pAllocator ? pAllocator : &instance->base.base.alloc;2425VkResult result = wsi_create_wl_surface(alloc, pCreateInfo, pSurface);2627return vn_result(instance, result);28}2930VkBool3231vn_GetPhysicalDeviceWaylandPresentationSupportKHR(32VkPhysicalDevice physicalDevice,33uint32_t queueFamilyIndex,34struct wl_display *display)35{36struct vn_physical_device *physical_dev =37vn_physical_device_from_handle(physicalDevice);3839return wsi_wl_get_presentation_support(&physical_dev->wsi_device, display);40}414243