2016-12-14 06:21:21 +00:00
|
|
|
#ifndef __GSK_VULKAN_PUSH_CONSTANTS_PRIVATE_H__
|
|
|
|
#define __GSK_VULKAN_PUSH_CONSTANTS_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <graphene.h>
|
2016-12-24 03:58:51 +00:00
|
|
|
#include <gsk/gskvulkanclipprivate.h>
|
2016-12-14 06:21:21 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _GskVulkanPushConstants GskVulkanPushConstants;
|
2016-12-24 03:10:00 +00:00
|
|
|
typedef struct _GskVulkanPushConstantsWire GskVulkanPushConstantsWire;
|
2016-12-14 06:21:21 +00:00
|
|
|
|
|
|
|
struct _GskVulkanPushConstants
|
2016-12-24 03:10:00 +00:00
|
|
|
{
|
|
|
|
graphene_matrix_t mvp;
|
2016-12-24 03:58:51 +00:00
|
|
|
GskVulkanClip clip;
|
2016-12-24 03:10:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GskVulkanPushConstantsWire
|
2016-12-14 06:21:21 +00:00
|
|
|
{
|
|
|
|
struct {
|
|
|
|
float mvp[16];
|
2016-12-24 03:58:51 +00:00
|
|
|
float clip[12];
|
2016-12-14 06:21:21 +00:00
|
|
|
} vertex;
|
2016-12-18 06:07:02 +00:00
|
|
|
#if 0
|
2016-12-14 06:21:21 +00:00
|
|
|
struct {
|
|
|
|
} fragment;
|
2016-12-18 06:07:02 +00:00
|
|
|
#endif
|
2016-12-14 06:21:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const VkPushConstantRange *
|
|
|
|
gst_vulkan_push_constants_get_ranges (void) G_GNUC_PURE;
|
|
|
|
uint32_t gst_vulkan_push_constants_get_range_count (void) G_GNUC_PURE;
|
|
|
|
|
|
|
|
void gsk_vulkan_push_constants_init (GskVulkanPushConstants *constants,
|
2016-12-24 03:58:51 +00:00
|
|
|
const graphene_matrix_t *mvp,
|
|
|
|
const graphene_rect_t *viewport);
|
2016-12-14 06:21:21 +00:00
|
|
|
void gsk_vulkan_push_constants_init_copy (GskVulkanPushConstants *self,
|
|
|
|
const GskVulkanPushConstants *src);
|
2016-12-24 03:58:51 +00:00
|
|
|
|
|
|
|
gboolean gsk_vulkan_push_constants_transform (GskVulkanPushConstants *self,
|
|
|
|
const GskVulkanPushConstants *src,
|
|
|
|
const graphene_matrix_t *transform,
|
|
|
|
const graphene_rect_t *viewport);
|
|
|
|
gboolean gsk_vulkan_push_constants_intersect_rect (GskVulkanPushConstants *self,
|
|
|
|
const GskVulkanPushConstants *src,
|
|
|
|
const graphene_rect_t *rect);
|
|
|
|
gboolean gsk_vulkan_push_constants_intersect_rounded (GskVulkanPushConstants *self,
|
2016-12-24 03:10:00 +00:00
|
|
|
const GskVulkanPushConstants *src,
|
2016-12-24 03:58:51 +00:00
|
|
|
const GskRoundedRect *rect);
|
2016-12-14 06:21:21 +00:00
|
|
|
|
2016-12-24 03:10:00 +00:00
|
|
|
void gsk_vulkan_push_constants_push_vertex (const GskVulkanPushConstants *self,
|
2016-12-14 06:21:21 +00:00
|
|
|
VkCommandBuffer command_buffer,
|
|
|
|
VkPipelineLayout pipeline_layout);
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_VULKAN_PUSH_CONSTANTS_PRIVATE_H__ */
|