From 4fc31e4af32e628b6319554cf24701e7aef3334b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 29 Jul 2022 17:05:23 -0700 Subject: [PATCH] turnip: add tu_wsi.h Also drop unused x11 and wayland type definitions. Part-of: --- src/freedreno/vulkan/tu_common.h | 1 + src/freedreno/vulkan/tu_private.h | 13 +------------ src/freedreno/vulkan/tu_wsi.c | 1 + src/freedreno/vulkan/tu_wsi.h | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 src/freedreno/vulkan/tu_wsi.h diff --git a/src/freedreno/vulkan/tu_common.h b/src/freedreno/vulkan/tu_common.h index bd26da82108..cafd7ab6885 100644 --- a/src/freedreno/vulkan/tu_common.h +++ b/src/freedreno/vulkan/tu_common.h @@ -124,6 +124,7 @@ struct tu_device; struct tu_image; struct tu_image_view; struct tu_instance; +struct tu_physical_device; struct tu_pipeline_layout; struct tu_query_pool; struct tu_render_pass; diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 55b38e3f7a3..cc9c6e40fa3 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -45,13 +45,7 @@ #include "tu_shader.h" #include "tu_suballoc.h" #include "tu_util.h" - -/* Pre-declarations needed for WSI entrypoints */ -struct wl_surface; -struct wl_display; -typedef struct xcb_connection_t xcb_connection_t; -typedef uint32_t xcb_visualid_t; -typedef uint32_t xcb_window_t; +#include "tu_wsi.h" /* Whenever we generate an error, pass it through this function. Useful for * debugging, where we can break on it. Only call at error site, not when @@ -194,11 +188,6 @@ struct tu_instance enum tu_debug_flags debug_flags; }; -VkResult -tu_wsi_init(struct tu_physical_device *physical_device); -void -tu_wsi_finish(struct tu_physical_device *physical_device); - bool tu_instance_extension_supported(const char *name); uint32_t diff --git a/src/freedreno/vulkan/tu_wsi.c b/src/freedreno/vulkan/tu_wsi.c index bf8cb9a8f09..81560d07b6f 100644 --- a/src/freedreno/vulkan/tu_wsi.c +++ b/src/freedreno/vulkan/tu_wsi.c @@ -23,6 +23,7 @@ * DEALINGS IN THE SOFTWARE. */ +#include "tu_wsi.h" #include "tu_private.h" #include "vk_util.h" diff --git a/src/freedreno/vulkan/tu_wsi.h b/src/freedreno/vulkan/tu_wsi.h new file mode 100644 index 00000000000..c0976f73e5f --- /dev/null +++ b/src/freedreno/vulkan/tu_wsi.h @@ -0,0 +1,21 @@ +/* + * Copyright © 2016 Red Hat. + * Copyright © 2016 Bas Nieuwenhuizen + * SPDX-License-Identifier: MIT + * + * based in part on anv driver which is: + * Copyright © 2015 Intel Corporation + */ + +#ifndef TU_WSI_H +#define TU_WSI_H + +#include "tu_common.h" + +VkResult +tu_wsi_init(struct tu_physical_device *physical_device); + +void +tu_wsi_finish(struct tu_physical_device *physical_device); + +#endif /* TU_WSI_H */