Details
-
Task
-
Resolution: Done
-
P2: Important
-
6.0.0
-
Qt Quick 3D - 49/50, Qt Quick 3D - 51/52
Description
The way we store and reference textures needs to change due to QTBUG-88241/ QTBUG-88423 This is not a reasonable change for Qt 6.0 anymore because it will involve a significant rewriting of code in QSGBufferManager and elsewhere.
The goal is to implement something that matches the patterns used for meshes, i.e. where the prepareImage step retrieves some (cached) object from the pre-window/per-thread BufferManager, encapsulating the (per-window/per-thread) native graphics resources. (a'la QSSGRenderMesh)
Relying on the backend node (QSSGRenderImage) must go away, similarly to how a QSSGRenderModel is not used at all once prepareModelForRender has done its job.
The code base inherited from Qt 3D Studio is sadly not quite maintainable in practice. For example, the way QSSGBufferManager is architected with the unfortunate mess of overloads for loadRenderImage, with functions calling each other back and forth for no real reason, often without clear input/output argument separation, defying many API design principles, is not sustainable.
As of now we know of the following problems at minimum:
- Texture in combination with Default/PrincipledMaterial
- Texture.source
- Does not use the correct texture when there is more than one View3D in different windows (and so threads) with the same importScene
- Texture.sourceItem
- Does not use the correct texture even when there is just one View3D with an importScene.
- Crashes when there is more than one View3D in different windows (and so threads) with the same importScene. [this case cannot work when the threaded render loop is used, but it should still fail gracefully somehow]
- Texture.textureData
- To be tested in combination with importScene. Expectation is that it behaves similarly to Texture.source.
- Texture.source
- Texture in combination with CustomMaterial or Effect:
- To be tested in combination with importScene. The Texture.source case may work for Textures in a TextureInput in a custom property, because what happens under the hood there is closer to what we'd like to see for all images (i.e. it calls directly into the per-window/per-thread BufferManager, so it gets appropriate native resources for the current window/thread)
- Model
- Model.source
- Ok
- Model.geometry
- To be tested in combination with importScene
- Model.source
Attachments
Issue Links
- is required for
-
QTBUG-88423 Extend test set for shared scenes (View3D.importScene)
- Reported
- replaces
-
QTBUG-88241 Issues with sharing Materials between windows
- Closed
For Gerrit Dashboard: QTBUG-88420 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
326301,2 | Simplify loadRenderImage overloads, textureData and QSGTexture | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326308,2 | Remove another loadRenderImage overload | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326309,4 | Remove all overloading for loadRenderImage | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326320,3 | Remove Qt 3D Studio specific legacy code | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326326,2 | Rename one remaining loadRenderImageSomething | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326333,2 | Remove unused values in QSSGRenderImageTextureFlags | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326337,2 | Fix up some texture-related legacy todo notes | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326340,2 | Simplify QSSGRenderImageTextureData | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326351,2 | Remove a completely unused QSSGRenderImage flag value | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326352,2 | Set things straight for m_rotation in QSSGRenderImage | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326353,2 | Remove an unused ItemSizeDirty flag in QSSGRenderImage | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326366,2 | Document that Texture.sourceItem may not work with multiple windows | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326368,11 | Do not store the rhi texture in QSSGRenderImage | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326487,2 | Simplify loadRenderImage overloads, textureData and QSGTexture | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326488,2 | Remove another loadRenderImage overload | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326489,3 | Remove all overloading for loadRenderImage | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326490,2 | Rename one remaining loadRenderImageSomething | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326491,2 | Remove unused values in QSSGRenderImageTextureFlags | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326504,2 | Simplify QSSGRenderImageTextureData | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326505,2 | Fix up some texture-related legacy todo notes | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326526,2 | Set things straight for m_rotation in QSSGRenderImage | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326527,4 | Remove an unused ItemSizeDirty flag in QSSGRenderImage | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326528,2 | Remove a completely unused QSSGRenderImage flag value | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326529,2 | Document that Texture.sourceItem may not work with multiple windows | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326532,3 | Remove Qt 3D Studio specific legacy code | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326864,5 | Autotest some multiwindow and importScene things | dev | qt/qtquick3d | Status: MERGED | +2 | 0 |
326951,2 | Do not store the rhi texture in QSSGRenderImage | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |
326954,2 | Autotest some multiwindow and importScene things | 6.0 | qt/qtquick3d | Status: MERGED | +2 | 0 |