summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-13 15:43:16 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2021-09-16 22:58:11 +0200
commitc5a3cabce0f9fd615a77772002d6e1b5ca121919 (patch)
tree8af9942a715cb1e2b1d10c5c86d225a87bbc0218 /src/gui/rhi
parentd470497d9a05fbdc251a2524f2d11ea6f90fa7c6 (diff)
rhi: Note in the docs that texture copies expect a matching format
Pick-to: 6.2 Change-Id: I0a1fb042ec2a3983ffbd146ff9bdc9af20134fa5 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r--src/gui/rhi/qrhi.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index 7c1e3811b1..e924841375 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -5312,6 +5312,11 @@ void QRhiResourceUpdateBatch::uploadTexture(QRhiTexture *tex, const QImage &imag
\note The source texture \a src must be created with
QRhiTexture::UsedAsTransferSource.
+
+ \note The format of the textures must match. With most graphics
+ APIs the data is copied as-is without any format conversions. If
+ \a dst and \a src are created with different formats, unspecified
+ issues may arise.
*/
void QRhiResourceUpdateBatch::copyTexture(QRhiTexture *dst, QRhiTexture *src, const QRhiTextureCopyDescription &desc)
{