summaryrefslogtreecommitdiffstats
path: root/examples/qt3d/planets-qml
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2015-11-23 16:39:46 +0000
committerSean Harmer <sean.harmer@kdab.com>2015-11-23 18:07:02 +0000
commit02f7b6f2f7033caca333275c2f7f1fae999f6e6a (patch)
treea291deb2a1726a2fd7d12d7f90edcb9446f16035 /examples/qt3d/planets-qml
parent33c4f4d70fea8514ee37103f0b845b757c6112b2 (diff)
Fix data race with dirty flags set from property change events
Ensure that dirty flags (typically on buffers and textures) are set as the very first thing we do in a frame by processing changes sent from the frontend to the backend before scheduling any jobs. Without this change, the dirty flag was sometimes being set whilst the renderer submission thread was busy processing the RenderViews and RenderCommands. This could result in the submission thread seeing the dirty flag on a buffer and performing a glBufferData() call before the jobs to populate the new data had been executed and then clearing the dirty flag. Depending upon the exact timings, updates appeared to lag a change behind or just get missed entirely. Later, when we have aspects that perform changes that need to be sent to the frontend, it might be a good idea to add a set of flags to the QChangeArbiter->syncChanges() call that allows to process events: * From frontend to backend only (at start of frame) * From backend to frontend only (at end of frame or other well defined times) * From backend to backend (to allow aspects to sync with each other) Task-Id: QTBUG-49602 Task-Id: QTBUG-49599 Change-Id: I5b2d4d6d81b119c8ec921ba4f8b90e3703c251da Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'examples/qt3d/planets-qml')
0 files changed, 0 insertions, 0 deletions