Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRequest for clarification of the usage notes on vkCmdCopyBufferToImage #676
Labels
Comments
|
The spec works under the assumption that "region" is the copied part only (and the rest is left untouched). |
|
Right, the answer would be 66. We'll clarify this in the spec. |
|
This should be fixed in the 1.1.74 spec update. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Valid Usagesection ofvkCmdCopyBufferToImagestates the following:However, I'm having trouble answering this question about a corner case: Suppose I have a 64x64 2D image, and I present an upload operation that looks like this:
In other words, I'm uploading a 2x2 subregion, with a horizontal stride of 64. What is the minimum buffer size (in texels) for this to be a valid operation? Is it 128 (imageExtent.height * bufferRowLength) since I'm transferring two rows of a 2D image, or is it 66 (2 pixels + 62 pixels of padding + 2 more pixels) since that's the minimum contiguous region that contains all of the pixels to be transferred and no superfluous padding as a result of the stride?
In image processing it's often typical for the padding at the end of the last row of the included, that is, the total size is typically calculated as
height * stride, rather than(height - 1) * stride + width. But it would seem to me that, strictly speaking, this extra padding isn't necessary. Is this correct?