summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-10-01 10:17:56 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-10-02 13:14:38 +0200
commit9b35a16c645cfbed80b23b81c30317f39a94e0dd (patch)
treeeec2cb0348d19bd170e29551e3c47bccc804c3d3 /src/gui/rhi
parent0b7aef08dcfc84390380a4b7a1a956d1e3193339 (diff)
rhi: Add a note to generateMips docs
Change-Id: Ib07eef8944367948338075832452fdae6df6078a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi')
-rw-r--r--src/gui/rhi/qrhi.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp
index 0dc3082b03..1e158f36ef 100644
--- a/src/gui/rhi/qrhi.cpp
+++ b/src/gui/rhi/qrhi.cpp
@@ -4991,6 +4991,13 @@ void QRhiResourceUpdateBatch::readBackTexture(const QRhiReadbackDescription &rb,
\note The texture must be created with QRhiTexture::MipMapped and
QRhiTexture::UsedWithGenerateMips.
+
+ \warning QRhi cannot guarantee that mipmaps can be generated for all
+ supported texture formats. For example, QRhiTexture::RGBA32F is not a \c
+ filterable format in OpenGL ES 3.0 and Metal on iOS, and therefore the
+ mipmap generation request may fail. RGBA8 and RGBA16F are typically
+ filterable, so it is recommended to use these formats when mipmap generation
+ is desired.
*/
void QRhiResourceUpdateBatch::generateMips(QRhiTexture *tex)
{