Vk_Attachment_Store_Op_Dont_Care

Vk_Attachment_Store_Op_Dont_Care



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 .


8/17/2020  · Similarly, if you don’t need to write the attachment’s final values to memory for later use, you can use VK_ATTACHMENT_STORE_OP_DONT_CARE to attain much better performance than VK_ATTACHMENT_STORE_OP_STORE . Also, in most render passes, your app doesn’t need to load or store the depth/stencil attachment.


Writing out the multi-sampled attachment to off-chip memory (rather than using VK_ATTACHMENT_STORE_OP_DONT_CARE) has a high bandwidth cost, and vkCmdResolveImage() itself must then read all this data back, process it, and write the single-sampled output. It is very much more efficient to perform resolve operations inside a render pass where possible.


The store operation flag should be set to VK_ATTACHMENT_STORE_OP_DONT_CARE as this tells the driver to discard the contents of this buffer after use to save memory bandwidth – the buffer is not to be preserved. There must also be a second frame buffer attachment, which will be used to.


In Vulkan, this is done by putting VK_ATTACHMENT_STORE_OP_DONT_CARE in the storeOp renderpass attribute. On the OpenGL side, since there is no explicit storeOp or flushing instructions รก la Vulkan, it is important to call glInvalidateFramebuffer before the GPU decides to execute the contents of said framebuffer (otherwise the invalidate won’t be taken into account).


In Vulkan, this is done by putting VK_ATTACHMENT_STORE_OP_DONT_CARE in the storeOp renderpass attribute. On OpenGL, where there are no explicit storeOp and flushing instructions like Vulkan, it is important to call glInvalidateFramebuffer before the GPU decides to execute the contents of said framebuffer, otherwise the invalidate won’t be taken into account.


3/16/2017  · This second scenario doesn’t assume VK_ATTACHMENT_STORE_OP_DONT_CARE , so maybe this bug should be renamed to Should be OK for fragment program to not write to color attachment. Copy link Collaborator chrisforbes commented Mar 20, 2017. If you’re doing a depth-only pass, why does the subpass include the color attachment at all? …


It is critically important that we set up the storeOp correctly for the multisampled attachment. After resolve, there is no need why we should ever want to keep the multisampled data, so we set it to STORE_OP_DONT_CARE.


VkAttachmentDescription depth_desc = {} depth_desc.storeOp = VK_ATTACHMENT_STORE_OP_DONT_CARE It is worth noticing that we can create a depth image with the LAZILY_ALLOCATED memory property, which means that it will be allocated by tile-based GPUs only if it is actually stored (by using STORE_OP_STORE ).

Advertiser