VkInstance inst;
VkPhysicalDevice pdev;
VkDevice dev;
- VkPipelineCache cache;
VkCommandPool cmd_pool;
VkCommandBuffer cmd_buf;
VkImageLayout in_layout;
VkImageLayout end_layout;
+
+ bool need_export;
};
struct vk_mem_obj {
struct vk_image_obj {
VkImage img;
- struct vk_mem_obj mobj;
-};
-
-struct vk_buf
-{
- VkBuffer buf;
+ VkImageView img_view;
struct vk_mem_obj mobj;
};
VkPrimitiveTopology topology;
};
+struct vk_buf
+{
+ VkBuffer buf;
+ struct vk_mem_obj mobj;
+};
+
+
struct vk_renderer
{
VkPipeline pipeline;
uint32_t num_layers,
VkFormat format,
VkImageTiling tiling,
- VkImageUsageFlagBits usage,
VkImageLayout in_layout,
VkImageLayout end_layout,
+ bool need_export,
struct vk_image_props *props);
/* buffers */
bool
vk_create_buffer(struct vk_ctx *ctx,
+ bool is_external,
uint32_t sz,
VkBufferUsageFlagBits usage,
void *pnext,
uint32_t data_sz,
struct vk_buf *bo);
+bool
+vk_create_ext_buffer(struct vk_ctx *ctx,
+ uint32_t sz,
+ VkBufferUsageFlagBits usage,
+ struct vk_buf *bo);
+
+
/* semaphores */
bool
uint32_t n_attachments,
float x, float y, float w, float h);
+void
+vk_clear_color(struct vk_ctx *ctx,
+ struct vk_buf *vbo,
+ struct vk_renderer *renderer,
+ float *vk_fb_color,
+ uint32_t vk_fb_color_count,
+ struct vk_semaphores *semaphores,
+ bool has_wait, bool has_signal,
+ struct vk_image_att *attachments,
+ uint32_t n_attachments,
+ float x, float y, float w, float h);
+
/* transitions */
void