All graphics API allow to set the stride of uploaded textures.
- GL: glPixelStorei(GL_UNPACK_ROW_LENGTH,stride);
- Vulkan: I assume it's rowPitch in VkSubresourceLayout
- Metal: newTextureWithDescriptor takes a bytesPerRow parameter
- D3D11: looks like it's somewhere in there: https://docs.microsoft.com/en-us/windows/win32/api/d3d11/ns-d3d11-d3d11_subresource_data
This is useful for instance for GPU video playback: some videos are decoded into slightly wider buffers for decoder efficiency reasons; e.g. a 720 * 576 video may be decoded in a 768 * 576 texture with the 48 rightmost pixels of each line to be ignored.
could this feature be added to the QRhiTextureSubresourceUploadDescription API in some way ? Even at texture construction time would already be very useful
|For Gerrit Dashboard: QTBUG-90770|
|332643,4||rhi: Add support for custom bytes-per-line for uncompressed raw data||dev||qt/qtbase||Status: MERGED||+2||0|