HoviTron Video Pipeline
VulkanPipelineAbstract.h
Go to the documentation of this file.
1/* ----------------------
2* Copyright 2023 Université Libre de Bruxelles(ULB), Universidad Politécnica de Madrid(UPM), CREAL, Deutsches Zentrum für Luft - und Raumfahrt(DLR)
3
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License.
6* You may obtain a copy of the License at < http://www.apache.org/licenses/LICENSE-2.0>
7
8* Unless required by applicable law or agreed to in writing, software
9* distributed under the License is distributed on an "AS IS" BASIS,
10* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11* See the License for the specific language governing permissionsand
12* limitations under the License.
13---------------------- */
14
15/*****************************************************************/
23#pragma once
24
25#include "commonVulkan.h"
26
28#include <memory>
29
30class VulkanContext;
31class Shader;
33class VulkanWrapper;
34
35
36
45public:
47 virtual void init() = 0;
49 virtual void cleanUp() = 0;
51 void cmdBufferBindBuffer(vk::CommandBuffer& cmdBuffer, int index, InputProvider::StreamFrameInfo & frameInfo, int view);
52
54 void updateAllBuffer(uint32_t currentImage, int view);
56 void updateBuffer(uint32_t currentImage, int view);
58 virtual void createDescriptorSetLayout() = 0;
60 uint32_t getIndexNumber();
61
63 vk::Pipeline pipeline;
65 vk::DescriptorSetLayout descriptorSetLayout;
67 vk::PipelineLayout pipelineLayout;
68
69
70
71protected:
79 std::unique_ptr<BuffersController> bufferController;
80
82 int subPass = 0;
84 int inputId = 0;
88 bool depthTest = true;
90 bool depthWrite = true;
91
93 virtual void createGraphicsPipeline() = 0;
95 vk::ShaderModule createShaderModule(const Shader& shader);
97 void createPipeline(std::vector<vk::PipelineShaderStageCreateInfo>& arr);
98};
Abstract class that contains common functionnalities to manage the buffer for synthesis and blending ...
Class that represents SPIR-V shader.
Definition: Shader.h:42
class that manages tasks related to Vulkan context (Vulkan Instance, Vulkan Physical device,...
Definition: VulkanContext.h:59
The abstract class that encapsulate vk::Pipeline object and contains common code between the two pipe...
virtual void cleanUp()=0
virtual void createGraphicsPipeline()=0
std::unique_ptr< BuffersController > bufferController
void updateBuffer(uint32_t currentImage, int view)
virtual void init()=0
virtual void createDescriptorSetLayout()=0
void createPipeline(std::vector< vk::PipelineShaderStageCreateInfo > &arr)
VulkanRenderPass * renderPass
vk::ShaderModule createShaderModule(const Shader &shader)
vk::DescriptorSetLayout descriptorSetLayout
void updateAllBuffer(uint32_t currentImage, int view)
void cmdBufferBindBuffer(vk::CommandBuffer &cmdBuffer, int index, InputProvider::StreamFrameInfo &frameInfo, int view)
vk::PipelineLayout pipelineLayout
Class that manage the renderPass containing the synthesis and blending steps.
Class that manages the classes related to Vulkan code and act as a wrapper around them.
Definition: VulkanWrapper.h:66
file that contains the common include for the Vulkan part