Rerun the content layer filter when a node's layers change
QQuick3DNode::setLayers() stored the new tag on the render node and
marked it TagDirty, but nothing consumed that flag: it is outside the
dirty masks the global state update looks at, and the per-layer node
lists were only rebuilt when the tree changed, a node's active state
changed or the camera's layer mask changed. A node moved onto or off
the camera's layers at runtime therefore kept its old visibility until
something unrelated dirtied the tree.
Report the tag change from updateGlobalNodeState() through a new
TagChanged result bit, clear the flag there as that's all that is
needed.
Note that this change also incorporate a fix to how the
GlobalStateResult is composed making it a bit more robust.
Pick-to: 6.12 6.12.0
Task-number: QTBUG-150709
Change-Id: Ib9e49936ca447caf41c1ee3e220b2a2256b3ec7a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>