summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2021-09-13 15:43:16 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-17 00:47:53 +0000
commit236675f7c0fb80283423d43458753cee127ea5b8 (patch)
tree89606bf0408dabf418ff242ffff042d5d2545264 /src/gui
parentcfe4c2e1c8c5e88216e9fc6150cbf5a8ca0a532c (diff)
rhi: Note in the docs that texture copies expect a matching format
Change-Id: I0a1fb042ec2a3983ffbd146ff9bdc9af20134fa5 Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit c5a3cabce0f9fd615a77772002d6e1b5ca121919) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui')
-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 a7dadb9a3c..7343c477d5 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -5318,6 +5318,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)
{