2023-03-31 19:11:10 +00:00
|
|
|
#pragma once
|
2016-12-07 13:50:52 +00:00
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
2016-12-08 12:26:36 +00:00
|
|
|
#include <gsk/gskrendernode.h>
|
|
|
|
|
2023-07-15 10:47:35 +00:00
|
|
|
#include "gskvulkanclipprivate.h"
|
2018-01-06 14:36:55 +00:00
|
|
|
#include "gskvulkanimageprivate.h"
|
2023-07-06 04:40:09 +00:00
|
|
|
#include "gskvulkanprivate.h"
|
2018-01-06 14:36:55 +00:00
|
|
|
#include "gskvulkanrenderpassprivate.h"
|
2016-12-07 13:50:52 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2023-05-23 03:08:13 +00:00
|
|
|
typedef enum {
|
|
|
|
GSK_VULKAN_SAMPLER_DEFAULT,
|
2023-05-23 03:26:08 +00:00
|
|
|
GSK_VULKAN_SAMPLER_REPEAT,
|
|
|
|
GSK_VULKAN_SAMPLER_NEAREST
|
2023-05-23 03:08:13 +00:00
|
|
|
} GskVulkanRenderSampler;
|
|
|
|
|
2023-07-14 21:22:35 +00:00
|
|
|
typedef void (* GskVulkanDownloadFunc) (gpointer user_data,
|
|
|
|
GdkMemoryFormat format,
|
|
|
|
const guchar *data,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
gsize stride);
|
|
|
|
|
2016-12-08 16:46:08 +00:00
|
|
|
GskVulkanRender * gsk_vulkan_render_new (GskRenderer *renderer,
|
2016-12-08 23:06:59 +00:00
|
|
|
GdkVulkanContext *context);
|
2016-12-08 16:46:08 +00:00
|
|
|
void gsk_vulkan_render_free (GskVulkanRender *self);
|
2016-12-08 12:26:36 +00:00
|
|
|
|
2016-12-08 17:40:35 +00:00
|
|
|
gboolean gsk_vulkan_render_is_busy (GskVulkanRender *self);
|
2023-07-14 20:21:09 +00:00
|
|
|
void gsk_vulkan_render_render (GskVulkanRender *self,
|
2016-12-22 18:01:07 +00:00
|
|
|
GskVulkanImage *target,
|
2018-03-28 13:01:34 +00:00
|
|
|
const graphene_rect_t *rect,
|
2023-07-05 05:06:17 +00:00
|
|
|
const cairo_region_t *clip,
|
2023-07-14 21:22:35 +00:00
|
|
|
GskRenderNode *node,
|
|
|
|
GskVulkanDownloadFunc download_func,
|
|
|
|
gpointer download_data);
|
2016-12-08 17:40:35 +00:00
|
|
|
|
2016-12-08 16:55:32 +00:00
|
|
|
GskRenderer * gsk_vulkan_render_get_renderer (GskVulkanRender *self);
|
2023-07-11 07:35:01 +00:00
|
|
|
GdkVulkanContext * gsk_vulkan_render_get_context (GskVulkanRender *self);
|
2016-12-08 16:55:32 +00:00
|
|
|
|
2023-07-09 18:28:12 +00:00
|
|
|
gpointer gsk_vulkan_render_alloc_op (GskVulkanRender *self,
|
|
|
|
gsize size);
|
|
|
|
|
2023-07-15 09:39:18 +00:00
|
|
|
VkPipelineLayout gsk_vulkan_render_get_pipeline_layout (GskVulkanRender *self);
|
2023-07-08 18:16:39 +00:00
|
|
|
VkPipeline gsk_vulkan_render_get_pipeline (GskVulkanRender *self,
|
2023-07-07 00:38:22 +00:00
|
|
|
const GskVulkanOpClass *op_class,
|
2023-07-15 10:47:35 +00:00
|
|
|
GskVulkanShaderClip clip,
|
2023-06-29 04:36:17 +00:00
|
|
|
VkRenderPass render_pass);
|
2023-07-08 18:40:48 +00:00
|
|
|
VkRenderPass gsk_vulkan_render_get_render_pass (GskVulkanRender *self,
|
|
|
|
VkFormat format,
|
|
|
|
VkImageLayout from_layout,
|
|
|
|
VkImageLayout to_layout);
|
2023-05-23 03:08:13 +00:00
|
|
|
gsize gsk_vulkan_render_get_image_descriptor (GskVulkanRender *self,
|
2023-06-28 18:50:43 +00:00
|
|
|
GskVulkanImage *source,
|
|
|
|
GskVulkanRenderSampler render_sampler);
|
2023-05-25 20:21:23 +00:00
|
|
|
gsize gsk_vulkan_render_get_buffer_descriptor (GskVulkanRender *self,
|
|
|
|
GskVulkanBuffer *buffer);
|
|
|
|
guchar * gsk_vulkan_render_get_buffer_memory (GskVulkanRender *self,
|
|
|
|
gsize size,
|
|
|
|
gsize alignment,
|
|
|
|
gsize *out_offset);
|
2023-05-20 00:56:02 +00:00
|
|
|
|
2023-05-24 14:55:18 +00:00
|
|
|
VkFence gsk_vulkan_render_get_fence (GskVulkanRender *self);
|
2016-12-22 18:01:07 +00:00
|
|
|
|
2016-12-07 13:50:52 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|