Skip to content

ComputeCommand: call markDirty(ComputeDirty) when enabled changes

Paul Lemire requested to merge lemirep/qt3d:kde_patch_2 into kde/5.15

When using Manual run mode on a QComputeCommand, we rely on the enabled property changing to enable/disable the backend ComputeCommand for a given set of frames.

Since we weren't setting any dirty flag when the enabled property changed, Qt 3D was not rebuilding the list of active compute commands but rather using the one stored in its cache. This resulted in the ComputeCommand, now disabled, to still be called for execution until something else triggered a command rebuild.

The renderer calls ComputeDirty after it has executed a compute call. This explains why eventually we only had 2 calls (and not a perpetual loop) when calling trigger(1). One was the valid call, followed by the invalid one (and then the command list got rebuilt because of the ComputeDirty flag set by the renderer).

Task-number: QTBUG-86493 Change-Id: I7b31606a03609dc13294256b1dac89ee86730ba1 Reviewed-by: Sean Harmer sean.harmer@kdab.com (cherry picked from commit 3d4ac623) Reviewed-by: Qt Cherry-pick Bot cherrypick_bot@qt-project.org

Merge request reports