Are Load/Store/Atomic operations on “Storage Images” treated as Transfer Operations ?
Do these resources need to have VK_IMAGE_USAGE_TRANSFER_SRC/DST bit set or just VK_IMAGE_USAGE_STORAGE_BIT ?
Or in more general, are VK_IMAGE_USAGE_TRANSFER_SRC/DST required only on resources taking part in DMA/Blit operations (on TRANSFER/SPARSE Queue)?
If they had to use the TRANSFER_SRC/DST_BIT
… there wouldn’t be a point in also having the STORAGE_BIT
, would there?
Don’t over-think the specification. The spec says:
VK_IMAGE_USAGE_TRANSFER_SRC/DST_BIT indicates that the image can be used as the source/destination of a transfer
command.
Is writing to the image from a shader a “transfer command”? No. The spec says:
The set of transfer commands comprises vkCmdCopyBuffer, vkCmdCopyImage,vkCmdBlitImage, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer, vkCmdUpdateBuffer, vkCmdFillBuffer, vkCmdClearColorImage, vkCmdClearDepthStencilImage, vkCmdResolveImage, and vkCmdCopyQueryPoolResults.
None of those perform rendering operations.
That makes sense.
Image Store/Atomic operations are not rendering operations, they are render pipeline side effect operations similar to Transform Feedback/Stream Out.
Usage bits looked different before final release, thus my question.