HoviTron Video Pipeline
VulkanRenderPass.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#pragma once
16/*****************************************************************/
25#include"commonVulkan.h"
26#include "VulkanRenderPassAbstract.h"
27#include<memory>
31
32class VulkanContext;
33class VulkanWrapper;
34class InputProvider;
35
42public:
46 void init(InputProvider* inputProvider) override;
48 void cleanUp() override;
50 void updateBuffer(uint32_t currentImage, bool initAll, std::span<InputProvider::StreamFrameInfo> infos, int view) override;
52 void recordCommandBuffer(vk::CommandBuffer& commandBuffer, int i, std::span<InputProvider::StreamFrameInfo> frameInfos, int view) override;
54 bool isInitialized() override;
56 std::vector<vk::ImageView> getAttachmentView(int swapIndex, int view);
58 vk::Image getImageToBlit(int imageIndex) override;
60 std::vector<vk::Format> getSupportedDepthFormats() const override;
61
62
64 std::vector<std::unique_ptr<VulkanPipelineWarping>> warpingPipelines;
66 std::vector<std::unique_ptr<VulkanPipelineBlending>> blendingPipelines;
67
69 vk::RenderPass renderPass;
70
71 //--list of the different attachments
72 //--- Output of the warping
74 std::vector<ImageStruct> attachementColor;
76 std::vector<ImageStruct> attachementDepthFloat;
78 std::vector<ImageStruct> attachementQualityFloat;
79
80 //--for the blending there is two sets of three attachments sets
81 //Since there are used as input and output alternatively (ping-pong attachment)
82
84 std::vector<ImageStruct> attachementAccuColor;
86 std::vector<ImageStruct> attachementAccuQuality;
88 std::vector<ImageStruct> attachementAccuDepth;
90 std::vector<ImageStruct> attachementAccuColor2;
92 std::vector<ImageStruct> attachementAccuQuality2;
94 std::vector<ImageStruct> attachementAccuDepth2;
95
97 std::vector<std::vector<vk::Framebuffer>> swapChainFramebuffers;
98private:
100 bool resetViewPortAndScissor = false;
101
103 void createFramebuffers();
104
106 void createRenderPass();
108 void createAttachementsRessources();
110 void createCommandPoolForBuffer();
112 void createDepthResources();
113
114};
Class that contains helper functions for Vulkan.
file that conthains a class that manages the pipeline for the blending
Contains the class that manages the warping pipeline.
Abstract interface around getting source views parameters and data.
Definition: InputProvider.h:35
class that manages tasks related to Vulkan context (Vulkan Instance, Vulkan Physical device,...
Definition: VulkanContext.h:59
An abstract class that contains a common base of code for the class that inherit from it.
Class that manage the renderPass containing the synthesis and blending steps.
vk::RenderPass renderPass
std::vector< ImageStruct > attachementAccuQuality2
bool isInitialized() override
std::vector< ImageStruct > attachementAccuColor2
std::vector< vk::ImageView > getAttachmentView(int swapIndex, int view)
std::vector< vk::Format > getSupportedDepthFormats() const override
void recordCommandBuffer(vk::CommandBuffer &commandBuffer, int i, std::span< InputProvider::StreamFrameInfo > frameInfos, int view) override
std::vector< ImageStruct > attachementDepthFloat
std::vector< std::unique_ptr< VulkanPipelineWarping > > warpingPipelines
std::vector< ImageStruct > attachementAccuDepth2
std::vector< ImageStruct > attachementQualityFloat
std::vector< std::vector< vk::Framebuffer > > swapChainFramebuffers
void init(InputProvider *inputProvider) override
std::vector< ImageStruct > attachementAccuDepth
std::vector< ImageStruct > attachementAccuColor
void cleanUp() override
std::vector< ImageStruct > attachementAccuQuality
void updateBuffer(uint32_t currentImage, bool initAll, std::span< InputProvider::StreamFrameInfo > infos, int view) override
std::vector< std::unique_ptr< VulkanPipelineBlending > > blendingPipelines
std::vector< ImageStruct > attachementColor
vk::Image getImageToBlit(int imageIndex) override
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