mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
13b53656ea
Instead of using a staging iamge, we require the final image to be linearly allocated and have host-visible memory. This improves performance quite a bit. The old code is still there and can be enabled with a simple change to a #define in gskvulkanimage.h
32 lines
1.4 KiB
C
32 lines
1.4 KiB
C
#ifndef __GSK_VULKAN_IMAGE_PRIVATE_H__
|
|
#define __GSK_VULKAN_IMAGE_PRIVATE_H__
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
/* Modify here for benchmarking */
|
|
#define GSK_VULKAN_UPLOAD_IMAGE_DEFAULT GSK_VULKAN_UPLOAD_DIRECTLY
|
|
|
|
typedef enum {
|
|
GSK_VULKAN_UPLOAD_DIRECTLY,
|
|
GSK_VULKAN_UPLOAD_VIA_STAGING_IMAGE
|
|
} GstkVulkanImageUpload;
|
|
|
|
typedef struct _GskVulkanImage GskVulkanImage;
|
|
|
|
GskVulkanImage * gsk_vulkan_image_new_from_data (GdkVulkanContext *context,
|
|
VkCommandBuffer command_buffer,
|
|
guchar *data,
|
|
gsize width,
|
|
gsize height,
|
|
gsize stride);
|
|
void gsk_vulkan_image_free (GskVulkanImage *image);
|
|
|
|
VkImage gsk_vulkan_image_get_image (GskVulkanImage *self);
|
|
VkImageView gsk_vulkan_image_get_image_view (GskVulkanImage *self);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GSK_VULKAN_IMAGE_PRIVATE_H__ */
|