summaryrefslogtreecommitdiff
path: root/ext/vulkan/vkcolorconvert.h
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2019-11-26 18:11:25 +1100
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2019-11-28 23:27:21 +0000
commit615022ad93e454d53811889df57cbf0342aec1c6 (patch)
tree2236361937f4ca5c1724e7028d3a2652b7664723 /ext/vulkan/vkcolorconvert.h
parent756d52ef1582d03c9bba5571ddd4aa911749862a (diff)
downloadgstreamer-plugins-bad-615022ad93e454d53811889df57cbf0342aec1c6.tar.gz
vulkan: split vkfullscreenrender into two
Part 1 is a base class (vkvideofilter) that handles instance, device, queue retrieval and holding that has been moved to the library Part 2 is a fullscreenrenderquad that is still in the plugin that performs all of the previous vulkan-specific functionality.
Diffstat (limited to 'ext/vulkan/vkcolorconvert.h')
-rw-r--r--ext/vulkan/vkcolorconvert.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/ext/vulkan/vkcolorconvert.h b/ext/vulkan/vkcolorconvert.h
index 227dc3974..f27734b5f 100644
--- a/ext/vulkan/vkcolorconvert.h
+++ b/ext/vulkan/vkcolorconvert.h
@@ -24,7 +24,7 @@
#include <gst/gst.h>
#include <gst/video/video.h>
#include <gst/vulkan/vulkan.h>
-#include "vkfullscreenrender.h"
+#include "vkfullscreenquad.h"
G_BEGIN_DECLS
@@ -41,16 +41,15 @@ typedef struct _GstVulkanColorConvertClass GstVulkanColorConvertClass;
typedef struct _shader_info shader_info;
-typedef gboolean (*CommandStateUpdate) (GstVulkanColorConvert * conv, VkCommandBuffer cmd, shader_info * sinfo, GstVulkanImageView ** src_views, GstVulkanImageView ** dest_views, GstVulkanFence * fence);
+typedef GstMemory * (*CommandCreateUniformMemory) (GstVulkanColorConvert * conv, shader_info * sinfo, GstVulkanImageView ** src_views, GstVulkanImageView ** dest_views);
struct _shader_info
{
GstVideoFormat from;
GstVideoFormat to;
- CommandStateUpdate cmd_state_update;
+ CommandCreateUniformMemory cmd_create_uniform;
gchar *frag_code;
gsize frag_size;
- VkPushConstantRange push_constant_ranges[MAX_PUSH_CONSTANTS];
gsize uniform_size;
GDestroyNotify notify;
gpointer user_data;
@@ -58,26 +57,16 @@ struct _shader_info
struct _GstVulkanColorConvert
{
- GstVulkanFullScreenRender parent;
+ GstVulkanVideoFilter parent;
- GstVulkanCommandPool *cmd_pool;
-
- VkSampler sampler;
- GstVulkanDescriptorCache *descriptor_pool;
-
- VkShaderModule vert_module;
- VkShaderModule frag_module;
-
- VkDescriptorSetLayoutBinding sampler_layout_binding;
- VkDescriptorSetLayoutCreateInfo layout_info;
+ GstVulkanFullScreenQuad *quad;
shader_info *current_shader;
- GstMemory *uniform;
};
struct _GstVulkanColorConvertClass
{
- GstVulkanFullScreenRenderClass parent_class;
+ GstVulkanVideoFilterClass parent_class;
};
GType gst_vulkan_color_convert_get_type(void);