From 9b35a16c645cfbed80b23b81c30317f39a94e0dd Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 1 Oct 2020 10:17:56 +0200 Subject: rhi: Add a note to generateMips docs Change-Id: Ib07eef8944367948338075832452fdae6df6078a Reviewed-by: Andy Nichols --- src/gui/rhi/qrhi.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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) { -- cgit v1.2.3