class new in Git master
RasterizationPipelineCreateInfoRasterization pipeline creation info.
Contents
Wraps a VkGraphicsPipelineCreateInfo, along with
- VkPipelineViewportStateCreateInfo,
- VkPipelineRasterizationStateCreateInfo,
- VkPipelineMultisampleStateCreateInfo,
- VkPipelineDepthStencilStateCreateInfo,
- VkPipelineColorBlendStateCreateInfo containing VkPipelineColorBlendAttachmentState and
- VkPipelineDynamicStateCreateInfo.
See Rasterization pipeline creation for usage information.
Public types
- enum class Flag: UnsignedInt { DisableOptimization = VK_PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT, AllowDerivatives = VK_PIPELINE_CREATE_ALLOW_DERIVATIVES_BIT, Derivative = VK_PIPELINE_CREATE_DERIVATIVE_BIT }
- Rasterization pipeline creation flag.
-
using Flags = Containers::
EnumSet<Flag> - Rasterization pipeline creation flags.
Constructors, destructors, conversion operators
- RasterizationPipelineCreateInfo(const ShaderSet& shaderSet, const MeshLayout& meshLayout, VkPipelineLayout pipelineLayout, VkRenderPass renderPass, UnsignedInt subpass, UnsignedInt subpassColorAttachmentCount, Flags flags = {}) explicit
- Constructor.
- RasterizationPipelineCreateInfo(NoInitT) explicit noexcept
- Construct without initializing the contents.
- RasterizationPipelineCreateInfo(const VkGraphicsPipelineCreateInfo& info) explicit
- Construct from existing data.
- RasterizationPipelineCreateInfo(const RasterizationPipelineCreateInfo&) deleted
- Copying is not allowed.
- RasterizationPipelineCreateInfo(RasterizationPipelineCreateInfo&& other) noexcept
- Move constructor.
- operator const VkGraphicsPipelineCreateInfo*() const
Public functions
- auto operator=(const RasterizationPipelineCreateInfo&) -> RasterizationPipelineCreateInfo& deleted
- Copying is not allowed.
- auto operator=(RasterizationPipelineCreateInfo&& other) -> RasterizationPipelineCreateInfo& noexcept
- Move assignment.
- auto setViewport(const Range3D& viewport, const Range2Di& scissor) -> RasterizationPipelineCreateInfo&
- Set viewport and scissor rectangle.
- auto setViewport(const Range3D& viewport) -> RasterizationPipelineCreateInfo&
- Set viewport with an implicit scissor rectangle.
- auto setViewport(const Range2D& viewport, const Range2Di& scissor) -> RasterizationPipelineCreateInfo&
- Set viewport with an implicit depth range.
- auto setViewport(const Range2D& viewport) -> RasterizationPipelineCreateInfo&
- Set viewport with an implicit depth range and scissor rectangle.
- auto setDynamicStates(const DynamicRasterizationStates& states) -> RasterizationPipelineCreateInfo&
- Set dynamic states.
- auto operator*() -> VkGraphicsPipelineCreateInfo&
- Underlying VkGraphicsPipelineCreateInfo structure.
- auto operator*() const -> const VkGraphicsPipelineCreateInfo&
- auto operator->() -> VkGraphicsPipelineCreateInfo*
- auto operator->() const -> const VkGraphicsPipelineCreateInfo*
Enum documentation
enum class Magnum:: Vk:: RasterizationPipelineCreateInfo:: Flag: UnsignedInt
Rasterization pipeline creation flag.
Wraps the rasterization-related subset of VkPipelineCreateFlagBits.
Enumerators | |
---|---|
DisableOptimization |
Create the pipeline without optimization. |
AllowDerivatives |
Allow derivatives to be subsequently created from this pipeline. |
Derivative |
Derivative of a pipeline created earlier. |
Typedef documentation
typedef Containers:: EnumSet<Flag> Magnum:: Vk:: RasterizationPipelineCreateInfo:: Flags
Rasterization pipeline creation flags.
Type-safe wrapper for the rasterization-related subset of VkPipelineCreateFlags.
Function documentation
Magnum:: Vk:: RasterizationPipelineCreateInfo:: RasterizationPipelineCreateInfo(const ShaderSet& shaderSet,
const MeshLayout& meshLayout,
VkPipelineLayout pipelineLayout,
VkRenderPass renderPass,
UnsignedInt subpass,
UnsignedInt subpassColorAttachmentCount,
Flags flags = {}) explicit
Constructor.
Parameters | |
---|---|
shaderSet | Set of shaders to use for this pipeline |
meshLayout | Mesh layout to use in this pipeline |
pipelineLayout | A PipelineLayout or a raw Vulkan pipeline layout handle |
renderPass | A RenderPass or a raw Vulkan render pass handle |
subpass | Subpass index |
subpassColorAttachmentCount | Number of color attachments the subpass uses |
flags | Rasterization pipeline creation flags |
Note that the shaderSet
and meshLayout
structure internals are referenced, not copied, and thus have to stay in scope until the Pipeline object is created.
The following VkGraphicsPipelineCreateInfo and substructure fields are pre-filled in addition to sType
of all referenced structures, everything else is zero-filled:
flags
stageCount
andpStages
toshaderSet
pVertexInputState
andpInputAssemblyState
tomeshLayout
pRasterizationState
pRasterizationState->polygonMode
to VK_POLYGON_ MODE_ FILL pRasterizationState->frontFace
to VK_FRONT_ FACE_ COUNTER_ CLOCKWISE pRasterizationState->lineWidth
to1.0f
pMultisampleState
pMultisampleState->rasterizationSamples
to VK_SAMPLE_ COUNT_ 1_ BIT pDepthStencilState
pColorBlendState
pColorBlendState->attachmentCount
tosubpassColorAttachmentCount
pColorBlendState->pAttachments
pColorBlendState->pAttachments[i].colorWriteMask
to VK_COLOR_ COMPONENT_ R_ BIT, VK_ COLOR_ COMPONENT_ G_ BIT, VK_ COLOR_ COMPONENT_ B_ BIT and VK_ COLOR_ COMPONENT_ A_ BIT layout
topipelineLayout
renderPass
subpass
You need to call at least setViewport() or specifying DynamicRasterizationState::
Magnum:: Vk:: RasterizationPipelineCreateInfo:: RasterizationPipelineCreateInfo(NoInitT) explicit noexcept
Construct without initializing the contents.
Note that not even the sType
field nor the nested structure pointers are set — the structure has to be fully initialized afterwards in order to be usable.
Magnum:: Vk:: RasterizationPipelineCreateInfo:: RasterizationPipelineCreateInfo(const VkGraphicsPipelineCreateInfo& info) explicit
Construct from existing data.
Copies the existing values including the pointed-to
- VkPipelineViewportStateCreateInfo,
- VkPipelineRasterizationStateCreateInfo,
- VkPipelineMultisampleStateCreateInfo,
- VkPipelineDepthStencilStateCreateInfo,
- VkPipelineColorBlendStateCreateInfo and
- VkPipelineDynamicStateCreateInfo
structures verbatim, remaining 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:: Vk:: RasterizationPipelineCreateInfo:: operator const VkGraphicsPipelineCreateInfo*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
RasterizationPipelineCreateInfo& Magnum:: Vk:: RasterizationPipelineCreateInfo:: setViewport(const Range3D& viewport,
const Range2Di& scissor)
Set viewport and scissor rectangle.
Parameters | |
---|---|
viewport | Viewport rectangle and depth range |
scissor | Scissor rectangle |
Returns | Reference to self (for method chaining) |
While the scissor
rectangle is full pixels, the viewport
XY range can have sub-pixel precision. The depth should be in range .
The following VkGraphicsPipelineCreateInfo and substructure fields are modified, in addition to sType
of newly referenced structures:
pViewportState
pViewportState->viewportCount
to1
pViewportState->pViewports[0]
toviewport
pViewportState->scissorCount
to1
pViewportState->pScissors[0]
toscissor
RasterizationPipelineCreateInfo& Magnum:: Vk:: RasterizationPipelineCreateInfo:: setViewport(const Range3D& viewport)
Set viewport with an implicit scissor rectangle.
Equivalent to calling setViewport(const Range3D&, const Range2Di&) with scissor
set to the Range3D::viewport
.
RasterizationPipelineCreateInfo& Magnum:: Vk:: RasterizationPipelineCreateInfo:: setViewport(const Range2D& viewport,
const Range2Di& scissor)
Set viewport with an implicit depth range.
Equivalent to calling setViewport(const Range3D&, const Range2Di&) with depth from 0.0f
to 1.0f
.
RasterizationPipelineCreateInfo& Magnum:: Vk:: RasterizationPipelineCreateInfo:: setViewport(const Range2D& viewport)
Set viewport with an implicit depth range and scissor rectangle.
Equivalent to calling setViewport(const Range3D&, const Range2Di&) with depth from 0.0f
to 1.0f
and scissor
same as viewport
.
RasterizationPipelineCreateInfo& Magnum:: Vk:: RasterizationPipelineCreateInfo:: setDynamicStates(const DynamicRasterizationStates& states)
Set dynamic states.
The following VkGraphicsPipelineCreateInfo and substructure fields are modified, in addition to sType
of newly referenced structures:
pDynamicState
pDynamicState->dynamicStateCount
to count of values enabled instates
pDynamicState->pDynamicStates
to a list of VkDynamicState corresponding to DynamicRasterizationState values enabled instates
const VkGraphicsPipelineCreateInfo& Magnum:: Vk:: RasterizationPipelineCreateInfo:: operator*() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
VkGraphicsPipelineCreateInfo* Magnum:: Vk:: RasterizationPipelineCreateInfo:: operator->()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
const VkGraphicsPipelineCreateInfo* Magnum:: Vk:: RasterizationPipelineCreateInfo:: operator->() const
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.