32 assert(!
Rendering &&
"render pass overlapping not allowed");
49 for (uint32_t AttachIndex = 0; AttachIndex < Subpass.
ColorAttachments.size();
55 if (AttachRef == VK_ATTACHMENT_UNUSED)
60 const VkAttachmentDescription &AttachDesc =
RP.
getAttachment(AttachRef);
64 if (AttachDesc.loadOp != VK_ATTACHMENT_LOAD_OP_CLEAR)
71 VkClearColorValue Color =
ClearValues[AttachRef].color;
79 Attach->
write(Color, X, Y, 0, Layer);
const Subpass & getSubpass(uint32_t Index) const
Returns the subpass at index Index.
bool Rendering
Flag used to indicate whether the instance is currently rendering.
void write(const Image::Texel &T, uint32_t X, uint32_t Y=0, uint32_t Z=0, uint32_t Layer=0, uint32_t MipLevel=0) const
Write a texel to the image view at the specified coordinate.
const Framebuffer & FB
The framebuffer associated with this render pass instance.
This structure describes the attachments used by a subpass.
void beginSubpass()
Helper used to update render pass state when a new subpass is started.
void endSubpass()
Helper used to update render pass state when a subpass completes.
uint32_t getHeight() const
Returns the height of this framebuffer in pixels.
This class represents a view into a range of image subresources.
const RenderPass & RP
The render pass that this object instantiates.
uint32_t getWidth() const
Returns the width of this framebuffer in pixels.
This file declares data structures and functions for handling images.
void end()
Finalize the render pass state after completing all draw commands.
const std::vector< ImageView * > & getAttachments() const
Returns the list of attachments backing this framebuffer.
This file declares the RenderPass class and related data structures.
void begin()
Initialize the render pass state in preparation for draw commands.
std::vector< uint32_t > ColorAttachments
std::vector< VkClearValue > ClearValues
The clear values used for this render pass instance.
uint32_t getNumLayers() const
Returns the number of layers in this framebuffer.
void nextSubpass()
Transition to the next subpass.
std::vector< bool > AttachmentsInitialized
Flags denoting whether each attachment has been initialized yet.
const std::vector< Subpass > Subpasses
The subpasses contained in this render pass.
uint32_t getNumAttachments() const
Returns the number of attachments in this render pass.
std::vector< VkAttachmentDescription > Attachments
The attachments used by this render pass.
const VkAttachmentDescription & getAttachment(uint32_t Index) const
Returns the attachment at index Index.
uint32_t SubpassIndex
The index of the current subpass.