GulkanTexture

GulkanTexture

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GulkanTexture

Includes

#include <gulkan.h>

Description

Functions

gulkan_texture_new ()

GulkanTexture *
gulkan_texture_new (GulkanDevice *device,
                    guint width,
                    guint height,
                    gsize size,
                    VkFormat format);

gulkan_texture_new_export_fd ()

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/

Parameters

device

a GulkanDevice

 

width

Width in pixels

 

height

Height in pixels

 

format

VkFormat of the texture

 

size

Return value of allocated size

 

fd

Return value for allocated fd

 

Returns

the initialized GulkanTexture


gulkan_texture_new_from_cairo_surface ()

GulkanTexture *
gulkan_texture_new_from_cairo_surface (GulkanDevice *device,
                                       VkCommandBuffer cmd_buffer,
                                       cairo_surface_t *surface,
                                       VkFormat format,
                                       VkImageLayout layout);

gulkan_texture_new_from_dmabuf ()

GulkanTexture *
gulkan_texture_new_from_dmabuf (GulkanDevice *device,
                                int fd,
                                guint width,
                                guint height,
                                VkFormat format);

gulkan_texture_new_from_pixbuf ()

GulkanTexture *
gulkan_texture_new_from_pixbuf (GulkanDevice *device,
                                VkCommandBuffer cmd_buffer,
                                GdkPixbuf *pixbuf,
                                VkFormat format,
                                VkImageLayout layout,
                                bool create_mipmaps);

gulkan_texture_new_mip_levels ()

GulkanTexture *
gulkan_texture_new_mip_levels (GulkanDevice *device,
                               guint width,
                               guint height,
                               guint mip_levels,
                               gsize size,
                               VkFormat format);

gulkan_texture_free_staging_memory ()

void
gulkan_texture_free_staging_memory (GulkanTexture *self);

gulkan_texture_transfer_layout ()

void
gulkan_texture_transfer_layout (GulkanTexture *self,
                                GulkanDevice *device,
                                VkCommandBuffer cmd_buffer,
                                VkImageLayout src_layout,
                                VkImageLayout layout);

gulkan_texture_upload_pixels ()

bool
gulkan_texture_upload_pixels (GulkanTexture *self,
                              VkCommandBuffer cmd_buffer,
                              guchar *pixels,
                              gsize size,
                              VkImageLayout layout);

gulkan_texture_get_format ()

VkFormat
gulkan_texture_get_format (GulkanTexture *self);

gulkan_texture_get_height ()

guint
gulkan_texture_get_height (GulkanTexture *self);

gulkan_texture_get_image ()

VkImage
gulkan_texture_get_image (GulkanTexture *self);

gulkan_texture_get_image_view ()

VkImageView
gulkan_texture_get_image_view (GulkanTexture *self);

gulkan_texture_get_mip_levels ()

guint
gulkan_texture_get_mip_levels (GulkanTexture *self);

gulkan_texture_get_width ()

guint
gulkan_texture_get_width (GulkanTexture *self);

gulkan_texture_transfer_layout_full ()

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);

Types and Values

GulkanTexture

typedef struct _GulkanTexture GulkanTexture;

GULKAN_TYPE_TEXTURE

#define GULKAN_TYPE_TEXTURE gulkan_texture_get_type()