diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-02-02 12:41:45 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-02-03 10:40:47 +0100 |
commit | d136299bb83f5343a62f9e02693f6737981edf62 (patch) | |
tree | c7c69e3c2e364094a5b30065dc9dc1acafff1727 /src/gui/rhi/qrhi.cpp | |
parent | eadbf2dd0bbddd2cf891851e8a39289857a4ef2d (diff) |
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 <andy.nichols@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi.cpp')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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 |