Top |
GulkanTexture * gulkan_texture_new (GulkanDevice *device
,guint width
,guint height
,gsize size
,VkFormat format
);
GulkanTexture * gulkan_texture_new_export_fd (GulkanDevice *device
,guint width
,guint height
,VkFormat format
,gsize *size
,int *fd
);
Allocates a GulkanTexture and exports it via external memory to an fd and provides the size of the external memory.
based on code from https://github.com/lostgoat/ogl-samples/blob/master/tests/gl-450-culling.cpp https://gitlab.com/beVR_nz/VulkanIPC_Demo/
GulkanTexture * gulkan_texture_new_from_cairo_surface (GulkanDevice *device
,VkCommandBuffer cmd_buffer
,cairo_surface_t *surface
,VkFormat format
,VkImageLayout layout
);
GulkanTexture * gulkan_texture_new_from_dmabuf (GulkanDevice *device
,int fd
,guint width
,guint height
,VkFormat format
);
GulkanTexture * gulkan_texture_new_from_pixbuf (GulkanDevice *device
,VkCommandBuffer cmd_buffer
,GdkPixbuf *pixbuf
,VkFormat format
,VkImageLayout layout
,bool create_mipmaps
);
GulkanTexture * gulkan_texture_new_mip_levels (GulkanDevice *device
,guint width
,guint height
,guint mip_levels
,gsize size
,VkFormat format
);
void
gulkan_texture_free_staging_memory (GulkanTexture *self
);
void gulkan_texture_transfer_layout (GulkanTexture *self
,GulkanDevice *device
,VkCommandBuffer cmd_buffer
,VkImageLayout src_layout
,VkImageLayout layout
);
bool gulkan_texture_upload_pixels (GulkanTexture *self
,VkCommandBuffer cmd_buffer
,guchar *pixels
,gsize size
,VkImageLayout layout
);
void gulkan_texture_transfer_layout_full (GulkanTexture *self
,GulkanDevice *device
,VkCommandBuffer cmd_buffer
,VkAccessFlags src_access_mask
,VkAccessFlags dst_access_mask
,VkImageLayout src_layout
,VkImageLayout dst_layout
,VkPipelineStageFlags src_stage_mask
,VkPipelineStageFlags dst_stage_mask
);