Path: blob/21.2-virgl/src/virtio/vulkan/vn_wsi.h
4560 views
/*1* Copyright 2019 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#ifndef VN_WSI_H11#define VN_WSI_H1213#include "vn_common.h"1415#include "wsi_common.h"1617#ifdef VN_USE_WSI_PLATFORM1819VkResult20vn_wsi_init(struct vn_physical_device *physical_dev);2122void23vn_wsi_fini(struct vn_physical_device *physical_dev);2425static inline const struct wsi_image_create_info *26vn_wsi_find_wsi_image_create_info(const VkImageCreateInfo *create_info)27{28return vk_find_struct_const(create_info->pNext,29WSI_IMAGE_CREATE_INFO_MESA);30}3132VkResult33vn_wsi_create_image(struct vn_device *dev,34const VkImageCreateInfo *create_info,35const struct wsi_image_create_info *wsi_info,36const VkAllocationCallbacks *alloc,37struct vn_image **out_img);3839#else4041static inline VkResult42vn_wsi_init(UNUSED struct vn_physical_device *physical_dev)43{44return VK_SUCCESS;45}4647static inline void48vn_wsi_fini(UNUSED struct vn_physical_device *physical_dev)49{50}5152static inline const struct wsi_image_create_info *53vn_wsi_find_wsi_image_create_info(const VkImageCreateInfo *create_info)54{55return NULL;56}5758static inline VkResult59vn_wsi_create_image(struct vn_device *dev,60const VkImageCreateInfo *create_info,61const struct wsi_image_create_info *wsi_info,62const VkAllocationCallbacks *alloc,63struct vn_image **out_img)64{65return VK_ERROR_OUT_OF_HOST_MEMORY;66}6768#endif /* VN_USE_WSI_PLATFORM */6970#endif /* VN_WSI_H */717273