diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-12 18:00:45 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-15 15:33:39 +0200 |
commit | 6a8eb26bbafa32ef6561792c52ec72f80007377a (patch) | |
tree | 7623d8511a1ecd9654c8ae2dd41672bc11e8f2e9 /src/gui/rhi/qrhi.cpp | |
parent | a0bfa4e1f8e223927cbb285bb17d1a00a5c2d4b6 (diff) |
rhi: Add a feature flag for readback format support
Indicate that doing a QRhiResourceUpdateBatch::readBackTexture() for
texture formats other than RGBA/BGRA is not necessarily supported at
run time.
Change-Id: Ie9ca9546a3af9bff142b875f1ecf26bf26bcc442
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhi.cpp')
-rw-r--r-- | src/gui/rhi/qrhi.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhi.cpp b/src/gui/rhi/qrhi.cpp index f7ecacf456..6e7c975753 100644 --- a/src/gui/rhi/qrhi.cpp +++ b/src/gui/rhi/qrhi.cpp @@ -596,6 +596,18 @@ Q_LOGGING_CATEGORY(QRHI_LOG_INFO, "qt.rhi.general") type attributes will be broken. In practice this feature will be unsupported with OpenGL ES 2.0 and OpenGL 2.x, while it will likely be supported everywhere else. + + \value ScreenSpaceDerivatives Indicates that functions such as dFdx(), + 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. */ /*! |