gtk/gsk/vulkan/gskvulkanblendmodepipelineprivate.h
Benjamin Otte 8207c548cc vulkan: Combine textures and samplers again
This reverts most of commit f420c143e0
again because it turns out GPUs like combined images and samplers.

But: The one thing we don't revert is allowing the C code to select any
combination of sampler and image:
gsk_vulkan_render_get_image_descriptor() now takes a 2nd argument
specifying the sampler.

This allows the same flexibility as before, we just combine things
early.

This change was inspired by
https://developer.nvidia.com/blog/vulkan-dos-donts/
2023-07-16 12:12:36 +02:00

40 lines
2.5 KiB
C

#pragma once
#include <graphene.h>
#include "gskvulkanpipelineprivate.h"
#include "gskenums.h"
G_BEGIN_DECLS
typedef struct _GskVulkanBlendModePipelineLayout GskVulkanBlendModePipelineLayout;
#define GSK_TYPE_VULKAN_BLEND_MODE_PIPELINE (gsk_vulkan_blend_mode_pipeline_get_type ())
G_DECLARE_FINAL_TYPE (GskVulkanBlendModePipeline, gsk_vulkan_blend_mode_pipeline, GSK, VULKAN_BLEND_MODE_PIPELINE, GskVulkanPipeline)
GskVulkanPipeline * gsk_vulkan_blend_mode_pipeline_new (GdkVulkanContext *context,
VkPipelineLayout layout,
const char *shader_name,
VkRenderPass render_pass);
void gsk_vulkan_blend_mode_pipeline_collect_vertex_data (GskVulkanBlendModePipeline *pipeline,
guchar *data,
guint32 top_tex_id,
guint32 bottom_tex_id,
const graphene_point_t *offset,
const graphene_rect_t *bounds,
const graphene_rect_t *top_bounds,
const graphene_rect_t *bottom_bounds,
const graphene_rect_t *top_tex_rect,
const graphene_rect_t *bottom_tex_rect,
GskBlendMode blend_mode);
gsize gsk_vulkan_blend_mode_pipeline_draw (GskVulkanBlendModePipeline *pipeline,
VkCommandBuffer command_buffer,
gsize offset,
gsize n_commands);
G_END_DECLS