diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-01-12 17:33:31 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-01-13 16:21:26 +0100 |
commit | 7e2cef0f15b133c07bd11aa5e5065b0b9959fb0d (patch) | |
tree | 50378e10ac4affce1768d40d3fabdf960d9497dc /src/gui/rhi/qshader_p_p.h | |
parent | 9a0ab41f28042c7f27208337e419435d16f00006 (diff) |
Move away from CBOR in QShaderDescription serialization
...but keep support for deserializing for all older versions in order to play
nice with existing .qsb files.
The usage of binary JSON and then CBOR is a historical artifact: relying
on the QJsonDocument (which we generate for purposes unrelated to binary
serialization) was a convenient shortcut. However, writing to and
reading from a QDataStream instead (which QShader already does) is trivial.
In order not to be limited by potential CBOR requirements in the future,
take it all into our own hands.
Extend the qshader autotest accordingly.
Task-number: QTBUG-81298
Change-Id: If0047b659bd6601ca47b5bbbce1b719630cde01e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/rhi/qshader_p_p.h')
-rw-r--r-- | src/gui/rhi/qshader_p_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/rhi/qshader_p_p.h b/src/gui/rhi/qshader_p_p.h index 8c89f2b45f..66ef18f391 100644 --- a/src/gui/rhi/qshader_p_p.h +++ b/src/gui/rhi/qshader_p_p.h @@ -57,7 +57,8 @@ QT_BEGIN_NAMESPACE struct Q_GUI_EXPORT QShaderPrivate { - static const int QSB_VERSION = 3; + static const int QSB_VERSION = 4; + static const int QSB_VERSION_WITH_CBOR = 3; static const int QSB_VERSION_WITH_BINARY_JSON = 2; static const int QSB_VERSION_WITHOUT_BINDINGS = 1; |