2016-12-07 13:50:52 +00:00
|
|
|
#ifndef __GSK_VULKAN_RENDER_PRIVATE_H__
|
|
|
|
#define __GSK_VULKAN_RENDER_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
2016-12-08 12:26:36 +00:00
|
|
|
#include <gsk/gskrendernode.h>
|
|
|
|
|
|
|
|
#include "gsk/gskvulkanimageprivate.h"
|
|
|
|
#include "gsk/gskvulkanpipelineprivate.h"
|
2017-09-28 00:55:14 +00:00
|
|
|
#include "gsk/gskvulkanrenderpassprivate.h"
|
|
|
|
#include "gsk/gskprivate.h"
|
2016-12-07 13:50:52 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2016-12-14 08:40:15 +00:00
|
|
|
typedef enum {
|
2017-09-30 02:24:53 +00:00
|
|
|
GSK_VULKAN_PIPELINE_TEXTURE,
|
|
|
|
GSK_VULKAN_PIPELINE_TEXTURE_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED,
|
2016-12-14 08:40:15 +00:00
|
|
|
GSK_VULKAN_PIPELINE_COLOR,
|
2016-12-25 05:01:54 +00:00
|
|
|
GSK_VULKAN_PIPELINE_COLOR_CLIP,
|
2016-12-24 05:16:54 +00:00
|
|
|
GSK_VULKAN_PIPELINE_COLOR_CLIP_ROUNDED,
|
2016-12-26 16:11:13 +00:00
|
|
|
GSK_VULKAN_PIPELINE_LINEAR_GRADIENT,
|
|
|
|
GSK_VULKAN_PIPELINE_LINEAR_GRADIENT_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_LINEAR_GRADIENT_CLIP_ROUNDED,
|
2016-12-31 12:24:21 +00:00
|
|
|
GSK_VULKAN_PIPELINE_COLOR_MATRIX,
|
|
|
|
GSK_VULKAN_PIPELINE_COLOR_MATRIX_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_COLOR_MATRIX_CLIP_ROUNDED,
|
2017-01-10 13:59:20 +00:00
|
|
|
GSK_VULKAN_PIPELINE_BORDER,
|
|
|
|
GSK_VULKAN_PIPELINE_BORDER_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_BORDER_CLIP_ROUNDED,
|
2017-01-18 03:07:09 +00:00
|
|
|
GSK_VULKAN_PIPELINE_INSET_SHADOW,
|
|
|
|
GSK_VULKAN_PIPELINE_INSET_SHADOW_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_INSET_SHADOW_CLIP_ROUNDED,
|
|
|
|
GSK_VULKAN_PIPELINE_OUTSET_SHADOW,
|
|
|
|
GSK_VULKAN_PIPELINE_OUTSET_SHADOW_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_OUTSET_SHADOW_CLIP_ROUNDED,
|
2017-09-03 13:54:47 +00:00
|
|
|
GSK_VULKAN_PIPELINE_BLUR,
|
|
|
|
GSK_VULKAN_PIPELINE_BLUR_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_BLUR_CLIP_ROUNDED,
|
2017-09-01 20:58:42 +00:00
|
|
|
GSK_VULKAN_PIPELINE_TEXT,
|
|
|
|
GSK_VULKAN_PIPELINE_TEXT_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_TEXT_CLIP_ROUNDED,
|
|
|
|
GSK_VULKAN_PIPELINE_COLOR_TEXT,
|
|
|
|
GSK_VULKAN_PIPELINE_COLOR_TEXT_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_COLOR_TEXT_CLIP_ROUNDED,
|
2017-09-22 18:20:57 +00:00
|
|
|
GSK_VULKAN_PIPELINE_CROSS_FADE,
|
|
|
|
GSK_VULKAN_PIPELINE_CROSS_FADE_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_CROSS_FADE_CLIP_ROUNDED,
|
2017-09-23 05:59:50 +00:00
|
|
|
GSK_VULKAN_PIPELINE_BLEND_MODE,
|
|
|
|
GSK_VULKAN_PIPELINE_BLEND_MODE_CLIP,
|
|
|
|
GSK_VULKAN_PIPELINE_BLEND_MODE_CLIP_ROUNDED,
|
2016-12-14 08:40:15 +00:00
|
|
|
/* add more */
|
|
|
|
GSK_VULKAN_N_PIPELINES
|
|
|
|
} GskVulkanPipelineType;
|
|
|
|
|
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);
|
2016-12-08 21:35:16 +00:00
|
|
|
void gsk_vulkan_render_reset (GskVulkanRender *self,
|
2016-12-22 18:01:07 +00:00
|
|
|
GskVulkanImage *target,
|
|
|
|
const graphene_rect_t *rect);
|
2016-12-08 17:40:35 +00:00
|
|
|
|
2016-12-08 16:55:32 +00:00
|
|
|
GskRenderer * gsk_vulkan_render_get_renderer (GskVulkanRender *self);
|
|
|
|
|
2016-12-08 12:26:36 +00:00
|
|
|
void gsk_vulkan_render_add_cleanup_image (GskVulkanRender *self,
|
|
|
|
GskVulkanImage *image);
|
|
|
|
|
|
|
|
void gsk_vulkan_render_add_node (GskVulkanRender *self,
|
|
|
|
GskRenderNode *node);
|
|
|
|
|
2017-09-28 00:56:01 +00:00
|
|
|
void gsk_vulkan_render_add_node_for_texture (GskVulkanRender *self,
|
|
|
|
GskRenderNode *node,
|
2017-09-29 19:45:37 +00:00
|
|
|
const graphene_matrix_t *mv,
|
2017-09-28 00:56:01 +00:00
|
|
|
const graphene_rect_t *bounds,
|
|
|
|
GskVulkanImage *target,
|
|
|
|
VkSemaphore semaphore);
|
|
|
|
|
|
|
|
|
2016-12-08 12:26:36 +00:00
|
|
|
void gsk_vulkan_render_upload (GskVulkanRender *self);
|
|
|
|
|
2016-12-14 08:40:15 +00:00
|
|
|
GskVulkanPipeline * gsk_vulkan_render_get_pipeline (GskVulkanRender *self,
|
|
|
|
GskVulkanPipelineType pipeline_type);
|
2016-12-09 01:55:47 +00:00
|
|
|
VkDescriptorSet gsk_vulkan_render_get_descriptor_set (GskVulkanRender *self,
|
|
|
|
gsize id);
|
|
|
|
gsize gsk_vulkan_render_reserve_descriptor_set (GskVulkanRender *self,
|
2017-09-30 03:01:34 +00:00
|
|
|
GskVulkanImage *source,
|
|
|
|
gboolean repeat);
|
2017-09-30 02:38:59 +00:00
|
|
|
void gsk_vulkan_render_draw (GskVulkanRender *self);
|
2016-12-07 13:50:52 +00:00
|
|
|
|
2016-12-08 17:03:05 +00:00
|
|
|
void gsk_vulkan_render_submit (GskVulkanRender *self);
|
2016-12-07 13:50:52 +00:00
|
|
|
|
2016-12-22 18:01:07 +00:00
|
|
|
GskTexture * gsk_vulkan_render_download_target (GskVulkanRender *self);
|
2017-09-28 00:56:01 +00:00
|
|
|
VkFramebuffer gsk_vulkan_render_get_framebuffer (GskVulkanRender *self,
|
|
|
|
GskVulkanImage *image);
|
2016-12-22 18:01:07 +00:00
|
|
|
|
2016-12-07 13:50:52 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_VULKAN_RENDER_PRIVATE_H__ */
|