--- /dev/null
+#include <string.h>
+#include "ui.h"
+
+bool
+vk_create_swapchain(struct vk_ctx *ctx,
+ struct vk_swapchain *swapchain)
+{
+ VkSwapchainCreateInfoKHR s_info;
+
+ memset(&s_info, 0, sizeof s_info);
+ s_info.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
+ s_info.flags = VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR;
+ s_info.surface = swapchain->surface;
+ s_info.minImageCount = 2;
+
+ // FIXME: to be continued
+
+ return true;
+}
--- /dev/null
+#ifndef UI_H
+#define UI_H
+
+#include "vk.h"
+
+struct vk_swapchain
+{
+ VkSwapchainKHR swapchain;
+ VkSurfaceKHR surface;
+ VkSurfaceFormatKHR surf_fmt;
+ uint32_t num_images;
+ VkExtent2D extent2d;
+};
+
+/* swapchain */
+bool
+vk_create_swapchain(struct vk_ctx *ctx,
+ struct vk_swapchain *swapchain);
+void
+vk_destroy_swapchain(struct vk_ctx *ctx,
+ struct vk_swapchain *swapchain);
+
+#endif /* UI_H */