2016-12-05 01:50:06 +00:00
|
|
|
#ifndef __GSK_VULKAN_PIPELINE_PRIVATE_H__
|
|
|
|
#define __GSK_VULKAN_PIPELINE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
|
|
|
|
#include "gskdebugprivate.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GSK_TYPE_VULKAN_PIPELINE (gsk_vulkan_pipeline_get_type ())
|
|
|
|
|
2016-12-17 23:33:53 +00:00
|
|
|
G_DECLARE_DERIVABLE_TYPE (GskVulkanPipeline, gsk_vulkan_pipeline, GSK, VULKAN_PIPELINE, GObject)
|
|
|
|
|
|
|
|
struct _GskVulkanPipelineClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2016-12-18 04:33:16 +00:00
|
|
|
|
|
|
|
const VkPipelineVertexInputStateCreateInfo *
|
|
|
|
(* get_input_state_create_info) (GskVulkanPipeline *self);
|
2016-12-17 23:33:53 +00:00
|
|
|
};
|
2016-12-05 01:50:06 +00:00
|
|
|
|
|
|
|
static inline VkResult
|
|
|
|
gsk_vulkan_handle_result (VkResult res,
|
|
|
|
const char *called_function)
|
|
|
|
{
|
|
|
|
if (res != VK_SUCCESS)
|
|
|
|
{
|
|
|
|
GSK_NOTE (VULKAN,g_printerr ("%s(): %s (%d)\n", called_function, gdk_vulkan_strerror (res), res));
|
|
|
|
}
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
#define GSK_VK_CHECK(func, ...) gsk_vulkan_handle_result (func (__VA_ARGS__), G_STRINGIFY (func))
|
|
|
|
|
2016-12-17 23:57:37 +00:00
|
|
|
GskVulkanPipeline * gsk_vulkan_pipeline_new (GType pipeline_type,
|
2017-09-22 17:30:26 +00:00
|
|
|
GdkVulkanContext *context,
|
|
|
|
VkPipelineLayout layout,
|
2016-12-14 07:00:58 +00:00
|
|
|
const char *shader_name,
|
|
|
|
VkRenderPass render_pass);
|
2017-09-01 20:58:42 +00:00
|
|
|
GskVulkanPipeline * gsk_vulkan_pipeline_new_full (GType pipeline_type,
|
2017-09-22 17:30:26 +00:00
|
|
|
GdkVulkanContext *context,
|
|
|
|
VkPipelineLayout layout,
|
2017-09-01 20:58:42 +00:00
|
|
|
const char *shader_name,
|
|
|
|
VkRenderPass render_pass,
|
|
|
|
VkBlendFactor srcBlendFactor,
|
|
|
|
VkBlendFactor dstBlendFactor);
|
2016-12-05 01:50:06 +00:00
|
|
|
|
2016-12-14 07:00:58 +00:00
|
|
|
VkPipeline gsk_vulkan_pipeline_get_pipeline (GskVulkanPipeline *self);
|
2017-09-22 14:13:25 +00:00
|
|
|
VkPipelineLayout gsk_vulkan_pipeline_get_pipeline_layout (GskVulkanPipeline *self);
|
2016-12-05 01:50:06 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_VULKAN_PIPELINE_PRIVATE_H__ */
|