for Queue::write_texture, does data_layout
refer to the source image, or the destination image?
#3172
-
I'm working on packing a texture atlas. So I have image data for my source images, as I see I can do this with the 'Queue::write_texture' method. This method takes an ImageDataLayout as an argument, which allows me to specify the bytes per row, and rows per image of something, but it's not clear to me whether this is the source image (bytes of the bitmap being copied) or the destination image (image the bitmap bytes are being copied to). So for instance, if I have a 2x2 image:
And I want to copy this into the top left corner of a 4x4 image, how would I achieve this? edit: for instance in Vulkan you would specify the image subresource range you want to copy to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It refers to the layout in the buffer. For example to copy that you'd have a bytes per row of 2, an extent of 2x2x1 an an origin (in the image copy struct) of 0,0,0 We'd be open to a PR that improves the verbiage here. |
Beta Was this translation helpful? Give feedback.
It refers to the layout in the buffer. For example to copy that you'd have a bytes per row of 2, an extent of 2x2x1 an an origin (in the image copy struct) of 0,0,0
We'd be open to a PR that improves the verbiage here.