80 lines
2.6 KiB
Plaintext
80 lines
2.6 KiB
Plaintext
// Copyright (c) 2014-2016 Khronos Group. This work is licensed under a
|
|
// Creative Commons Attribution 4.0 International License; see
|
|
// http://creativecommons.org/licenses/by/4.0/
|
|
|
|
VkClearAttachment(3)
|
|
====================
|
|
|
|
Name
|
|
----
|
|
VkClearAttachment - Structure specifying a clear attachment
|
|
|
|
C Specification
|
|
---------------
|
|
|
|
// refBegin VkClearAttachment - Structure specifying a clear attachment
|
|
|
|
The sname:VkClearAttachment structure is defined as:
|
|
|
|
include::../api/structs/VkClearAttachment.txt[]
|
|
|
|
|
|
Members
|
|
-------
|
|
|
|
* pname:aspectMask is a mask selecting the color, depth and/or stencil
|
|
aspects of the attachment to be cleared. pname:aspectMask can: include
|
|
ename:VK_IMAGE_ASPECT_COLOR_BIT for color attachments,
|
|
ename:VK_IMAGE_ASPECT_DEPTH_BIT for depth/stencil attachments with a
|
|
depth component, and ename:VK_IMAGE_ASPECT_STENCIL_BIT for depth/stencil
|
|
attachments with a stencil component. If the subpass's depth/stencil
|
|
attachment is ename:VK_ATTACHMENT_UNUSED, then the clear has no effect.
|
|
* pname:colorAttachment is only meaningful if
|
|
ename:VK_IMAGE_ASPECT_COLOR_BIT is set in pname:aspectMask, in which
|
|
case it is an index to the pname:pColorAttachments array in the
|
|
slink:VkSubpassDescription structure of the current subpass which
|
|
selects the color attachment to clear. If pname:colorAttachment is
|
|
ename:VK_ATTACHMENT_UNUSED or is greater than or equal to
|
|
sname:VkSubpassDescription::pname:colorAttachmentCount, then the clear has
|
|
no effect.
|
|
* pname:clearValue is the color or depth/stencil value to clear the
|
|
attachment to, as described in <<clears-values,Clear Values>> below.
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
No memory barriers are needed between fname:vkCmdClearAttachments and
|
|
preceding or subsequent draw or attachment clear commands in the same
|
|
subpass.
|
|
|
|
The fname:vkCmdClearAttachments command is not affected by the bound
|
|
pipeline state.
|
|
|
|
Attachments can: also be cleared at the beginning of a render pass instance
|
|
by setting pname:loadOp (or pname:stencilLoadOp) of
|
|
slink:VkAttachmentDescription to ename:VK_ATTACHMENT_LOAD_OP_CLEAR, as
|
|
described for flink:vkCreateRenderPass.
|
|
|
|
include::../validity/structs/VkClearAttachment.txt[]
|
|
|
|
|
|
See Also
|
|
--------
|
|
|
|
slink:VkClearValue, elink:VkImageAspectFlags, flink:vkCmdClearAttachments
|
|
|
|
|
|
Document Notes
|
|
--------------
|
|
|
|
For more information, see the Vulkan Specification at URL
|
|
|
|
https://www.khronos.org/registry/vulkan/specs/1.0/xhtml/vkspec.html#VkClearAttachment
|
|
|
|
This page is extracted from the Vulkan Specification.
|
|
Fixes and changes should be made to the Specification,not directly.
|
|
|
|
include::footer.txt[]
|
|
|