19 MANDRILL_NON_COPYABLE(
Pass)
27 MANDRILL_API
Pass(ptr<Device> pDevice, std::vector<ptr<Image>> colorAttachments, ptr<Image> pDepthAttachment);
40 MANDRILL_API
Pass(ptr<Device> pDevice, VkExtent2D extent, VkFormat format, uint32_t colorAttachmentCount = 1,
41 bool depthAttachment =
true, VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT);
53 MANDRILL_API
Pass(ptr<Device> pDevice, VkExtent2D extent, std::vector<VkFormat> formats,
54 bool depthAttachment =
true, VkSampleCountFlagBits sampleCount = VK_SAMPLE_COUNT_1_BIT);
84 MANDRILL_API
void begin(VkCommandBuffer cmd);
93 MANDRILL_API
void begin(VkCommandBuffer cmd, glm::vec4 clearColor,
94 VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR);
103 MANDRILL_API
void begin(VkCommandBuffer cmd, ptr<Image> pImage);
110 MANDRILL_API
void end(VkCommandBuffer cmd)
const;
118 MANDRILL_API
void end(VkCommandBuffer cmd, ptr<Image> pImage)
const;
126 MANDRILL_API
void update(std::vector<ptr<Image>> colorAttachments, ptr<Image> pDepthAttachment);
133 MANDRILL_API
void update(VkExtent2D extent);
141 return mPipelineRenderingCreateInfo;
150 return mColorAttachments;
160 return mpResolveAttachment ? mpResolveAttachment : mColorAttachments[0];
179 return mpResolveAttachment ? mpDevice->getSampleCount() : VK_SAMPLE_COUNT_1_BIT;
183 void createExplicitPass(std::vector<ptr<Image>> colorAttachments, ptr<Image> depthAttachment);
184 void createImplicitPass(
bool depthAttachment, VkSampleCountFlagBits sampleCount);
186 ptr<Device> mpDevice;
188 VkPipelineRenderingCreateInfo mPipelineRenderingCreateInfo;
191 std::vector<VkFormat> mFormats;
193 bool mImplicitAttachments;
194 std::vector<ptr<Image>> mColorAttachments;
195 ptr<Image> mpDepthAttachment;
196 ptr<Image> mpResolveAttachment;
MANDRILL_API void update(std::vector< ptr< Image > > colorAttachments, ptr< Image > pDepthAttachment)
Update an explicit pass with new attachments. Typically call on swapchain recreation.
Definition Pass.cpp:183
MANDRILL_API ptr< Image > getOutput() const
Get the output image of the pass. If multi-sampling was used, the resolve images is returned,...
Definition Pass.h:158