| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core10.Pass
- newtype VkAttachmentLoadOp = VkAttachmentLoadOp Int32
- pattern VK_ATTACHMENT_LOAD_OP_LOAD :: VkAttachmentLoadOp
- pattern VK_ATTACHMENT_LOAD_OP_CLEAR :: VkAttachmentLoadOp
- pattern VK_ATTACHMENT_LOAD_OP_DONT_CARE :: VkAttachmentLoadOp
- newtype VkAttachmentStoreOp = VkAttachmentStoreOp Int32
- pattern VK_ATTACHMENT_STORE_OP_STORE :: VkAttachmentStoreOp
- pattern VK_ATTACHMENT_STORE_OP_DONT_CARE :: VkAttachmentStoreOp
- newtype VkPipelineBindPoint = VkPipelineBindPoint Int32
- pattern VK_PIPELINE_BIND_POINT_GRAPHICS :: VkPipelineBindPoint
- pattern VK_PIPELINE_BIND_POINT_COMPUTE :: VkPipelineBindPoint
- newtype VkFramebufferCreateFlags = VkFramebufferCreateFlags VkFlags
- newtype VkRenderPassCreateFlags = VkRenderPassCreateFlags VkFlags
- newtype VkAccessFlagBits = VkAccessFlagBits VkFlags
- pattern VK_ACCESS_INDIRECT_COMMAND_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_INDEX_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_VERTEX_ATTRIBUTE_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_UNIFORM_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_INPUT_ATTACHMENT_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_SHADER_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_SHADER_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_COLOR_ATTACHMENT_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_TRANSFER_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_TRANSFER_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_HOST_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_HOST_WRITE_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_MEMORY_READ_BIT :: VkAccessFlagBits
- pattern VK_ACCESS_MEMORY_WRITE_BIT :: VkAccessFlagBits
- newtype VkSubpassDescriptionFlagBits = VkSubpassDescriptionFlagBits VkFlags
- newtype VkAttachmentDescriptionFlagBits = VkAttachmentDescriptionFlagBits VkFlags
- pattern VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: VkAttachmentDescriptionFlagBits
- newtype VkDependencyFlagBits = VkDependencyFlagBits VkFlags
- pattern VK_DEPENDENCY_BY_REGION_BIT :: VkDependencyFlagBits
- type VkFramebuffer = Ptr VkFramebuffer_T
- vkCreateFramebuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkFramebufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pFramebuffer" ::: Ptr VkFramebuffer) -> IO VkResult
- vkDestroyFramebuffer :: ("device" ::: VkDevice) -> ("framebuffer" ::: VkFramebuffer) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkCreateRenderPass :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkRenderPassCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pRenderPass" ::: Ptr VkRenderPass) -> IO VkResult
- vkDestroyRenderPass :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkGetRenderAreaGranularity :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pGranularity" ::: Ptr VkExtent2D) -> IO ()
- data VkAttachmentDescription = VkAttachmentDescription {}
- data VkAttachmentReference = VkAttachmentReference {}
- data VkSubpassDescription = VkSubpassDescription {
- vkFlags :: VkSubpassDescriptionFlags
- vkPipelineBindPoint :: VkPipelineBindPoint
- vkInputAttachmentCount :: Word32
- vkPInputAttachments :: Ptr VkAttachmentReference
- vkColorAttachmentCount :: Word32
- vkPColorAttachments :: Ptr VkAttachmentReference
- vkPResolveAttachments :: Ptr VkAttachmentReference
- vkPDepthStencilAttachment :: Ptr VkAttachmentReference
- vkPreserveAttachmentCount :: Word32
- vkPPreserveAttachments :: Ptr Word32
- data VkSubpassDependency = VkSubpassDependency {}
- data VkRenderPassCreateInfo = VkRenderPassCreateInfo {}
- data VkFramebufferCreateInfo = VkFramebufferCreateInfo {}
- type VkAccessFlags = VkAccessFlagBits
- type VkSubpassDescriptionFlags = VkSubpassDescriptionFlagBits
- type VkAttachmentDescriptionFlags = VkAttachmentDescriptionFlagBits
- type VkDependencyFlags = VkDependencyFlagBits
Documentation
newtype VkAttachmentLoadOp Source #
VkAttachmentLoadOp - Specify how contents of an attachment are treated at the beginning of a subpass
See Also
Constructors
| VkAttachmentLoadOp Int32 |
pattern VK_ATTACHMENT_LOAD_OP_LOAD :: VkAttachmentLoadOp Source #
VK_ATTACHMENT_LOAD_OP_LOAD specifies that the previous contents of the
image within the render area will be preserved. For attachments with a
depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BIT. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT.
pattern VK_ATTACHMENT_LOAD_OP_CLEAR :: VkAttachmentLoadOp Source #
VK_ATTACHMENT_LOAD_OP_CLEAR specifies that the contents within the
render area will be cleared to a uniform value, which is specified when
a render pass instance is begun. For attachments with a depth/stencil
format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
pattern VK_ATTACHMENT_LOAD_OP_DONT_CARE :: VkAttachmentLoadOp Source #
VK_ATTACHMENT_LOAD_OP_DONT_CARE specifies that the previous contents
within the area need not be preserved; the contents of the attachment
will be undefined inside the render area. For attachments with a
depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
newtype VkAttachmentStoreOp Source #
VkAttachmentStoreOp - Specify how contents of an attachment are treated at the end of a subpass
See Also
Constructors
| VkAttachmentStoreOp Int32 |
pattern VK_ATTACHMENT_STORE_OP_STORE :: VkAttachmentStoreOp Source #
VK_ATTACHMENT_STORE_OP_STORE specifies the contents generated during
the render pass and within the render area are written to memory. For
attachments with a depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
pattern VK_ATTACHMENT_STORE_OP_DONT_CARE :: VkAttachmentStoreOp Source #
VK_ATTACHMENT_STORE_OP_DONT_CARE specifies the contents within the
render area are not needed after rendering, and may be discarded; the
contents of the attachment will be undefined inside the render area. For
attachments with a depth/stencil format, this uses the access type
VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT. For attachments with a
color format, this uses the access type
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT.
newtype VkPipelineBindPoint Source #
VkPipelineBindPoint - Specify the bind point of a pipeline object to a command buffer
See Also
VkDescriptorUpdateTemplateCreateInfo,
VkIndirectCommandsLayoutCreateInfoNVX,
VkSubpassDescription,
vkCmdBindDescriptorSets,
vkCmdBindPipeline,
vkCmdPushDescriptorSetKHR
Constructors
| VkPipelineBindPoint Int32 |
pattern VK_PIPELINE_BIND_POINT_GRAPHICS :: VkPipelineBindPoint Source #
VK_PIPELINE_BIND_POINT_GRAPHICS specifies binding as a graphics
pipeline.
pattern VK_PIPELINE_BIND_POINT_COMPUTE :: VkPipelineBindPoint Source #
VK_PIPELINE_BIND_POINT_COMPUTE specifies binding as a compute
pipeline.
newtype VkFramebufferCreateFlags Source #
VkFramebufferCreateFlags - Reserved for future use
Description
VkFramebufferCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| VkFramebufferCreateFlags VkFlags |
newtype VkRenderPassCreateFlags Source #
VkRenderPassCreateFlags - Reserved for future use
Description
VkRenderPassCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| VkRenderPassCreateFlags VkFlags |
newtype VkAccessFlagBits Source #
VkAccessFlagBits - Bitmask specifying memory access types that will participate in a memory dependency
Description
VK_ACCESS_INDIRECT_COMMAND_READ_BITspecifies read access to an indirect command structure read as part of an indirect drawing or dispatch command.
VK_ACCESS_INDEX_READ_BITspecifies read access to an index buffer as part of an indexed drawing command, bound byvkCmdBindIndexBuffer.VK_ACCESS_VERTEX_ATTRIBUTE_READ_BITspecifies read access to a vertex buffer as part of a drawing command, bound byvkCmdBindVertexBuffers.VK_ACCESS_UNIFORM_READ_BITspecifies read access to a uniform buffer.VK_ACCESS_INPUT_ATTACHMENT_READ_BITspecifies read access to an input attachment within a render pass during fragment shading.VK_ACCESS_SHADER_READ_BITspecifies read access to a storage buffer, uniform texel buffer, storage texel buffer, sampled image, or storage image.VK_ACCESS_SHADER_WRITE_BITspecifies write access to a storage buffer, storage texel buffer, or storage image.VK_ACCESS_COLOR_ATTACHMENT_READ_BITspecifies read access to a color attachment, such as via blending, logic operations, or via certain subpass load operations. It does not include advanced blend operations.VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXTis similar toVK_ACCESS_COLOR_ATTACHMENT_READ_BIT, but also includes advanced blend operations.VK_ACCESS_COLOR_ATTACHMENT_WRITE_BITspecifies write access to a color or resolve attachment during a render pass or via certain subpass load and store operations.VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_READ_BITspecifies read access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load operations.VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BITspecifies write access to a depth/stencil attachment, via depth or stencil operations or via certain subpass load and store operations.VK_ACCESS_TRANSFER_READ_BITspecifies read access to an image or buffer in a copy operation.VK_ACCESS_TRANSFER_WRITE_BITspecifies write access to an image or buffer in a clear or copy operation.VK_ACCESS_HOST_READ_BITspecifies read access by a host operation. Accesses of this type are not performed through a resource, but directly on memory.VK_ACCESS_HOST_WRITE_BITspecifies write access by a host operation. Accesses of this type are not performed through a resource, but directly on memory.VK_ACCESS_MEMORY_READ_BITspecifies read access via non-specific entities. These entities include the Vulkan device and host, but may also include entities external to the Vulkan device or otherwise not part of the core Vulkan pipeline. When included in a destination access mask, makes all available writes visible to all future read accesses on entities known to the Vulkan device.VK_ACCESS_MEMORY_WRITE_BITspecifies write access via non-specific entities. These entities include the Vulkan device and host, but may also include entities external to the Vulkan device or otherwise not part of the core Vulkan pipeline. When included in a source access mask, all writes that are performed by entities known to the Vulkan device are made available. When included in a destination access mask, makes all available writes visible to all future write accesses on entities known to the Vulkan device.VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVXspecifies reads fromVkBufferinputs tovkCmdProcessCommandsNVX.VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVXspecifies writes to the target command buffer invkCmdProcessCommandsNVX.
Certain access types are only performed by a subset of pipeline stages. Any synchronization command that takes both stage masks and access masks uses both to define the access scopes - only the specified access types performed by the specified stages are included in the access scope. An application must not specify an access flag in a synchronization command if it does not include a pipeline stage in the corresponding stage mask that is able to perform accesses of that type. The following table lists, for each access flag, which pipeline stages can perform that type of access.
+-----------------------------------+-----------------------------------+ | Access flag | Supported pipeline stages | +===================================+===================================+ | @VK_ACCESS_INDIRECT_COMMAND_READ_ | @VK_PIPELINE_STAGE_DRAW_INDIRECT_ | | BIT@ | BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_INDEX_READ_BIT@ | @VK_PIPELINE_STAGE_VERTEX_INPUT_B | | | IT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_VERTEX_ATTRIBUTE_READ_ | @VK_PIPELINE_STAGE_VERTEX_INPUT_B | | BIT@ | IT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_UNIFORM_READ_BIT@ | @VK_PIPELINE_STAGE_VERTEX_SHADER_ | | | BIT@, | | | @VK_PIPELINE_STAGE_TESSELLATION_C | | | ONTROL_SHADER_BIT@, | | | @VK_PIPELINE_STAGE_TESSELLATION_E | | | VALUATION_SHADER_BIT@, | | | @VK_PIPELINE_STAGE_GEOMETRY_SHADE | | | R_BIT@, | | | @VK_PIPELINE_STAGE_FRAGMENT_SHADE | | | R_BIT@, | | | or | | | @VK_PIPELINE_STAGE_COMPUTE_SHADER | | | _BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_INPUT_ATTACHMENT_READ_ | @VK_PIPELINE_STAGE_FRAGMENT_SHADE | | BIT@ | R_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_SHADER_READ_BIT@ | @VK_PIPELINE_STAGE_VERTEX_SHADER_ | | | BIT@, | | | @VK_PIPELINE_STAGE_TESSELLATION_C | | | ONTROL_SHADER_BIT@, | | | @VK_PIPELINE_STAGE_TESSELLATION_E | | | VALUATION_SHADER_BIT@, | | | @VK_PIPELINE_STAGE_GEOMETRY_SHADE | | | R_BIT@, | | | @VK_PIPELINE_STAGE_FRAGMENT_SHADE | | | R_BIT@, | | | or | | | @VK_PIPELINE_STAGE_COMPUTE_SHADER | | | _BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_SHADER_WRITE_BIT@ | @VK_PIPELINE_STAGE_VERTEX_SHADER_ | | | BIT@, | | | @VK_PIPELINE_STAGE_TESSELLATION_C | | | ONTROL_SHADER_BIT@, | | | @VK_PIPELINE_STAGE_TESSELLATION_E | | | VALUATION_SHADER_BIT@, | | | @VK_PIPELINE_STAGE_GEOMETRY_SHADE | | | R_BIT@, | | | @VK_PIPELINE_STAGE_FRAGMENT_SHADE | | | R_BIT@, | | | or | | | @VK_PIPELINE_STAGE_COMPUTE_SHADER | | | _BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_COLOR_ATTACHMENT_READ_ | @VK_PIPELINE_STAGE_COLOR_ATTACHME | | BIT@ | NT_OUTPUT_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_COLOR_ATTACHMENT_READ_ | @VK_PIPELINE_STAGE_COLOR_ATTACHME | | NONCOHERENT_BIT_EXT@ | NT_OUTPUT_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_COLOR_ATTACHMENT_WRITE | @VK_PIPELINE_STAGE_COLOR_ATTACHME | | _BIT@ | NT_OUTPUT_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_DEPTH_STENCIL_ATTACHME | @VK_PIPELINE_STAGE_EARLY_FRAGMENT | | NT_READ_BIT@ | _TESTS_BIT@, | | | or | | | @VK_PIPELINE_STAGE_LATE_FRAGMENT_ | | | TESTS_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_DEPTH_STENCIL_ATTACHME | @VK_PIPELINE_STAGE_EARLY_FRAGMENT | | NT_WRITE_BIT@ | _TESTS_BIT@, | | | or | | | @VK_PIPELINE_STAGE_LATE_FRAGMENT_ | | | TESTS_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_TRANSFER_READ_BIT@ | @VK_PIPELINE_STAGE_TRANSFER_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_TRANSFER_WRITE_BIT@ | @VK_PIPELINE_STAGE_TRANSFER_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_HOST_READ_BIT@ | @VK_PIPELINE_STAGE_HOST_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_HOST_WRITE_BIT@ | @VK_PIPELINE_STAGE_HOST_BIT@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_MEMORY_READ_BIT@ | N\/A | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_MEMORY_WRITE_BIT@ | N\/A | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_COMMAND_PROCESS_READ_B | @VK_PIPELINE_STAGE_COMMAND_PROCES | | IT_NVX@ | S_BIT_NVX@ | +-----------------------------------+-----------------------------------+ | @VK_ACCESS_COMMAND_PROCESS_WRITE_ | @VK_PIPELINE_STAGE_COMMAND_PROCES | | BIT_NVX@ | S_BIT_NVX@ | +-----------------------------------+-----------------------------------+ Supported access types
If a memory object does not have the
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT property, then
vkFlushMappedMemoryRanges must be
called in order to guarantee that writes to the memory object from the
host are made visible to the VK_ACCESS_HOST_WRITE_BIT
access type, where
it can be further made available to the device by
synchronization commands.
Similarly,
vkInvalidateMappedMemoryRanges must be
called to guarantee that writes which are visible to the
VK_ACCESS_HOST_READ_BIT
access type are made
visible to host operations.
If the memory object does have the
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT property flag, writes to the
memory object from the host are automatically made visible to the
VK_ACCESS_HOST_WRITE_BIT
access type.
Similarly, writes made visible to the VK_ACCESS_HOST_READ_BIT
access type are
automatically made visible to the host.
Note
The vkQueueSubmit command
automatically guarantees that host writes flushed to VK_ACCESS_HOST_WRITE_BIT are made available
if they were flushed before the command executed, so in most cases an
explicit memory barrier is not needed for this case. In the few
circumstances where a submit does not occur between the host write and
the device read access, writes can be made available by using an
explicit memory barrier.
See Also
Constructors
| VkAccessFlagBits VkFlags |
pattern VK_ACCESS_INDEX_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_UNIFORM_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_SHADER_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_SHADER_WRITE_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_TRANSFER_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_TRANSFER_WRITE_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_HOST_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_HOST_WRITE_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_MEMORY_READ_BIT :: VkAccessFlagBits Source #
pattern VK_ACCESS_MEMORY_WRITE_BIT :: VkAccessFlagBits Source #
newtype VkSubpassDescriptionFlagBits Source #
VkSubpassDescriptionFlagBits - Bitmask specifying usage of a subpass
See Also
Constructors
| VkSubpassDescriptionFlagBits VkFlags |
Instances
newtype VkAttachmentDescriptionFlagBits Source #
VkAttachmentDescriptionFlagBits - Bitmask specifying additional properties of an attachment
See Also
Constructors
| VkAttachmentDescriptionFlagBits VkFlags |
Instances
pattern VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT :: VkAttachmentDescriptionFlagBits Source #
VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT specifies that the attachment
aliases the same device memory as other attachments.
newtype VkDependencyFlagBits Source #
VkDependencyFlagBits - Bitmask specifying how execution and memory dependencies are formed
See Also
Constructors
| VkDependencyFlagBits VkFlags |
pattern VK_DEPENDENCY_BY_REGION_BIT :: VkDependencyFlagBits Source #
VK_DEPENDENCY_BY_REGION_BIT specifies that dependencies will be
framebuffer-local.
type VkFramebuffer = Ptr VkFramebuffer_T Source #
VkFramebuffer - Opaque handle to a framebuffer object
Description
See Also
VkCommandBufferInheritanceInfo,
VkRenderPassBeginInfo,
vkCreateFramebuffer, vkDestroyFramebuffer
vkCreateFramebuffer :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkFramebufferCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pFramebuffer" ::: Ptr VkFramebuffer) -> IO VkResult Source #
vkCreateFramebuffer - Create a new framebuffer object
Parameters
deviceis the logical device that creates the framebuffer.
pCreateInfopoints to aVkFramebufferCreateInfostructure which describes additional information about framebuffer creation.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pFramebufferpoints to aVkFramebufferhandle in which the resulting framebuffer object is returned.
Description
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkFramebufferCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pFramebuffermust be a valid pointer to aVkFramebufferhandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks,
VkDevice, VkFramebuffer,
VkFramebufferCreateInfo
vkDestroyFramebuffer :: ("device" ::: VkDevice) -> ("framebuffer" ::: VkFramebuffer) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyFramebuffer - Destroy a framebuffer object
Parameters
deviceis the logical device that destroys the framebuffer.
framebufferis the handle of the framebuffer to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
Valid Usage
- All submitted commands that refer to
framebuffermust have completed execution
- If
VkAllocationCallbackswere provided whenframebufferwas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenframebufferwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
framebufferis notVK_NULL_HANDLE,framebuffermust be a validVkFramebufferhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
framebufferis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
framebuffermust be externally synchronized
See Also
vkCreateRenderPass :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkRenderPassCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pRenderPass" ::: Ptr VkRenderPass) -> IO VkResult Source #
vkCreateRenderPass - Create a new render pass object
Parameters
deviceis the logical device that creates the render pass.
pCreateInfois a pointer to an instance of theVkRenderPassCreateInfostructure that describes the parameters of the render pass.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pRenderPasspoints to aVkRenderPasshandle in which the resulting render pass object is returned.
Description
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkRenderPassCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pRenderPassmust be a valid pointer to aVkRenderPasshandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks,
VkDevice,
VkRenderPass, VkRenderPassCreateInfo
vkDestroyRenderPass :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyRenderPass - Destroy a render pass object
Parameters
deviceis the logical device that destroys the render pass.
renderPassis the handle of the render pass to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
Valid Usage
- All submitted commands that refer to
renderPassmust have completed execution
- If
VkAllocationCallbackswere provided whenrenderPasswas created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbackswere provided whenrenderPasswas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
renderPassis notVK_NULL_HANDLE,renderPassmust be a validVkRenderPasshandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
renderPassis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
renderPassmust be externally synchronized
See Also
vkGetRenderAreaGranularity :: ("device" ::: VkDevice) -> ("renderPass" ::: VkRenderPass) -> ("pGranularity" ::: Ptr VkExtent2D) -> IO () Source #
vkGetRenderAreaGranularity - Returns the granularity for optimal render area
Parameters
deviceis the logical device that owns the render pass.
renderPassis a handle to a render pass.pGranularitypoints to aVkExtent2Dstructure in which the granularity is returned.
Description
The conditions leading to an optimal renderArea are:
- the
offset.xmember inrenderAreais a multiple of thewidthmember of the returnedVkExtent2D(the horizontal granularity). - the
offset.ymember inrenderAreais a multiple of theheightof the returnedVkExtent2D(the vertical granularity). - either the
offset.widthmember inrenderAreais a multiple of the horizontal granularity oroffset.x+offset.widthis equal to thewidthof theframebufferin theVkRenderPassBeginInfo. - either the
offset.heightmember inrenderAreais a multiple of the vertical granularity oroffset.y+offset.heightis equal to theheightof theframebufferin theVkRenderPassBeginInfo.
Subpass dependencies are not affected by the render area, and apply to the entire image subresources attached to the framebuffer as specified in the description of automatic layout transitions. Similarly, pipeline barriers are valid even if their effect extends outside the render area.
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
renderPassmust be a validVkRenderPasshandlepGranularitymust be a valid pointer to aVkExtent2DstructurerenderPassmust have been created, allocated, or retrieved fromdevice
See Also
data VkAttachmentDescription Source #
VkAttachmentDescription - Structure specifying an attachment description
Description
If the attachment uses a color format, then loadOp and storeOp are
used, and stencilLoadOp and stencilStoreOp are ignored. If the
format has depth and/or stencil components, loadOp and storeOp
apply only to the depth data, while stencilLoadOp and stencilStoreOp
define how the stencil data is handled. loadOp and stencilLoadOp
define the load operations that execute as part of the first subpass
that uses the attachment. storeOp and stencilStoreOp define the
store operations that execute as part of the last subpass that uses
the attachment.
The load operation for each sample in an attachment happens-before any
recorded command which accesses the sample in the first subpass where
the attachment is used. Load operations for attachments with a
depth/stencil format execute in the
VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT pipeline stage. Load
operations for attachments with a color format execute in the
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.
The store operation for each sample in an attachment happens-after any
recorded command which accesses the sample in the last subpass where the
attachment is used. Store operations for attachments with a
depth/stencil format execute in the
VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT pipeline stage. Store
operations for attachments with a color format execute in the
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT pipeline stage.
If an attachment is not used by any subpass, then loadOp, storeOp,
stencilStoreOp, and stencilLoadOp are ignored, and the attachment’s
memory contents will not be modified by execution of a render pass
instance.
The load and store operations apply on the first and last use of each view in the render pass, respectively. If a view index of an attachment is not included in the view mask in any subpass that uses it, then the load and store operations are ignored, and the attachment’s memory contents will not be modified by execution of a render pass instance.
During a render pass instance, input/color attachments with color
formats that have a component size of 8, 16, or 32 bits must be
represented in the attachment’s format throughout the instance.
Attachments with other floating- or fixed-point color formats, or with
depth components may be represented in a format with a precision
higher than the attachment format, but must be represented with the
same range. When such a component is loaded via the loadOp, it will be
converted into an implementation-dependent format used by the render
pass. Such components must be converted from the render pass format,
to the format of the attachment, before they are resolved or stored at
the end of a render pass instance via storeOp. Conversions occur as
described in
Numeric Representation and Computation
and
Fixed-Point Data Conversions.
If flags includes VK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BIT, then the
attachment is treated as if it shares physical memory with another
attachment in the same render pass. This information limits the ability
of the implementation to reorder certain operations (like layout
transitions and the loadOp) such that it is not improperly reordered
against other uses of the same physical memory via a different
attachment. This is described in more detail below.
Valid Usage
finalLayoutmust not beVK_IMAGE_LAYOUT_UNDEFINEDorVK_IMAGE_LAYOUT_PREINITIALIZED
Valid Usage (Implicit)
flagsmust be a valid combination ofVkAttachmentDescriptionFlagBitsvalues
formatmust be a validVkFormatvaluesamplesmust be a validVkSampleCountFlagBitsvalueloadOpmust be a validVkAttachmentLoadOpvaluestoreOpmust be a validVkAttachmentStoreOpvaluestencilLoadOpmust be a validVkAttachmentLoadOpvaluestencilStoreOpmust be a validVkAttachmentStoreOpvalueinitialLayoutmust be a validVkImageLayoutvaluefinalLayoutmust be a validVkImageLayoutvalue
See Also
VkAttachmentDescriptionFlags, VkAttachmentLoadOp,
VkAttachmentStoreOp, VkFormat,
VkImageLayout, VkRenderPassCreateInfo,
VkSampleCountFlagBits
Constructors
| VkAttachmentDescription | |
Fields
| |
data VkAttachmentReference Source #
VkAttachmentReference - Structure specifying an attachment reference
Description
Valid Usage
layoutmust not beVK_IMAGE_LAYOUT_UNDEFINEDorVK_IMAGE_LAYOUT_PREINITIALIZED
Valid Usage (Implicit)
layoutmust be a validVkImageLayoutvalue
See Also
Constructors
| VkAttachmentReference | |
Fields
| |
data VkSubpassDescription Source #
VkSubpassDescription - Structure specifying a subpass description
Description
The contents of an attachment within the render area become undefined at the start of a subpass S if all of the following conditions are true:
- The attachment is used as a color, depth/stencil, or resolve attachment in any subpass in the render pass.
- There is a subpass S1 that uses or preserves the attachment, and a subpass dependency from S1 to S.
- The attachment is not used or preserved in subpass S.
Once the contents of an attachment become undefined in subpass S, they remain undefined for subpasses in subpass dependency chains starting with subpass S until they are written again. However, they remain valid for subpasses in other subpass dependency chains starting with subpass S1 if those subpasses use or preserve the attachment.
Valid Usage
pipelineBindPointmust beVK_PIPELINE_BIND_POINT_GRAPHICS
colorAttachmentCountmust be less than or equal toVkPhysicalDeviceLimits::maxColorAttachments- If the first use of an attachment in this render pass is as an input
attachment, and the attachment is not also used as a color or
depth/stencil attachment in the same subpass, then
loadOpmust not beVK_ATTACHMENT_LOAD_OP_CLEAR - If
pResolveAttachmentsis notNULL, for each resolve attachment that does not have the valueVK_ATTACHMENT_UNUSED, the corresponding color attachment must not have the valueVK_ATTACHMENT_UNUSED - If
pResolveAttachmentsis notNULL, the sample count of each element ofpColorAttachmentsmust be anything other thanVK_SAMPLE_COUNT_1_BIT - Each element of
pResolveAttachmentsmust have a sample count ofVK_SAMPLE_COUNT_1_BIT - Each element of
pResolveAttachmentsmust have the sameVkFormatas its corresponding color attachment - All attachments in
pColorAttachmentsthat are notVK_ATTACHMENT_UNUSEDmust have the same sample count - All attachments in
pColorAttachmentsthat are notVK_ATTACHMENT_UNUSEDmust have a sample count that is smaller than or equal to the sample count ofpDepthStencilAttachmentif it is notVK_ATTACHMENT_UNUSED - If any input attachments are
VK_ATTACHMENT_UNUSED, then any pipelines bound during the subpass must not access those input attachments from the fragment shader - The
attachmentmember of each element ofpPreserveAttachmentsmust not beVK_ATTACHMENT_UNUSED - Each element of
pPreserveAttachmentsmust not also be an element of any other member of the subpass description - If any attachment is used as both an input attachment and a color or
depth/stencil attachment, then each use must use the same
layout - If
flagsincludesVK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX, it must also includeVK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX.
Valid Usage (Implicit)
flagsmust be a valid combination ofVkSubpassDescriptionFlagBitsvalues
pipelineBindPointmust be a validVkPipelineBindPointvalue- If
inputAttachmentCountis not0,pInputAttachmentsmust be a valid pointer to an array ofinputAttachmentCountvalidVkAttachmentReferencestructures - If
colorAttachmentCountis not0,pColorAttachmentsmust be a valid pointer to an array ofcolorAttachmentCountvalidVkAttachmentReferencestructures - If
colorAttachmentCountis not0, andpResolveAttachmentsis notNULL,pResolveAttachmentsmust be a valid pointer to an array ofcolorAttachmentCountvalidVkAttachmentReferencestructures - If
pDepthStencilAttachmentis notNULL,pDepthStencilAttachmentmust be a valid pointer to a validVkAttachmentReferencestructure - If
preserveAttachmentCountis not0,pPreserveAttachmentsmust be a valid pointer to an array ofpreserveAttachmentCountuint32_tvalues
See Also
VkAttachmentReference, VkPipelineBindPoint,
VkRenderPassCreateInfo, VkSubpassDescriptionFlags
Constructors
| VkSubpassDescription | |
Fields
| |
data VkSubpassDependency Source #
VkSubpassDependency - Structure specifying a subpass dependency
Description
If srcSubpass is equal to dstSubpass then the VkSubpassDependency
describes a
subpass self-dependency,
and only constrains the pipeline barriers allowed within a subpass
instance. Otherwise, when a render pass instance which includes a
subpass dependency is submitted to a queue, it defines a memory
dependency between the subpasses identified by srcSubpass and
dstSubpass.
If srcSubpass is equal to VK_SUBPASS_EXTERNAL, the first
synchronization scope
includes commands that occur earlier in
submission order
than the
vkCmdBeginRenderPass used
to begin the render pass instance. Otherwise, the first set of commands
includes all commands submitted as part of the subpass instance
identified by srcSubpass and any load, store or multisample resolve
operations on attachments used in srcSubpass. In either case, the
first synchronization scope is limited to operations on the pipeline
stages determined by the
source stage mask
specified by srcStageMask.
If dstSubpass is equal to VK_SUBPASS_EXTERNAL, the second
synchronization scope
includes commands that occur later in
submission order
than the
vkCmdEndRenderPass used
to end the render pass instance. Otherwise, the second set of commands
includes all commands submitted as part of the subpass instance
identified by dstSubpass and any load, store or multisample resolve
operations on attachments used in dstSubpass. In either case, the
second synchronization scope is limited to operations on the pipeline
stages determined by the
destination stage mask
specified by dstStageMask.
The first
access scope
is limited to access in the pipeline stages determined by the
source stage mask
specified by srcStageMask. It is also limited to access types in the
source access mask
specified by srcAccessMask.
The second
access scope
is limited to access in the pipeline stages determined by the
destination stage mask
specified by dstStageMask. It is also limited to access types in the
destination access mask
specified by dstAccessMask.
The availability and visibility operations defined by a subpass dependency affect the execution of image layout transitions within the render pass.
Note
For non-attachment resources, the memory dependency expressed by subpass
dependency is nearly identical to that of a
VkMemoryBarrier (with
matching srcAccessMask/dstAccessMask parameters) submitted as a
part of a
vkCmdPipelineBarrier
(with matching srcStageMask/dstStageMask parameters). The only
difference being that its scopes are limited to the identified subpasses
rather than potentially affecting everything before and after.
For attachments however, subpass dependencies work more like an
VkImageMemoryBarrier
defined similarly to the
VkMemoryBarrier above,
the queue family indices set to VK_QUEUE_FAMILY_IGNORED, and layouts
as follows:
- The equivalent to
oldLayoutis the attachment’s layout according to the subpass description forsrcSubpass. - The equivalent to
newLayoutis the attachment’s layout according to the subpass description fordstSubpass.
Valid Usage
- If
srcSubpassis notVK_SUBPASS_EXTERNAL,srcStageMaskmust not includeVK_PIPELINE_STAGE_HOST_BIT
- If
dstSubpassis notVK_SUBPASS_EXTERNAL,dstStageMaskmust not includeVK_PIPELINE_STAGE_HOST_BIT - If the
geometry shaders
feature is not enabled,
srcStageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the
geometry shaders
feature is not enabled,
dstStageMaskmust not containVK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT - If the
tessellation shaders
feature is not enabled,
srcStageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT - If the
tessellation shaders
feature is not enabled,
dstStageMaskmust not containVK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BITorVK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT srcSubpassmust be less than or equal todstSubpass, unless one of them isVK_SUBPASS_EXTERNAL, to avoid cyclic dependencies and ensure a valid execution ordersrcSubpassanddstSubpassmust not both be equal toVK_SUBPASS_EXTERNAL- If
srcSubpassis equal todstSubpass,srcStageMaskanddstStageMaskmust only contain one ofVK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT,VK_PIPELINE_STAGE_VERTEX_INPUT_BIT,VK_PIPELINE_STAGE_VERTEX_SHADER_BIT,VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT,VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT,VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT,VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT,VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT,VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, orVK_PIPELINE_STAGE_ALL_GRAPHICS_BIT - If
srcSubpassis equal todstSubpassand not all of the stages insrcStageMaskanddstStageMaskare framebuffer-space stages, the logically latest pipeline stage insrcStageMaskmust be logically earlier than or equal to the logically earliest pipeline stage indstStageMask - Any access flag included in
srcAccessMaskmust be supported by one of the pipeline stages insrcStageMask, as specified in the table of supported access types. - Any access flag included in
dstAccessMaskmust be supported by one of the pipeline stages indstStageMask, as specified in the table of supported access types. - If
dependencyFlagsincludesVK_DEPENDENCY_VIEW_LOCAL_BIT, then bothsrcSubpassanddstSubpassmust not equalVK_SUBPASS_EXTERNAL - If
dependencyFlagsincludesVK_DEPENDENCY_VIEW_LOCAL_BIT, then the render pass must have multiview enabled - If
srcSubpassequalsdstSubpassand that subpass has more than one bit set in the view mask, thendependencyFlagsmust includeVK_DEPENDENCY_VIEW_LOCAL_BIT
Valid Usage (Implicit)
srcStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvalues
srcStageMaskmust not be0dstStageMaskmust be a valid combination ofVkPipelineStageFlagBitsvaluesdstStageMaskmust not be0srcAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdstAccessMaskmust be a valid combination ofVkAccessFlagBitsvaluesdependencyFlagsmust be a valid combination ofVkDependencyFlagBitsvalues
See Also
VkAccessFlags, VkDependencyFlags,
VkPipelineStageFlags,
VkRenderPassCreateInfo
Constructors
| VkSubpassDependency | |
Fields
| |
data VkRenderPassCreateInfo Source #
VkRenderPassCreateInfo - Structure specifying parameters of a newly created render pass
Description
Valid Usage
- If any two subpasses operate on attachments with overlapping ranges
of the same
VkDeviceMemoryobject, and at least one subpass writes to that area ofVkDeviceMemory, a subpass dependency must be included (either directly or via some intermediate subpasses) between them
- If the
attachmentmember of any element ofpInputAttachments,pColorAttachments,pResolveAttachmentsorpDepthStencilAttachment, or the attachment indexed by any element ofpPreserveAttachmentsin any element ofpSubpassesis bound to a range of aVkDeviceMemoryobject that overlaps with any other attachment in any subpass (including the same subpass), theVkAttachmentDescriptionstructures describing them must includeVK_ATTACHMENT_DESCRIPTION_MAY_ALIAS_BITinflags - If the
attachmentmember of any element ofpInputAttachments,pColorAttachments,pResolveAttachmentsorpDepthStencilAttachment, or any element ofpPreserveAttachmentsin any element ofpSubpassesis notVK_ATTACHMENT_UNUSED, it must be less thanattachmentCount - The value of each element of the
pPreserveAttachmentsmember in each element ofpSubpassesmust not beVK_ATTACHMENT_UNUSED - For any member of
pAttachmentswith aloadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toVK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMALorVK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL. - For any member of
pAttachmentswith aloadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toVK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL. - For any member of
pAttachmentswith astencilLoadOpequal toVK_ATTACHMENT_LOAD_OP_CLEAR, the first use of that attachment must not specify alayoutequal toVK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL. - For any element of
pDependencies, if thesrcSubpassis notVK_SUBPASS_EXTERNAL, all stage flags included in thesrcStageMaskmember of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPointmember of the source subpass. - For any element of
pDependencies, if thedstSubpassis notVK_SUBPASS_EXTERNAL, all stage flags included in thedstStageMaskmember of that dependency must be a pipeline stage supported by the pipeline identified by thepipelineBindPointmember of the source subpass.
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkRenderPassInputAttachmentAspectCreateInfoorVkRenderPassMultiviewCreateInfo - Each
sTypemember in thepNextchain must be unique flagsmust be0- If
attachmentCountis not0,pAttachmentsmust be a valid pointer to an array ofattachmentCountvalidVkAttachmentDescriptionstructures pSubpassesmust be a valid pointer to an array ofsubpassCountvalidVkSubpassDescriptionstructures- If
dependencyCountis not0,pDependenciesmust be a valid pointer to an array ofdependencyCountvalidVkSubpassDependencystructures subpassCountmust be greater than0
See Also
VkAttachmentDescription, VkRenderPassCreateFlags,
VkStructureType, VkSubpassDependency,
VkSubpassDescription, vkCreateRenderPass
Constructors
| VkRenderPassCreateInfo | |
Fields
| |
data VkFramebufferCreateInfo Source #
VkFramebufferCreateInfo - Structure specifying parameters of a newly created framebuffer
Description
Applications must ensure that all accesses to memory that backs image subresources used as attachments in a given renderpass instance either happen-before the load operations for those attachments, or happen-after the store operations for those attachments.
For depth/stencil attachments, each aspect can be used separately as
attachments and non-attachments as long as the non-attachment accesses
are also via an image subresource in either the
VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL layout or
the VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL layout,
and the attachment resource uses whichever of those two layouts the
image accesses do not. Use of non-attachment aspects in this case is
only well defined if the attachment is used in the subpass where the
non-attachment access is being made, or the layout of the image
subresource is constant throughout the entire render pass instance,
including the initialLayout and finalLayout.
Note
These restrictions mean that the render pass has full knowledge of all uses of all of the attachments, so that the implementation is able to make correct decisions about when and how to perform layout transitions, when to overlap execution of subpasses, etc.
It is legal for a subpass to use no color or depth/stencil attachments,
and rather use shader side effects such as image stores and atomics to
produce an output. In this case, the subpass continues to use the
width, height, and layers of the framebuffer to define the
dimensions of the rendering area, and the rasterizationSamples from
each pipeline’s
VkPipelineMultisampleStateCreateInfo
to define the number of samples used in rasterization; however, if
VkPhysicalDeviceFeatures::variableMultisampleRate
is VK_FALSE, then all pipelines to be bound with a given
zero-attachment subpass must have the same value for
VkPipelineMultisampleStateCreateInfo::rasterizationSamples.
Valid Usage
attachmentCountmust be equal to the attachment count specified inrenderPass
- Each element of
pAttachmentsthat is used as a color attachment or resolve attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT - Each element of
pAttachmentsthat is used as a depth/stencil attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT - Each element of
pAttachmentsthat is used as an input attachment byrenderPassmust have been created with ausagevalue includingVK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT - Each element of
pAttachmentsmust have been created with anVkFormatvalue that matches theVkFormatspecified by the correspondingVkAttachmentDescriptioninrenderPass - Each element of
pAttachmentsmust have been created with asamplesvalue that matches thesamplesvalue specified by the correspondingVkAttachmentDescriptioninrenderPass - Each element of
pAttachmentsmust have dimensions at least as large as the corresponding framebuffer dimension - Each element of
pAttachmentsmust only specify a single mip level - Each element of
pAttachmentsmust have been created with the identity swizzle widthmust be greater than0.widthmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferWidthheightmust be greater than0.heightmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferHeightlayersmust be greater than0.layersmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferLayers- Each element of
pAttachmentsthat is a 2D or 2D array image view taken from a 3D image must not be a depth/stencil format
Valid Usage (Implicit)
sTypemust beVK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO
pNextmust beNULLflagsmust be0renderPassmust be a validVkRenderPasshandle- If
attachmentCountis not0,pAttachmentsmust be a valid pointer to an array ofattachmentCountvalidVkImageViewhandles - Both of
renderPass, and the elements ofpAttachmentsthat are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkFramebufferCreateFlags,
VkImageView,
VkRenderPass,
VkStructureType, vkCreateFramebuffer
Constructors
| VkFramebufferCreateInfo | |
Fields
| |
type VkAccessFlags = VkAccessFlagBits Source #
VkAccessFlags - Bitmask of VkAccessFlagBits
Description
VkAccessFlags is a bitmask type for setting a mask of zero or more
VkAccessFlagBits.
See Also
VkAccessFlagBits,
VkBufferMemoryBarrier,
VkImageMemoryBarrier,
VkMemoryBarrier,
VkSubpassDependency
type VkSubpassDescriptionFlags = VkSubpassDescriptionFlagBits Source #
VkSubpassDescriptionFlags - Bitmask of VkSubpassDescriptionFlagBits
Description
VkSubpassDescriptionFlags is a bitmask type for setting a mask of zero
or more VkSubpassDescriptionFlagBits.
See Also
type VkAttachmentDescriptionFlags = VkAttachmentDescriptionFlagBits Source #
VkAttachmentDescriptionFlags - Bitmask of VkAttachmentDescriptionFlagBits
Description
VkAttachmentDescriptionFlags is a bitmask type for setting a mask of
zero or more VkAttachmentDescriptionFlagBits.
See Also
type VkDependencyFlags = VkDependencyFlagBits Source #
VkDependencyFlags - Bitmask of VkDependencyFlagBits
Description
VkDependencyFlags is a bitmask type for setting a mask of zero or more
VkDependencyFlagBits.
See Also
VkDependencyFlagBits, VkSubpassDependency,
vkCmdPipelineBarrier