diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-01-06 09:36:55 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-01-06 09:36:55 -0500 |
commit | 3771c95c72d591d3ed6ecf143fa85e1fea0a3d11 (patch) | |
tree | fb66e92aee87e28bee3c363a84f7874f763b7bda /gsk/vulkan/gskvulkanpipelineprivate.h | |
parent | 3c38ebb906319cb75688f9929b65ecf2a4fd3440 (diff) | |
download | gtk+-3771c95c72d591d3ed6ecf143fa85e1fea0a3d11.tar.gz |
gsk: Move Vulkan sources to a subdirectory
Following what was already done for GL.
Diffstat (limited to 'gsk/vulkan/gskvulkanpipelineprivate.h')
-rw-r--r-- | gsk/vulkan/gskvulkanpipelineprivate.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gsk/vulkan/gskvulkanpipelineprivate.h b/gsk/vulkan/gskvulkanpipelineprivate.h new file mode 100644 index 0000000000..cd41f822b3 --- /dev/null +++ b/gsk/vulkan/gskvulkanpipelineprivate.h @@ -0,0 +1,53 @@ +#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 ()) + +G_DECLARE_DERIVABLE_TYPE (GskVulkanPipeline, gsk_vulkan_pipeline, GSK, VULKAN_PIPELINE, GObject) + +struct _GskVulkanPipelineClass +{ + GObjectClass parent_class; + + const VkPipelineVertexInputStateCreateInfo * + (* get_input_state_create_info) (GskVulkanPipeline *self); +}; + +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)) + +GskVulkanPipeline * gsk_vulkan_pipeline_new (GType pipeline_type, + GdkVulkanContext *context, + VkPipelineLayout layout, + const char *shader_name, + VkRenderPass render_pass); +GskVulkanPipeline * gsk_vulkan_pipeline_new_full (GType pipeline_type, + GdkVulkanContext *context, + VkPipelineLayout layout, + const char *shader_name, + VkRenderPass render_pass, + VkBlendFactor srcBlendFactor, + VkBlendFactor dstBlendFactor); + +VkPipeline gsk_vulkan_pipeline_get_pipeline (GskVulkanPipeline *self); +VkPipelineLayout gsk_vulkan_pipeline_get_pipeline_layout (GskVulkanPipeline *self); + +G_END_DECLS + +#endif /* __GSK_VULKAN_PIPELINE_PRIVATE_H__ */ |