The QShader serialization format is based on QDataStream, while the contained QShaderDescription is stored as CBOR (in later 5.15; 5.14 and earlier 5.15 used to use binary JSON instead). The end result is qCompressed.
Before 6.0 is out, the format needs to be finalized.
- Should use a plain and simple QDataStream approach for QShaderDescription as well. CBOR is an overkill. (historically, binary JSON & CBOR are used because in the initial prototype back from 2017 it was easier to piggyback the serialization on the JSON document (which in the first place exists for reasons other than binary serialization); there is no reason to keep this serialization approach for Qt 6: reading/writing to a QDataStream instead is straightforward)
- Support for the two older serialization versions (1. with binary JSON 2. without the native resource binding map) can be removed in 6.0. (not in 5.x).
- Perhaps version 3 too.
- to roll this out, we can introduce qsb format version 4 in 5.15, while keeping support for all other formats as well. All .qsb files in qtbase, qtdeclarative, qtquickcontrols2, etc. should then be rebuilt. Qt 6 can then safely remove support for versions < 4.
The dev (6.0) work is handled in
|For Gerrit Dashboard: QTBUG-81298|
|286329,5||Move away from CBOR in QShaderDescription serialization||5.15||qt/qtbase||Status: MERGED||+2||0|