From 803e5f0ff771944c8d5350b28940860d6b54a394 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 26 Jul 2023 16:14:28 +0200 Subject: [PATCH] rhi: Add a note to sampler docs about mipmaps Fixes: QTBUG-115521 Pick-to: 6.6 Change-Id: I774cdc4d1b9e09624a9b5f9969eae5085b40a6c0 Reviewed-by: Laszlo Agocs --- src/gui/rhi/qrhi.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index fbc94d450e..faf5427c1c 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -10221,6 +10221,14 @@ QRhiTexture *QRhi::newTextureArray(QRhiTexture::Format format, minification filter \a minFilter, mipmapping mode \a mipmapMode, and the addressing (wrap) modes \a addressU, \a addressV, and \a addressW. + \note Setting \a mipmapMode to a value other than \c None implies that + images for all relevant mip levels will be provided either via + \l{QRhiResourceUpdateBatch::uploadTexture()}{texture uploads} or by calling + \l{QRhiResourceUpdateBatch::generateMips()}{generateMips()} on the texture + that is used with this sampler. Attempting to use the sampler with a + texture that has no data for all relevant mip levels will lead to rendering + errors, with the exact behavior dependent on the underlying graphics API. + \sa QRhiResource::destroy() */ QRhiSampler *QRhi::newSampler(QRhiSampler::Filter magFilter,