diff options
Diffstat (limited to 'src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp')
-rw-r--r-- | src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp b/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp index 46dc6c5507..d5d22f3677 100644 --- a/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp +++ b/src/quick/scenegraph/compressedtexture/qsgcompressedtexture.cpp @@ -377,19 +377,20 @@ void QSGCompressedTexture::commitTextureOperations(QRhi *rhi, QRhiResourceUpdate return; } - QRhiTexture::Flags texFlags; - if (fmt.isSRGB) - texFlags |= QRhiTexture::sRGB; + if (!m_texture) { + QRhiTexture::Flags texFlags; + if (fmt.isSRGB) + texFlags |= QRhiTexture::sRGB; - if (!rhi->isTextureFormatSupported(fmt.rhiFormat, texFlags)) { - qWarning("Unsupported compressed format 0x%x", m_textureData.glInternalFormat()); - return; - } + if (!rhi->isTextureFormatSupported(fmt.rhiFormat, texFlags)) { + qCDebug(QSG_LOG_TEXTUREIO, "Compressed texture format possibly unsupported: 0x%x", + m_textureData.glInternalFormat()); + } - if (!m_texture) { m_texture = rhi->newTexture(fmt.rhiFormat, m_size, 1, texFlags); if (!m_texture->create()) { - qWarning("Failed to create QRhiTexture for compressed data"); + qWarning("Failed to create QRhiTexture for compressed data with format 0x%x", + m_textureData.glInternalFormat()); delete m_texture; m_texture = nullptr; return; @@ -466,3 +467,5 @@ QSize QSGCompressedTextureFactory::textureSize() const } QT_END_NAMESPACE + +#include "moc_qsgcompressedtexture_p.cpp" |