vulkan: Rename blend pipeline to texture
This is what it does, and the name blend is easily confused with blend-mode.
This commit is contained in:
@@ -1,122 +0,0 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gskvulkanblendpipelineprivate.h"
|
||||
|
||||
struct _GskVulkanBlendPipeline
|
||||
{
|
||||
GObject parent_instance;
|
||||
};
|
||||
|
||||
typedef struct _GskVulkanBlendInstance GskVulkanBlendInstance;
|
||||
|
||||
struct _GskVulkanBlendInstance
|
||||
{
|
||||
float rect[4];
|
||||
float tex_rect[4];
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GskVulkanBlendPipeline, gsk_vulkan_blend_pipeline, GSK_TYPE_VULKAN_PIPELINE)
|
||||
|
||||
static const VkPipelineVertexInputStateCreateInfo *
|
||||
gsk_vulkan_blend_pipeline_get_input_state_create_info (GskVulkanPipeline *self)
|
||||
{
|
||||
static const VkVertexInputBindingDescription vertexBindingDescriptions[] = {
|
||||
{
|
||||
.binding = 0,
|
||||
.stride = sizeof (GskVulkanBlendInstance),
|
||||
.inputRate = VK_VERTEX_INPUT_RATE_INSTANCE
|
||||
}
|
||||
};
|
||||
static const VkVertexInputAttributeDescription vertexInputAttributeDescription[] = {
|
||||
{
|
||||
.location = 0,
|
||||
.binding = 0,
|
||||
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
|
||||
.offset = G_STRUCT_OFFSET (GskVulkanBlendInstance, rect),
|
||||
},
|
||||
{
|
||||
.location = 1,
|
||||
.binding = 0,
|
||||
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
|
||||
.offset = G_STRUCT_OFFSET (GskVulkanBlendInstance, tex_rect),
|
||||
}
|
||||
};
|
||||
static const VkPipelineVertexInputStateCreateInfo info = {
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
|
||||
.vertexBindingDescriptionCount = G_N_ELEMENTS (vertexBindingDescriptions),
|
||||
.pVertexBindingDescriptions = vertexBindingDescriptions,
|
||||
.vertexAttributeDescriptionCount = G_N_ELEMENTS (vertexInputAttributeDescription),
|
||||
.pVertexAttributeDescriptions = vertexInputAttributeDescription
|
||||
};
|
||||
|
||||
return &info;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
GskVulkanPipelineClass *pipeline_class = GSK_VULKAN_PIPELINE_CLASS (klass);
|
||||
|
||||
G_OBJECT_CLASS (klass)->finalize = gsk_vulkan_blend_pipeline_finalize;
|
||||
|
||||
pipeline_class->get_input_state_create_info = gsk_vulkan_blend_pipeline_get_input_state_create_info;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_blend_pipeline_init (GskVulkanBlendPipeline *self)
|
||||
{
|
||||
}
|
||||
|
||||
GskVulkanPipeline *
|
||||
gsk_vulkan_blend_pipeline_new (GdkVulkanContext *context,
|
||||
VkPipelineLayout layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass)
|
||||
{
|
||||
return gsk_vulkan_pipeline_new (GSK_TYPE_VULKAN_BLEND_PIPELINE, context, layout, shader_name, render_pass);
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_vulkan_blend_pipeline_count_vertex_data (GskVulkanBlendPipeline *pipeline)
|
||||
{
|
||||
return sizeof (GskVulkanBlendInstance);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_vulkan_blend_pipeline_collect_vertex_data (GskVulkanBlendPipeline *pipeline,
|
||||
guchar *data,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_rect_t *tex_rect)
|
||||
{
|
||||
GskVulkanBlendInstance *instance = (GskVulkanBlendInstance *) data;
|
||||
|
||||
instance->rect[0] = rect->origin.x;
|
||||
instance->rect[1] = rect->origin.y;
|
||||
instance->rect[2] = rect->size.width;
|
||||
instance->rect[3] = rect->size.height;
|
||||
instance->tex_rect[0] = (rect->origin.x - tex_rect->origin.x)/tex_rect->size.width;
|
||||
instance->tex_rect[1] = (rect->origin.y - tex_rect->origin.y)/tex_rect->size.height;
|
||||
instance->tex_rect[2] = (rect->size.width + rect->origin.x - tex_rect->origin.x)/tex_rect->size.width;
|
||||
instance->tex_rect[3] = (rect->size.height + rect->origin.y - tex_rect->origin.y)/tex_rect->size.height;
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_vulkan_blend_pipeline_draw (GskVulkanBlendPipeline *pipeline,
|
||||
VkCommandBuffer command_buffer,
|
||||
gsize offset,
|
||||
gsize n_commands)
|
||||
{
|
||||
vkCmdDraw (command_buffer,
|
||||
6, n_commands,
|
||||
0, offset);
|
||||
|
||||
return n_commands;
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
#ifndef __GSK_VULKAN_BLEND_PIPELINE_PRIVATE_H__
|
||||
#define __GSK_VULKAN_BLEND_PIPELINE_PRIVATE_H__
|
||||
|
||||
#include <graphene.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 (GdkVulkanContext *context,
|
||||
VkPipelineLayout layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass);
|
||||
|
||||
gsize gsk_vulkan_blend_pipeline_count_vertex_data (GskVulkanBlendPipeline *pipeline);
|
||||
void gsk_vulkan_blend_pipeline_collect_vertex_data (GskVulkanBlendPipeline *pipeline,
|
||||
guchar *data,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_rect_t *tex_rect);
|
||||
gsize gsk_vulkan_blend_pipeline_draw (GskVulkanBlendPipeline *pipeline,
|
||||
VkCommandBuffer command_buffer,
|
||||
gsize offset,
|
||||
gsize n_commands);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GSK_VULKAN_BLEND_PIPELINE_PRIVATE_H__ */
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "gskvulkanrenderpassprivate.h"
|
||||
|
||||
#include "gskvulkanblendmodepipelineprivate.h"
|
||||
#include "gskvulkanblendpipelineprivate.h"
|
||||
#include "gskvulkanblurpipelineprivate.h"
|
||||
#include "gskvulkanborderpipelineprivate.h"
|
||||
#include "gskvulkanboxshadowpipelineprivate.h"
|
||||
@@ -21,6 +20,7 @@
|
||||
#include "gskvulkaneffectpipelineprivate.h"
|
||||
#include "gskvulkanlineargradientpipelineprivate.h"
|
||||
#include "gskvulkantextpipelineprivate.h"
|
||||
#include "gskvulkantexturepipelineprivate.h"
|
||||
#include "gskvulkanpushconstantsprivate.h"
|
||||
|
||||
#define DESCRIPTOR_POOL_MAXSETS 128
|
||||
@@ -366,9 +366,9 @@ gsk_vulkan_render_get_pipeline (GskVulkanRender *self,
|
||||
guint num_textures;
|
||||
GskVulkanPipeline * (* create_func) (GdkVulkanContext *context, VkPipelineLayout layout, const char *name, VkRenderPass render_pass);
|
||||
} pipeline_info[GSK_VULKAN_N_PIPELINES] = {
|
||||
{ "blend", 1, gsk_vulkan_blend_pipeline_new },
|
||||
{ "blend-clip", 1, gsk_vulkan_blend_pipeline_new },
|
||||
{ "blend-clip-rounded", 1, gsk_vulkan_blend_pipeline_new },
|
||||
{ "texture", 1, gsk_vulkan_texture_pipeline_new },
|
||||
{ "texture-clip", 1, gsk_vulkan_texture_pipeline_new },
|
||||
{ "texture-clip-rounded", 1, gsk_vulkan_texture_pipeline_new },
|
||||
{ "color", 0, gsk_vulkan_color_pipeline_new },
|
||||
{ "color-clip", 0, gsk_vulkan_color_pipeline_new },
|
||||
{ "color-clip-rounded", 0, gsk_vulkan_color_pipeline_new },
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "gskrendererprivate.h"
|
||||
#include "gskroundedrectprivate.h"
|
||||
#include "gskvulkanblendmodepipelineprivate.h"
|
||||
#include "gskvulkanblendpipelineprivate.h"
|
||||
#include "gskvulkanblurpipelineprivate.h"
|
||||
#include "gskvulkanborderpipelineprivate.h"
|
||||
#include "gskvulkanboxshadowpipelineprivate.h"
|
||||
@@ -20,6 +19,7 @@
|
||||
#include "gskvulkaneffectpipelineprivate.h"
|
||||
#include "gskvulkanlineargradientpipelineprivate.h"
|
||||
#include "gskvulkantextpipelineprivate.h"
|
||||
#include "gskvulkantexturepipelineprivate.h"
|
||||
#include "gskvulkanimageprivate.h"
|
||||
#include "gskvulkanpushconstantsprivate.h"
|
||||
#include "gskvulkanrendererprivate.h"
|
||||
@@ -338,11 +338,11 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
if (gsk_cairo_node_get_surface (node) == NULL)
|
||||
return;
|
||||
if (gsk_vulkan_clip_contains_rect (&constants->clip, &node->bounds))
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND;
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE;
|
||||
else if (constants->clip.type == GSK_VULKAN_CLIP_RECT)
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND_CLIP;
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP;
|
||||
else if (constants->clip.type == GSK_VULKAN_CLIP_ROUNDED_CIRCULAR)
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND_CLIP_ROUNDED;
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED;
|
||||
else
|
||||
FALLBACK ("Cairo nodes can't deal with clip type %u\n", constants->clip.type);
|
||||
op.type = GSK_VULKAN_OP_SURFACE;
|
||||
@@ -423,11 +423,11 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
|
||||
case GSK_TEXTURE_NODE:
|
||||
if (gsk_vulkan_clip_contains_rect (&constants->clip, &node->bounds))
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND;
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE;
|
||||
else if (constants->clip.type == GSK_VULKAN_CLIP_RECT)
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND_CLIP;
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP;
|
||||
else if (constants->clip.type == GSK_VULKAN_CLIP_ROUNDED_CIRCULAR)
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_BLEND_CLIP_ROUNDED;
|
||||
pipeline_type = GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED;
|
||||
else
|
||||
FALLBACK ("Texture nodes can't deal with clip type %u\n", constants->clip.type);
|
||||
op.type = GSK_VULKAN_OP_TEXTURE;
|
||||
@@ -622,7 +622,7 @@ fallback:
|
||||
g_assert_not_reached ();
|
||||
return;
|
||||
}
|
||||
op.render.pipeline = gsk_vulkan_render_get_pipeline (render, GSK_VULKAN_PIPELINE_BLEND);
|
||||
op.render.pipeline = gsk_vulkan_render_get_pipeline (render, GSK_VULKAN_PIPELINE_TEXTURE);
|
||||
g_array_append_val (self->render_ops, op);
|
||||
}
|
||||
#undef FALLBACK
|
||||
@@ -959,7 +959,7 @@ gsk_vulkan_render_pass_count_vertex_data (GskVulkanRenderPass *self)
|
||||
case GSK_VULKAN_OP_FALLBACK_ROUNDED_CLIP:
|
||||
case GSK_VULKAN_OP_SURFACE:
|
||||
case GSK_VULKAN_OP_TEXTURE:
|
||||
op->render.vertex_count = gsk_vulkan_blend_pipeline_count_vertex_data (GSK_VULKAN_BLEND_PIPELINE (op->render.pipeline));
|
||||
op->render.vertex_count = gsk_vulkan_texture_pipeline_count_vertex_data (GSK_VULKAN_TEXTURE_PIPELINE (op->render.pipeline));
|
||||
n_bytes += op->render.vertex_count;
|
||||
break;
|
||||
|
||||
@@ -1053,7 +1053,7 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
case GSK_VULKAN_OP_TEXTURE:
|
||||
{
|
||||
op->render.vertex_offset = offset + n_bytes;
|
||||
gsk_vulkan_blend_pipeline_collect_vertex_data (GSK_VULKAN_BLEND_PIPELINE (op->render.pipeline),
|
||||
gsk_vulkan_texture_pipeline_collect_vertex_data (GSK_VULKAN_TEXTURE_PIPELINE (op->render.pipeline),
|
||||
data + n_bytes + offset,
|
||||
&op->render.node->bounds,
|
||||
&op->render.node->bounds);
|
||||
@@ -1391,9 +1391,9 @@ gsk_vulkan_render_pass_draw_rect (GskVulkanRenderPass *self,
|
||||
0,
|
||||
NULL);
|
||||
|
||||
current_draw_index += gsk_vulkan_blend_pipeline_draw (GSK_VULKAN_BLEND_PIPELINE (current_pipeline),
|
||||
command_buffer,
|
||||
current_draw_index, 1);
|
||||
current_draw_index += gsk_vulkan_texture_pipeline_draw (GSK_VULKAN_TEXTURE_PIPELINE (current_pipeline),
|
||||
command_buffer,
|
||||
current_draw_index, 1);
|
||||
break;
|
||||
|
||||
case GSK_VULKAN_OP_TEXT:
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef enum {
|
||||
GSK_VULKAN_PIPELINE_BLEND,
|
||||
GSK_VULKAN_PIPELINE_BLEND_CLIP,
|
||||
GSK_VULKAN_PIPELINE_BLEND_CLIP_ROUNDED,
|
||||
GSK_VULKAN_PIPELINE_TEXTURE,
|
||||
GSK_VULKAN_PIPELINE_TEXTURE_CLIP,
|
||||
GSK_VULKAN_PIPELINE_TEXTURE_CLIP_ROUNDED,
|
||||
GSK_VULKAN_PIPELINE_COLOR,
|
||||
GSK_VULKAN_PIPELINE_COLOR_CLIP,
|
||||
GSK_VULKAN_PIPELINE_COLOR_CLIP_ROUNDED,
|
||||
|
||||
122
gsk/gskvulkantexturepipeline.c
Normal file
122
gsk/gskvulkantexturepipeline.c
Normal file
@@ -0,0 +1,122 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gskvulkantexturepipelineprivate.h"
|
||||
|
||||
struct _GskVulkanTexturePipeline
|
||||
{
|
||||
GObject parent_instance;
|
||||
};
|
||||
|
||||
typedef struct _GskVulkanTextureInstance GskVulkanTextureInstance;
|
||||
|
||||
struct _GskVulkanTextureInstance
|
||||
{
|
||||
float rect[4];
|
||||
float tex_rect[4];
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (GskVulkanTexturePipeline, gsk_vulkan_texture_pipeline, GSK_TYPE_VULKAN_PIPELINE)
|
||||
|
||||
static const VkPipelineVertexInputStateCreateInfo *
|
||||
gsk_vulkan_texture_pipeline_get_input_state_create_info (GskVulkanPipeline *self)
|
||||
{
|
||||
static const VkVertexInputBindingDescription vertexBindingDescriptions[] = {
|
||||
{
|
||||
.binding = 0,
|
||||
.stride = sizeof (GskVulkanTextureInstance),
|
||||
.inputRate = VK_VERTEX_INPUT_RATE_INSTANCE
|
||||
}
|
||||
};
|
||||
static const VkVertexInputAttributeDescription vertexInputAttributeDescription[] = {
|
||||
{
|
||||
.location = 0,
|
||||
.binding = 0,
|
||||
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
|
||||
.offset = G_STRUCT_OFFSET (GskVulkanTextureInstance, rect),
|
||||
},
|
||||
{
|
||||
.location = 1,
|
||||
.binding = 0,
|
||||
.format = VK_FORMAT_R32G32B32A32_SFLOAT,
|
||||
.offset = G_STRUCT_OFFSET (GskVulkanTextureInstance, tex_rect),
|
||||
}
|
||||
};
|
||||
static const VkPipelineVertexInputStateCreateInfo info = {
|
||||
.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO,
|
||||
.vertexBindingDescriptionCount = G_N_ELEMENTS (vertexBindingDescriptions),
|
||||
.pVertexBindingDescriptions = vertexBindingDescriptions,
|
||||
.vertexAttributeDescriptionCount = G_N_ELEMENTS (vertexInputAttributeDescription),
|
||||
.pVertexAttributeDescriptions = vertexInputAttributeDescription
|
||||
};
|
||||
|
||||
return &info;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_texture_pipeline_finalize (GObject *gobject)
|
||||
{
|
||||
//GskVulkanTexturePipeline *self = GSK_VULKAN_TEXTURE_PIPELINE (gobject);
|
||||
|
||||
G_OBJECT_CLASS (gsk_vulkan_texture_pipeline_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_texture_pipeline_class_init (GskVulkanTexturePipelineClass *klass)
|
||||
{
|
||||
GskVulkanPipelineClass *pipeline_class = GSK_VULKAN_PIPELINE_CLASS (klass);
|
||||
|
||||
G_OBJECT_CLASS (klass)->finalize = gsk_vulkan_texture_pipeline_finalize;
|
||||
|
||||
pipeline_class->get_input_state_create_info = gsk_vulkan_texture_pipeline_get_input_state_create_info;
|
||||
}
|
||||
|
||||
static void
|
||||
gsk_vulkan_texture_pipeline_init (GskVulkanTexturePipeline *self)
|
||||
{
|
||||
}
|
||||
|
||||
GskVulkanPipeline *
|
||||
gsk_vulkan_texture_pipeline_new (GdkVulkanContext *context,
|
||||
VkPipelineLayout layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass)
|
||||
{
|
||||
return gsk_vulkan_pipeline_new (GSK_TYPE_VULKAN_TEXTURE_PIPELINE, context, layout, shader_name, render_pass);
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_vulkan_texture_pipeline_count_vertex_data (GskVulkanTexturePipeline *pipeline)
|
||||
{
|
||||
return sizeof (GskVulkanTextureInstance);
|
||||
}
|
||||
|
||||
void
|
||||
gsk_vulkan_texture_pipeline_collect_vertex_data (GskVulkanTexturePipeline *pipeline,
|
||||
guchar *data,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_rect_t *tex_rect)
|
||||
{
|
||||
GskVulkanTextureInstance *instance = (GskVulkanTextureInstance *) data;
|
||||
|
||||
instance->rect[0] = rect->origin.x;
|
||||
instance->rect[1] = rect->origin.y;
|
||||
instance->rect[2] = rect->size.width;
|
||||
instance->rect[3] = rect->size.height;
|
||||
instance->tex_rect[0] = (rect->origin.x - tex_rect->origin.x)/tex_rect->size.width;
|
||||
instance->tex_rect[1] = (rect->origin.y - tex_rect->origin.y)/tex_rect->size.height;
|
||||
instance->tex_rect[2] = (rect->size.width + rect->origin.x - tex_rect->origin.x)/tex_rect->size.width;
|
||||
instance->tex_rect[3] = (rect->size.height + rect->origin.y - tex_rect->origin.y)/tex_rect->size.height;
|
||||
}
|
||||
|
||||
gsize
|
||||
gsk_vulkan_texture_pipeline_draw (GskVulkanTexturePipeline *pipeline,
|
||||
VkCommandBuffer command_buffer,
|
||||
gsize offset,
|
||||
gsize n_commands)
|
||||
{
|
||||
vkCmdDraw (command_buffer,
|
||||
6, n_commands,
|
||||
0, offset);
|
||||
|
||||
return n_commands;
|
||||
}
|
||||
33
gsk/gskvulkantexturepipelineprivate.h
Normal file
33
gsk/gskvulkantexturepipelineprivate.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef __GSK_VULKAN_TEXTURE_PIPELINE_PRIVATE_H__
|
||||
#define __GSK_VULKAN_TEXTURE_PIPELINE_PRIVATE_H__
|
||||
|
||||
#include <graphene.h>
|
||||
|
||||
#include "gskvulkanpipelineprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GskVulkanTexturePipelineLayout GskVulkanTexturePipelineLayout;
|
||||
|
||||
#define GSK_TYPE_VULKAN_TEXTURE_PIPELINE (gsk_vulkan_texture_pipeline_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (GskVulkanTexturePipeline, gsk_vulkan_texture_pipeline, GSK, VULKAN_TEXTURE_PIPELINE, GskVulkanPipeline)
|
||||
|
||||
GskVulkanPipeline * gsk_vulkan_texture_pipeline_new (GdkVulkanContext *context,
|
||||
VkPipelineLayout layout,
|
||||
const char *shader_name,
|
||||
VkRenderPass render_pass);
|
||||
|
||||
gsize gsk_vulkan_texture_pipeline_count_vertex_data (GskVulkanTexturePipeline *pipeline);
|
||||
void gsk_vulkan_texture_pipeline_collect_vertex_data (GskVulkanTexturePipeline *pipeline,
|
||||
guchar *data,
|
||||
const graphene_rect_t *rect,
|
||||
const graphene_rect_t *tex_rect);
|
||||
gsize gsk_vulkan_texture_pipeline_draw (GskVulkanTexturePipeline *pipeline,
|
||||
VkCommandBuffer command_buffer,
|
||||
gsize offset,
|
||||
gsize n_commands);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GSK_VULKAN_TEXTURE_PIPELINE_PRIVATE_H__ */
|
||||
@@ -55,7 +55,6 @@ gsk_private_vulkan_compiled_shaders_deps = []
|
||||
if have_vulkan
|
||||
gsk_private_sources += files([
|
||||
'gskvulkanblendmodepipeline.c',
|
||||
'gskvulkanblendpipeline.c',
|
||||
'gskvulkanblurpipeline.c',
|
||||
'gskvulkanborderpipeline.c',
|
||||
'gskvulkanboxshadowpipeline.c',
|
||||
@@ -70,6 +69,7 @@ if have_vulkan
|
||||
'gskvulkanlineargradientpipeline.c',
|
||||
'gskvulkanimage.c',
|
||||
'gskvulkantextpipeline.c',
|
||||
'gskvulkantexturepipeline.c',
|
||||
'gskvulkanmemory.c',
|
||||
'gskvulkanpipeline.c',
|
||||
'gskvulkanpushconstants.c',
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
#]
|
||||
|
||||
gsk_private_vulkan_fragment_shaders = [
|
||||
'blend.frag',
|
||||
'blendmode.frag',
|
||||
'blur.frag',
|
||||
'border.frag',
|
||||
@@ -18,10 +17,10 @@ gsk_private_vulkan_fragment_shaders = [
|
||||
'linear.frag',
|
||||
'mask.frag',
|
||||
'outset-shadow.frag',
|
||||
'texture.frag',
|
||||
]
|
||||
|
||||
gsk_private_vulkan_vertex_shaders = [
|
||||
'blend.vert',
|
||||
'blendmode.vert',
|
||||
'blur.vert',
|
||||
'border.vert',
|
||||
@@ -32,6 +31,7 @@ gsk_private_vulkan_vertex_shaders = [
|
||||
'linear.vert',
|
||||
'mask.vert',
|
||||
'outset-shadow.vert',
|
||||
'texture.vert',
|
||||
]
|
||||
|
||||
gsk_private_vulkan_shaders += gsk_private_vulkan_fragment_shaders
|
||||
|
||||
Reference in New Issue
Block a user