SubpassDescription class new in Git master
          #include <Magnum/Vk/RenderPassCreateInfo.h>
        
        Subpass description.
Wraps a VkSubpassDescription2. This class is subsequently passed to a RenderPass, see its documentation for a high-level usage information.
Compatibility with VkSubpassDescription
While the class operates on the VkSubpassDescription2 structure that's new in Vulkan 1.2 or is provided by the KHR_
For direct editing of the Vulkan structure, it's recommended to edit the VkSubpassDescription2 fields and then perform the conversion instead of editing the resulting VkSubpassDescription, as additional safety checks may be done during the conversion to ensure no information is lost.
Please note that the conversion to VkSubpassDescription will ignore all fields that are present only in VkSubpassDescription2 and its substructures — in particular, the whole pNext pointer chain is omitted. When performing the conversion it's your responsibility to ensure nothing significant was in the fields that were left out.
Public types
- enum class Flag: UnsignedInt { }
- Subpass description flag.
- 
              using Flags = Containers::EnumSet<Flag> 
- Subpass description flags.
Constructors, destructors, conversion operators
- SubpassDescription(Flags flags = {}) explicit
- Constructor.
- SubpassDescription(NoInitT) explicit noexcept
- Construct without initializing the contents.
- SubpassDescription(const VkSubpassDescription2& description) explicit
- Construct from existing data.
- SubpassDescription(const VkSubpassDescription& description) explicit
- Construct from a VkSubpassDescription
- SubpassDescription(const SubpassDescription&) deleted
- Copying is not allowed.
- SubpassDescription(SubpassDescription&& other) noexcept
- Move constructor.
- operator const VkSubpassDescription2*() const
- operator const VkSubpassDescription2&() const
Public functions
- auto operator=(const SubpassDescription&) -> SubpassDescription& deleted
- Copying is not allowed.
- auto operator=(SubpassDescription&& other) -> SubpassDescription& noexcept
- Move assignment.
- 
              auto setInputAttachments(Containers::ArrayView<const AttachmentReference> attachments) & -> SubpassDescription& 
- Set input attachments.
- 
              auto setInputAttachments(Containers::ArrayView<const AttachmentReference> attachments) && -> SubpassDescription&& 
- 
              auto setInputAttachments(std::initializer_list<AttachmentReference> attachments) & -> SubpassDescription& 
- 
              auto setInputAttachments(std::initializer_list<AttachmentReference> attachments) && -> SubpassDescription&& 
- 
              auto setColorAttachments(Containers::ArrayView<const AttachmentReference> attachments, Containers:: ArrayView<const AttachmentReference> resolveAttachments = {}) & -> SubpassDescription& 
- Set color attachments.
- 
              auto setColorAttachments(Containers::ArrayView<const AttachmentReference> attachments, Containers:: ArrayView<const AttachmentReference> resolveAttachments = {}) && -> SubpassDescription&& 
- 
              auto setColorAttachments(std::initializer_list<AttachmentReference> attachments, std:: initializer_list<AttachmentReference> resolveAttachments = {}) & -> SubpassDescription& 
- 
              auto setColorAttachments(std::initializer_list<AttachmentReference> attachments, std:: initializer_list<AttachmentReference> resolveAttachments = {}) && -> SubpassDescription&& 
- auto setDepthStencilAttachment(AttachmentReference attachment) & -> SubpassDescription&
- Set depth/stencil attachment.
- auto setDepthStencilAttachment(AttachmentReference attachment) && -> SubpassDescription&&
- 
              auto setPreserveAttachments(Containers::ArrayView<const UnsignedInt> attachments) & -> SubpassDescription& 
- Set preserve attachments.
- 
              auto setPreserveAttachments(Containers::ArrayView<const UnsignedInt> attachments) && -> SubpassDescription&& 
- 
              auto setPreserveAttachments(Containers::Array<UnsignedInt>&& attachments) & -> SubpassDescription& 
- 
              auto setPreserveAttachments(Containers::Array<UnsignedInt>&& attachments) && -> SubpassDescription&& 
- 
              auto setPreserveAttachments(std::initializer_list<UnsignedInt> attachments) & -> SubpassDescription& 
