- uint8_t deviceUUID[VK_UUID_SIZE];
- uint8_t driverUUID[VK_UUID_SIZE];
+ uint8_t deviceUUID[VK_UUID_SIZE];
+ uint8_t driverUUID[VK_UUID_SIZE];
+};
+
+struct vk_swap_image_obj
+{
+ VkImage image;
+ VkImageView image_view;
- VkPipeline pipeline;
- VkPipelineLayout pipeline_layout;
- VkRenderPass renderpass;
- VkShaderModule vs;
- VkShaderModule fs;
- VkFramebuffer fb;
-
- struct vk_vertex_info vertex_info;
+ VkPipeline pipeline;
+ VkPipelineLayout pipeline_layout;
+ VkRenderPass renderpass;
+ VkShaderModule vs;
+ VkShaderModule fs;
+ VkFramebuffer fb;
+
+ struct vk_vertex_info vertex_info;
- struct vk_image_props *props,
- struct vk_image_obj *img_obj);
+ struct vk_image_props *props,
+ struct vk_image_obj *img_obj);
- uint32_t w, uint32_t h,
- uint32_t depth,
- uint32_t num_samples,
- uint32_t num_levels,
- uint32_t num_layers,
- VkFormat format,
- VkImageTiling tiling,
- VkImageLayout in_layout,
- VkImageLayout end_layout,
+ uint32_t w, uint32_t h,
+ uint32_t depth,
+ uint32_t num_samples,
+ uint32_t num_levels,
+ uint32_t num_layers,
+ VkFormat format,
+ VkImageTiling tiling,
+ VkImageLayout in_layout,
+ VkImageLayout end_layout,
- struct vk_image_props *props);
+ struct vk_image_props *props);
+
+bool
+vk_create_attachment_from_swapchain_image(struct vk_ctx *ctx,
+ VkImage *swapchain_img,
+ VkImageView *swapchain_view,
+ struct vk_image_props *swapchain_props,
+ struct vk_image_att *color_att);
- const char *vs_src,
- unsigned int vs_size,
- const char *fs_src,
- unsigned int fs_size,
- bool enable_depth,
- bool enable_stencil,
- struct vk_image_att *color_att,
- struct vk_image_att *depth_att,
- struct vk_vertex_info *vert_info,
- struct vk_renderer *renderer);
+ const char *vs_src,
+ unsigned int vs_size,
+ const char *fs_src,
+ unsigned int fs_size,
+ bool enable_depth,
+ bool enable_stencil,
+ struct vk_image_att *color_att,
+ struct vk_image_att *depth_att,
+ struct vk_vertex_info *vert_info,
+ struct vk_renderer *renderer);
- struct vk_buf *vbo,
- struct vk_renderer *renderer,
- float *vk_fb_color,
- uint32_t vk_fb_color_count,
- struct vk_semaphores *semaphores,
- struct vk_image_att *attachments,
- uint32_t n_attachments,
- float x, float y, float w, float h);
+ struct vk_buf *vbo,
+ struct vk_renderer *renderer,
+ float *vk_fb_color,
+ uint32_t vk_fb_color_count,
+ struct vk_semaphores *semaphores,
+ struct vk_image_att *attachments,
+ uint32_t n_attachments,
+ float x, float y, float w, float h);
struct vk_swapchain *swapchain);
void
vk_destroy_swapchain(struct vk_ctx *ctx,
struct vk_swapchain *swapchain);
void
vk_destroy_swapchain(struct vk_ctx *ctx,
- VkCommandBuffer cmd_buf,
- VkImageLayout old_layout,
- VkImageLayout new_layout,
- uint32_t src_queue_family_index,
- uint32_t dst_queue_family_index);
+ VkCommandBuffer cmd_buf,
+ VkImageLayout old_layout,
+ VkImageLayout new_layout,
+ uint32_t src_queue_family_index,
+ uint32_t dst_queue_family_index);