GulkanTexture

GulkanTexture

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GulkanTexture

Includes

#include <gulkan.h>

Description

Functions

gulkan_texture_new ()

GulkanTexture *
gulkan_texture_new (GulkanClient *client,
                    VkExtent2D extent,
                    VkFormat format);

gulkan_texture_new_from_pixbuf ()

GulkanTexture *
gulkan_texture_new_from_pixbuf (GulkanClient *client,
                                GdkPixbuf *pixbuf,
                                VkFormat format,
                                VkImageLayout layout,
                                gboolean create_mipmaps);

gulkan_texture_new_from_cairo_surface ()

GulkanTexture *
gulkan_texture_new_from_cairo_surface (GulkanClient *client,
                                       cairo_surface_t *surface,
                                       VkFormat format,
                                       VkImageLayout layout);

gulkan_texture_new_from_dmabuf ()

GulkanTexture *
gulkan_texture_new_from_dmabuf (GulkanClient *client,
                                int fd,
                                VkExtent2D extent,
                                VkFormat format);

gulkan_texture_new_mip_levels ()

GulkanTexture *
gulkan_texture_new_mip_levels (GulkanClient *client,
                               VkExtent2D extent,
                               guint mip_levels,
                               VkFormat format);

gulkan_texture_new_export_fd ()

GulkanTexture *
gulkan_texture_new_export_fd (GulkanClient *client,
                              VkExtent2D extent,
                              VkFormat format,
                              VkImageLayout layout,
                              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/

Parameters

client

a GulkanClient

 

extent

Extent in pixels

 

format

VkFormat of the texture

 

layout

VkImageLayout of the texture

 

size

Return value of allocated size

 

fd

Return value for allocated fd

 

Returns

the initialized GulkanTexture


gulkan_texture_record_transfer ()

void
gulkan_texture_record_transfer (GulkanTexture *self,
                                VkCommandBuffer cmd_buffer,
                                VkImageLayout src_layout,
                                VkImageLayout dst_layout);

gulkan_texture_record_transfer_full ()

void
gulkan_texture_record_transfer_full (GulkanTexture *self,
                                     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);

gulkan_texture_transfer_layout ()

gboolean
gulkan_texture_transfer_layout (GulkanTexture *self,
                                VkImageLayout src_layout,
                                VkImageLayout dst_layout);

gulkan_texture_transfer_layout_full ()

gboolean
gulkan_texture_transfer_layout_full (GulkanTexture *self,
                                     VkAccessFlags src_access_mask,
                                     VkAccessFlags dst_access_mask,
                                     VkImageLayout src_layout,
                                     VkImageLayout dst_layout,
                                     VkPipelineStageFlags src_stage_mask,
                                     VkPipelineStageFlags dst_stage_mask);

gulkan_texture_upload_pixels ()

gboolean
gulkan_texture_upload_pixels (GulkanTexture *self,
                              guchar *pixels,
                              gsize size,
                              VkImageLayout layout);

gulkan_texture_upload_cairo_surface ()

gboolean
gulkan_texture_upload_cairo_surface (GulkanTexture *self,
                                     cairo_surface_t *surface,
                                     VkImageLayout layout);

gulkan_texture_upload_pixbuf ()

gboolean
gulkan_texture_upload_pixbuf (GulkanTexture *self,
                              GdkPixbuf *pixbuf,
                              VkImageLayout layout);

gulkan_texture_get_image_view ()

VkImageView
gulkan_texture_get_image_view (GulkanTexture *self);

gulkan_texture_get_image ()

VkImage
gulkan_texture_get_image (GulkanTexture *self);

gulkan_texture_get_extent ()

VkExtent2D
gulkan_texture_get_extent (GulkanTexture *self);

gulkan_texture_get_format ()

VkFormat
gulkan_texture_get_format (GulkanTexture *self);

gulkan_texture_get_mip_levels ()

guint
gulkan_texture_get_mip_levels (GulkanTexture *self);

Types and Values

GULKAN_TYPE_TEXTURE

#define GULKAN_TYPE_TEXTURE gulkan_texture_get_type()

GulkanTexture

typedef struct _GulkanTexture GulkanTexture;