- 
              auto setPreserveAttachments(std::initializer_list<UnsignedInt> attachments) && -> SubpassDescription&& 
- auto operator*() -> VkSubpassDescription2&
- Underlying VkSubpassDescription2 structure.
- auto operator*() const -> const VkSubpassDescription2&
- auto operator->() -> VkSubpassDescription2*
- auto operator->() const -> const VkSubpassDescription2*
- 
              auto vkSubpassDescription() const -> Containers::Array<VkSubpassDescription> 
- Corresponding VkSubpassDescription structure.
Enum documentation
              enum class Magnum::
            Subpass description flag.
Wraps VkSubpassDescriptionFlagBits.
Typedef documentation
              typedef Containers::
            Subpass description flags.
Type-safe wrapper for VkSubpassDescriptionFlags.
Function documentation
               Magnum::
            Constructor.
The following VkSubpassDescription2 fields are pre-filled in addition to sType, everything else is zero-filled:
- flags
- pipelineBindPointto PipelineBindPoint::- Rasterization 
Use setInputAttachments(), setColorAttachments(), setDepthStencilAttachment() and setPreserveAttachments() to set attachments. Note that a subpass without any attachment is valid as well.
               Magnum::
            Construct without initializing the contents.
Note that not even the sType field is set — the structure has to be fully initialized afterwards in order to be usable.
               Magnum::
            Construct from existing data.
Copies the existing values verbatim, pointers are kept unchanged without taking over the ownership. Modifying the newly created instance will not modify the original data nor the pointed-to data.
               Magnum::
            Construct from a VkSubpassDescription
Compared to the above, fills the common subset of VkSubpassDescription2, sets sType and zero-fills pNext and viewMask.
               Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
               Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The class is implicitly convertible to a reference in addition to a pointer because the type is commonly used in arrays as well, which would be annoying to do with a pointer conversion.
              SubpassDescription& Magnum::
            Set input attachments.
| Returns | Reference to self (for method chaining) | 
|---|
Attachments that are being read from in this subpass. The elements correspond to shader input attachment indices, i.e. a shader input attachment index 5 will read from the attachment specified at offset 5 in this list. Attachment references should use either ImageLayout::
The following VkSubpassDescription2 fields are set by this function:
- inputAttachmentCountand- pInputAttachmentsto a copy of- attachments
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
            Set color attachments.
| Returns | Reference to self (for method chaining) | 
|---|
Color attachments that are being written to in this subpass. The resolveAttachments list is expected to be either empty or have the same size as attachments. If non-empty, each item has to have the same format as the corresponding item in attachments.
The elements correspond to shader color attachment indices, i.e. a shader output attachment index 5 will write from the attachment specified at offset 5 in this list. Attachment references should use either ImageLayout::
The following VkSubpassDescription2 fields are set by this function:
- colorAttachmentCountand- pColorAttachmentsto a copy of- attachments
- pResolveAttachmentsto a copy of- resolveAttachments, if the parameter is non-empty
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
            Set depth/stencil attachment.
| Returns | Reference to self (for method chaining) | 
|---|
Depth/stencil attachment that is being written to in this subpass. The attachment reference should use either ImageLayout::
The following VkSubpassDescription2 fields are set by this function:
- pDepthStencilAttachmentto a copy of- attachment
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
            Set preserve attachments.
| Returns | Reference to self (for method chaining) | 
|---|
Attachments that are not read or written by the subpass but have to be preserved throughout the subpass. The attachment values are indices into the list passed to RenderPassCreateInfo::
The following VkSubpassDescription2 fields are set by this function:
- preserveAttachmentCountand- pPreserveAttachmentsto a copy of- attachments
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              SubpassDescription&& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              const VkSubpassDescription2& Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              VkSubpassDescription2* Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              const VkSubpassDescription2* Magnum::
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
              Containers::
            Corresponding VkSubpassDescription structure.
Provided for compatibility with Vulkan implementations that don't support version 1.2 or the KHR_pPreserveAttachments may still point to the originating SubpassDescription instance, the returned allocation is not completely standalone. See Compatibility with VkSubpassDescription for more information.