2023-06-24 02:00:02 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "gskvulkanopprivate.h"
|
|
|
|
|
2023-06-28 02:30:35 +00:00
|
|
|
GskVulkanOp *
|
|
|
|
gsk_vulkan_op_alloc (GskVulkanRenderPass *render_pass,
|
|
|
|
const GskVulkanOpClass *op_class)
|
2023-06-24 02:49:39 +00:00
|
|
|
{
|
2023-06-28 02:30:35 +00:00
|
|
|
GskVulkanOp *op;
|
|
|
|
|
|
|
|
op = gsk_vulkan_render_pass_alloc_op (render_pass,
|
|
|
|
op_class->size);
|
2023-06-24 02:49:39 +00:00
|
|
|
op->op_class = op_class;
|
2023-06-28 02:30:35 +00:00
|
|
|
|
|
|
|
return op;
|
2023-06-24 02:49:39 +00:00
|
|
|
}
|
|
|
|
|
2023-06-24 02:00:02 +00:00
|
|
|
void
|
|
|
|
gsk_vulkan_op_finish (GskVulkanOp *op)
|
|
|
|
{
|
|
|
|
op->op_class->finish (op);
|
|
|
|
}
|
|
|
|
|
2023-07-05 04:32:52 +00:00
|
|
|
void
|
|
|
|
gsk_vulkan_op_print (GskVulkanOp *op,
|
|
|
|
GString *string,
|
|
|
|
guint indent)
|
|
|
|
{
|
|
|
|
op->op_class->print (op, string, indent);
|
|
|
|
}
|
|
|
|
|
2023-06-24 02:00:02 +00:00
|
|
|
void
|
2023-07-03 01:23:17 +00:00
|
|
|
gsk_vulkan_op_upload (GskVulkanOp *op,
|
|
|
|
GskVulkanRenderPass *pass,
|
|
|
|
GskVulkanRender *render,
|
|
|
|
GskVulkanUploader *uploader)
|
2023-06-24 02:00:02 +00:00
|
|
|
{
|
2023-07-03 01:23:17 +00:00
|
|
|
op->op_class->upload (op, pass, render, uploader);
|
2023-06-24 02:00:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gsize
|
|
|
|
gsk_vulkan_op_count_vertex_data (GskVulkanOp *op,
|
|
|
|
gsize n_bytes)
|
|
|
|
{
|
|
|
|
return op->op_class->count_vertex_data (op, n_bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gsk_vulkan_op_collect_vertex_data (GskVulkanOp *op,
|
|
|
|
GskVulkanRenderPass *pass,
|
|
|
|
GskVulkanRender *render,
|
|
|
|
guchar *data)
|
|
|
|
{
|
|
|
|
op->op_class->collect_vertex_data (op, pass, render, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gsk_vulkan_op_reserve_descriptor_sets (GskVulkanOp *op,
|
|
|
|
GskVulkanRender *render)
|
|
|
|
{
|
|
|
|
op->op_class->reserve_descriptor_sets (op, render);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gsk_vulkan_op_command (GskVulkanOp *op,
|
2023-06-25 20:16:37 +00:00
|
|
|
GskVulkanRender *render,
|
2023-06-24 02:00:02 +00:00
|
|
|
VkPipelineLayout pipeline_layout,
|
|
|
|
VkCommandBuffer command_buffer)
|
|
|
|
{
|
2023-06-25 20:16:37 +00:00
|
|
|
op->op_class->command (op, render, pipeline_layout, command_buffer);
|
2023-06-24 02:00:02 +00:00
|
|
|
}
|
|
|
|
|