From d136299bb83f5343a62f9e02693f6737981edf62 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 2 Feb 2021 12:41:45 +0100 Subject: rhi: gl: Attempt reading back floating point formats ...in the hope that they may work. If not, that's it, but at least we tried. Task-number: QTBUG-76970 Change-Id: I134c5cc4cfb5ad1e6f9edbfcf506df20022e127a Reviewed-by: Andy Nichols --- src/gui/rhi/qrhi.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/gui/rhi/qrhi.cpp') diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index 4b07f4c346..aface30606 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -618,13 +618,16 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general") dFdy(), and fwidth() are supported in shaders. \value ReadBackAnyTextureFormat Indicates that reading back texture - contents can be expected to work for any QRhiTexture::Format. When reported - as false, which will typically happen with OpenGL, only the formats - QRhiTexture::RGBA8 and QRhiTexture::BGRA8 are guaranteed to be supported - for readbacks. In addition, with OpenGL, but not OpenGL ES, reading back - the 1 byte per component formats QRhiTexture::R8 and - QRhiTexture::RED_OR_ALPHA8 are supported as well. Backends other than - OpenGL can be expected to return true for this feature. + contents can be expected to work for any QRhiTexture::Format. Backends + other than OpenGL can be expected to return true for this feature. When + reported as false, which will typically happen with OpenGL, only the + formats QRhiTexture::RGBA8 and QRhiTexture::BGRA8 are guaranteed to be + supported for readbacks. In addition, with OpenGL, but not OpenGL ES, + reading back the 1 byte per component formats QRhiTexture::R8 and + QRhiTexture::RED_OR_ALPHA8 are supported as well. Reading back floating + point formats QRhiTexture::RGBA16F and RGBA32F may work too with OpenGL, as + long as the implementation provides support for these, but QRhi can give no + guarantees, as indicated by this flag. \value PipelineCacheDataLoadSave Indicates that the pipelineCacheData() and setPipelineCacheData() functions are functional. When not supported, the -- cgit v1.2.3