forked from AuroraMiddleware/gtk
vulkan: Add GskVulkanBlendPipeline
So far that's just a simple pipeline that doesn't do anything.
This commit is contained in:
parent
453478719d
commit
9aecd6dd56
@ -24,6 +24,7 @@ noinst_LTLIBRARIES =
|
||||
|
||||
if HAVE_VULKAN
|
||||
gsk_private_vulan_source_h = \
|
||||
gskvulkanblendpipelineprivate.h \
|
||||
gskvulkanbufferprivate.h \
|
||||
gskvulkancommandpoolprivate.h \
|
||||
gskvulkanimageprivate.h \
|
||||
@ -35,6 +36,7 @@ gsk_private_vulan_source_h = \
|
||||
gskvulkanrenderpassprivate.h \
|
||||
gskvulkanshaderprivate.h
|
||||
gsk_private_vulkan_source_c = \
|
||||
gskvulkanblendpipeline.c \
|
||||
gskvulkanbuffer.c \
|
||||
gskvulkancommandpool.c \
|
||||
gskvulkanimage.c \
|
||||
|
37
gsk/gskvulkanblendpipeline.c
Normal file
37
gsk/gskvulkanblendpipeline.c
Normal file
@ -0,0 +1,37 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gskvulkanblendpipelineprivate.h"
|
||||
|
||||
struct _GskVulkanBlendPipeline
|
||||
{
|
||||
GObject parent_instance;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GskVulkanBlendPipeline, gsk_vulkan_blend_pipeline, G_TYPE_OBJECT)
|
||||
|
||||
static void
|
||||
gsk_vulkan_blend_pipeline_finalize (GObject *gobject)
|
||||
{
|
||||
//GskVulkanBlendPipeline *self = GSK_VULKAN_BLEND_PIPELINE (gobject);
|
||||
|
||||
G_OBJECT_CLASS (gsk_vulkan_blend_pipeline_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_blend_pipeline_class_init (GskVulkanBlendPipelineClass *klass)
|
||||
{
|
||||
G_OBJECT_CLASS (klass)->finalize = gsk_vulkan_blend_pipeline_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_blend_pipeline_init (GskVulkanBlendPipeline *self)
|
||||
{
|
||||
}
|
||||
|
||||
GskVulkanPipeline *
|
||||
gsk_vulkan_blend_pipeline_new (GskVulkanPipelineLayout *layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass)
|
||||
{
|
||||
return gsk_vulkan_pipeline_new (GSK_TYPE_VULKAN_BLEND_PIPELINE, layout, shader_name, render_pass);
|
||||
}
|
22
gsk/gskvulkanblendpipelineprivate.h
Normal file
22
gsk/gskvulkanblendpipelineprivate.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef __GSK_VULKAN_BLEND_PIPELINE_PRIVATE_H__
|
||||
#define __GSK_VULKAN_BLEND_PIPELINE_PRIVATE_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#include "gskvulkanpipelineprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GskVulkanBlendPipelineLayout GskVulkanBlendPipelineLayout;
|
||||
|
||||
#define GSK_TYPE_VULKAN_BLEND_PIPELINE (gsk_vulkan_blend_pipeline_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (GskVulkanBlendPipeline, gsk_vulkan_blend_pipeline, GSK, VULKAN_BLEND_PIPELINE, GskVulkanPipeline)
|
||||
|
||||
GskVulkanPipeline * gsk_vulkan_blend_pipeline_new (GskVulkanPipelineLayout * layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GSK_VULKAN_BLEND_PIPELINE_PRIVATE_H__ */
|
@ -63,7 +63,8 @@ gsk_vulkan_pipeline_init (GskVulkanPipeline *self)
|
||||
}
|
||||
|
||||
GskVulkanPipeline *
|
||||
gsk_vulkan_pipeline_new (GskVulkanPipelineLayout *layout,
|
||||
gsk_vulkan_pipeline_new (GType pipeline_type,
|
||||
GskVulkanPipelineLayout *layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass)
|
||||
{
|
||||
@ -72,11 +73,12 @@ gsk_vulkan_pipeline_new (GskVulkanPipelineLayout *layout,
|
||||
|
||||
VkDevice device;
|
||||
|
||||
g_return_val_if_fail (!g_type_is_a (pipeline_type, GSK_TYPE_VULKAN_PIPELINE), NULL);
|
||||
g_return_val_if_fail (layout != NULL, NULL);
|
||||
g_return_val_if_fail (shader_name != NULL, NULL);
|
||||
g_return_val_if_fail (render_pass != VK_NULL_HANDLE, NULL);
|
||||
|
||||
self = g_object_new (GSK_TYPE_VULKAN_PIPELINE, NULL);
|
||||
self = g_object_new (pipeline_type, NULL);
|
||||
|
||||
priv = gsk_vulkan_pipeline_get_instance_private (self);
|
||||
|
||||
|
@ -41,7 +41,8 @@ VkDescriptorSetLayout gsk_vulkan_pipeline_layout_get_descriptor_set_la
|
||||
(GskVulkanPipelineLayout *self);
|
||||
|
||||
|
||||
GskVulkanPipeline * gsk_vulkan_pipeline_new (GskVulkanPipelineLayout *layout,
|
||||
GskVulkanPipeline * gsk_vulkan_pipeline_new (GType pipeline_type,
|
||||
GskVulkanPipelineLayout *layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass);
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "gskvulkanrenderprivate.h"
|
||||
|
||||
#include "gskrendererprivate.h"
|
||||
#include "gskvulkanblendpipelineprivate.h"
|
||||
#include "gskvulkanbufferprivate.h"
|
||||
#include "gskvulkancommandpoolprivate.h"
|
||||
#include "gskvulkanpipelineprivate.h"
|
||||
@ -298,9 +299,9 @@ gsk_vulkan_render_get_pipeline (GskVulkanRender *self,
|
||||
|
||||
if (self->pipelines[type] == NULL)
|
||||
{
|
||||
self->pipelines[type] = gsk_vulkan_pipeline_new (self->layout,
|
||||
pipeline_info[type].name,
|
||||
self->render_pass);
|
||||
self->pipelines[type] = gsk_vulkan_blend_pipeline_new (self->layout,
|
||||
pipeline_info[type].name,
|
||||
self->render_pass);
|
||||
}
|
||||
|
||||
return self->pipelines[type];
|
||||
|
Loading…
Reference in New Issue
Block a user