FCT
载入中...
搜索中...
未找到
VK_PassGroup.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/3/26.
3//
4
5#include "./PassGroup.h"
6#ifndef VK_PASSGROUP_H
7#define VK_PASSGROUP_H
8
9namespace FCT
10{
11 class VK_Context;
12 namespace RHI
13 {
22 class VK_PassGroup : public PassGroup {
23 public:
25 ~VK_PassGroup() override;
26 //uint32_t getImageIndex(FCT::Image* image);
27 void create();
28 vk::RenderPass getRenderPass() const { return m_renderPass; }
29 uint32_t getPassIndex(Pass* pass);
30 void beginSubmit(CommandBuffer* cmdBuf) override;
31 void endSubmit(CommandBuffer* cmdBuf) override;
32 void nextPass(CommandBuffer* cmdBuf) override;
33 private:
34 void collectSubpasses();
35 void collectAttachments();
36 void collectImageViews();
37 uint32_t toPassForDependencies(Pass* pass);
38 //std::map<FCT::Image*,uint32_t> m_imageIndices;
39 //std::map<uint32_t,AttachmentSlot> m_attachmentSlots;
40 std::map<uint32_t,AttachmentSlot> m_targetAttachments;
41 std::map<Pass*,uint32_t> m_passIndices;
42 std::vector<vk::AttachmentDescription> m_attachments;
43 std::vector<vk::SubpassDescription> m_subpasses;
44 std::vector<vk::ImageView> m_framebufferViews;
46 vk::RenderPassCreateInfo m_createInfo;
47 vk::RenderPass m_renderPass;
49 vk::RenderPassBeginInfo m_beginInfo;
50 vk::FramebufferCreateInfo m_framebufferInfo;
51 //vk::Framebuffer m_framebuffer;
52 std::vector<vk::ClearValue> m_clearValues;
53 std::unordered_map<RHI::CommandBuffer*,vk::Framebuffer> m_framebuffers;
54 std::map<uint32_t, AttachmentSlot> m_depthAttachments;
56
57 //std::vector<FCT::Image*> m_targets;
58 };
59 }
60}
61
62
63#endif //VK_PASSGROUP_H
std::unordered_map< RHI::CommandBuffer *, vk::Framebuffer > m_framebuffers
std::map< Pass *, uint32_t > m_passIndices
uint32_t getPassIndex(Pass *pass)
vk::FramebufferCreateInfo m_framebufferInfo
void nextPass(CommandBuffer *cmdBuf) override
开始下一个pass的 提交
std::vector< vk::SubpassDescription > m_subpasses
std::vector< vk::AttachmentDescription > m_attachments
vk::RenderPass getRenderPass() const
vk::RenderPassBeginInfo m_beginInfo
void beginSubmit(CommandBuffer *cmdBuf) override
vk::RenderPassCreateInfo m_createInfo
std::map< uint32_t, AttachmentSlot > m_depthAttachments
void endSubmit(CommandBuffer *cmdBuf) override
uint32_t toPassForDependencies(Pass *pass)
std::map< uint32_t, AttachmentSlot > m_targetAttachments
std::vector< vk::ImageView > m_framebufferViews
std::vector< vk::ClearValue > m_clearValues
AttachmentSlot(FCT::Image *image, ImageUsage usage, uint32_t slot)