| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Useful for tracking amount of work done
Change-Id: I1d6e0394c35fffc4b33991373e4d16e4651987c7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I999dfbb5c139ff8af2b1de9255f76ac132ae2dc0
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
- Moved most of the code QSystemInformationService (private class
for now)
- Tracing can be enabled by setting QT3D_TRACE_ENABLED or
calling QSystemInformationService::setTraceEnabled(bool)
- Introduced QTaskLogger class to easy logging (RAII)
Change-Id: I2a3e08e4371fcee3e9ef3cf575725f13f57d1a94
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Was private in 5.14, should remain so in 5.15
Change-Id: I74231d349e60f498d8ffb4ff39cc1e95fa3f0567
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
84766ed9098f10efc53e4e43a75eef38fce7fbf6
Change-Id: I12341ec1b7bc68a7586c6671aa7b8f21caed17e0
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on macOS, blocking the main thread waiting for current frame to finish
can lead to events flooding the event queue. In particular, moving the
mouse over the window causes the QBasicTimer used by the uniform
timer that drives (qtquick) animations to no longer fire.
Use tryAcquire to get the resources, waiting a short while to avoid
busy main thread.
Task-number: QTBUG-79379
Change-Id: I930aa8ad7d5a15600d7ac7af93e6e72321457089
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I347f6df41c0a4f2295831e78248669b4a2d6b5ef
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I00c875b48d838170fddf0b92f0ac5592828c6f0f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce mechanism to notify backend nodes of changes in relationship
between nodes. If a component is added or removed from an entity,
or if a node is added or removed from a property of another node, then
just rely on the node being marked as dirty when syncing takes place.
For nodes that do not support syncing, messages are delivered as before
but allocated on the stack rather than the heap.
Change-Id: I06affac77e42a9998d9c7f44e231c7724c52b320
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
Useful later to sync backend changes back to the frontend.
Change-Id: I874d140fc97462b8e186b66c882647db26d5678e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NodePostConstructorInit::processNodes and QAspectManager::processFrame
are both triggered by the event loop which means the frame can happen
before the processNodes call. We want to ensure processNodes is called
first so those pending nodes can be created during the processFrame call
otherwise they will get deferred until the next frame.
Created a test to show this and removed the now unnecessary double calls
to processEvents in several other tests.
Change-Id: I7a3f7b34be2858b4acdb9275804b458f9366ec67
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
| |
- Stop using messages
- Remove QSceneObserverInterface
- Ensure backend node creation/destruction is done at the right time
Change-Id: I470825af344ab65bf05e93fc149b61d1b9eefc96
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If the node type supports syncing, use that rather than the creation
message. The message is still needed since that is passed to the
instantiation functor (none of qt3d's classes appear to use anything
but the node id, but can't be sure no other classes do, and can't add
other virtual method without breaking BC).
Change-Id: Id99f448070b8722a7809b968798772c9eb3c8397
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since aspect manager is now on main thread, we can directly update
backend nodes safely. Track nodes which have changed properties and
notify the backend nodes as part of the frame loop.
This avoid allocating and delivering many change messages.
To follow:
- implement on all nodes
- look at backend to frontend syncing
- figure out what to do with non property messages (components
added/removed, commands, ...)
Change-Id: Ia0c442b0528e728c4324d168200bae021bc29266
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
Can be either Automatic (Qt3D is in charge or driving it) or manual
where the user has to call QAspectManager::processFrame() manually.
Change-Id: I3e41d24aea0ddc5cce61328d9731b23f91b54215
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now makes the Qt3D simulation loop run in the Main Thread.
In theory having the Aspect Thread allowed Qt3D to continue rendering
even if the main thread got locked. In practice however this leads to
a large amount of complexities in the Qt3D implementations and provides
little value as in most cases blocking the main thread would block animations
driven by frontend nodes.
Removing the Aspect Thread will allow to remove the backend tree copies each
aspect had to make which will allow to reduce memory. In addition, getting direct
access to frontend nodes, will now be possible without introducing races which
should allow to make more optimizations and reduce latencies on some operations.
Change-Id: I80e4cd6427de06ddedfa1bb50d40710b91867b24
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After QAspectThread starts, it gets in a busy loop until
QAspectManager::enterSimulationLoop is called.
Make the aspect thread's main loop block on QEventLoop::processEvents
until it's told to start the simulation loop.
Task-number: QTBUG-67823
Change-Id: I3daac20b65227787c42907d53c11609e1a87ea85
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Qt 5.11, QDoc uses Clang to parse C++ documentation. Clang
requires a module header, as well as proper include paths, to
build a precompiled header and process the sources.
To do this, add a custom module header that pulls in all Qt 3D modules
- this way, we can continue using a single documentation project to
covers all of Qt 3D.
Fix all documentation warnings are caused by missing namespaces, QML
module/type names and typos, as well as a number of linking problems
and other minor issues.
After this change, the remaining documentation issues consist of
'No documentation for ...' warnings.
Task-number: QTBUG-67790
Change-Id: I38b91163c475a00cc1893e793240470c5409eb57
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes multiple QDoc warnings for Qt 3D Core that are
related to how Clang parses the source code and the \fn QDoc
commands.
We still have a number of 'No documentation for ...' warnings left -
those are not addressed in this change.
Change-Id: Ia6394f453d7bd959bc4d4cc9347ac0039b80f661
Reviewed-by: Martin Smith <martin.smith@qt.io>
|
|
|
|
|
|
| |
Change-Id: Id3bb7bb657f3d48c6c4cd3d5e86c43ad64dca791
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Reordering the header includes to comply with Qt coding conventions
Task-number: QTBUG-56185
Change-Id: I3943678c183c4ef46d403e0fff878c3cad964dfa
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Happened when trying to shutdown immediately after creation by not giving a
chance to properly complete initialization. Added a semaphore to force
initialization to be completed prior to doing anything else.
Task-number: QTBUG-56573
Change-Id: Ia1ecbf0bb8e156e6dc0e8667ee031baf31e0ecc6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Ie2abab5d1116b57a0296ac52cc8a311e31ce2ef7
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...by having the Scene3D item exit the simulation loop before asking
the renderer to shutdown. This is necessary because if we let the
simulation loop keep running then the render aspect keeps creating and
executing jobs as we pull the rug out form under it by shutting down
the renderer. This exhibited quite regularly as a crash caused by a
race in the Shader::cleanup() function which tried to access the
GraphicsContext that was destroyed by the renderer shutdown.
This approach sequences things very similarly to the pure Qt 3D shutdown
method. The main difference is that we explicitly stop the simulation
loop whereas in the pure Qt 3D case, that is done for us by the
QAspectEngine::setRootEntity(null) call. This is still done in the
QAspectEngine dtor but by that time, the simulation loop is already
stopped. The exit simulation logic has been adapted to handle this
case.
Task-number: QTBUG-51035
Task-number: QTBUG-42353
Change-Id: I08d16e301eab421fa6eb99e558f38e832534c151
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QAspectEngine now flushes any pending changes batched up before
telling the aspect manager to exit the simulation loop.
Furthermore, the call to QAspectManager::exitSimulationLoop() now
waits until the aspect thread has completely finished the simulation
loop and has called onEngineShutdown() on each of the aspects. This is
important to ensure that the main thread doesn't call
QAspectEngine::shutdown() too early as this deletes the change queue
which contains the final changes sent from the main thread during
shutdown.
For some reason the backend is unable to find which
QBackendNodeMapper corresponds to each destruction change. Will
investigate that next.
Task-number: QTBUG-42353
Change-Id: Iec4d6a57a163effefd5b60249bf97c76ed187413
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows the aspect manager to call QAbstractAspect::onUnregistered()
in a symmetric way to onRegistered() before we exit the aspect manager's
main loop.
In particular, this allows the render aspect a chance to cleanly
shutdown the renderer submission thread.
Task-number: QTBUG-51035
Change-Id: I38a2f3d4fa016f451e53f0ceac02c387911aa6c4
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
| |
Stop waiting for next frame advance if we are about to shut down.
Change-Id: I334c5afa69eb262d6e4e7139acc826fbd7aa9263
Task-number: QTBUG-50044
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I96364eb258f8f2f73456ddec4e9e65511b50c18e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-52736
Change-Id: I58f9cbcdf018e7b672d33dd865067485412b79fe
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Replaced QList with QVector
Change-Id: I9295a4bec2dc7d9ab6893154519dcd0425d86c6e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
| |
Task-number: QTBUG-51835
Change-Id: I4520bf38acc9b8a990d3f3bce3d96f2014c5637b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
|
|
|
|
|
| |
Change-Id: If1380c413cf04db3d8b95262aa1d81b0776032a9
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Gives internal aspects a chance to unqueue any queued work that
could potentially deadlock during trying to exit the inner loop
in QAspectManager::exec().
Task-number: QTBUG-51421
Change-Id: I8f9892db2d8648c39092720f1a787c4db412d30d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This was actually called both when unsetting a root entity and during
final shutdown. Remove it and move work it was doing to the overrides
of onUnregistered() for now. Will need another look when we finish this
refactoring to also include backend node destruction.
Task-number: QTBUG-51421
Change-Id: I2f96ede4006fea3a4766d15cf6e162452dd58321
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
| |
No longer needed, as we can do all needed in onEngineStartup().
Task-number: QTBUG-51421
Change-Id: I64487b9f118aaad073e4e060bc5fd36f3a6dd16a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
* Add some docs
* Comment out stuff we don't need right now
* Make startup/shutdown work with a simple test case and simple aspect
Task-number: QTBUG-51421
Change-Id: I749770e8103771b39645d1fcf7a5c277755c06e6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
onEngineStartup/onEngineShutdown is more descriptive of when these
functions get called in the overall flow of operation.
Task-number: QTBUG-51421
Change-Id: I09dd7dfa2e3ce961a67de7fd150bf027226849ae
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
|
| |
This is the first step in reworking the startup/shutdown code to
simplify it and provide a more symmetric API.
Task-number: QTBUG-51421
Change-Id: Ib06be1e7adb3f3d52b31d5e0a1ec598f39543f9a
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
... by replacing them with C++11 range-for loops.
Saves 1.1KiB (0.5%) in text size on optimized GCC 5.3
Linux AMD64 builds.
Change-Id: I9f197dc25ef1b3f20d3dc4734da1167a0192022b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Ie80a346dcd8fa4e53d528ea4de25d2bd42043cd8
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
| |
Update old header.LGPL3 to header.LGPL
Change-Id: I8eac0cd6bbc276a56df487249cc459c0d4fab165
Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Getting rid of set data and the refactoring on setting the surface implies
that:
- Given the FrameGraph configuration, there may be several RenderViews
each having a different RenderSurfaceSelector/Window
- This means that the Renderer/QRenderAspect can't know about the surface
before reading the scene
- This means that the Renderer may be dealing with more than 1 window
- This means that initialization, render and shutdown procedures will have to
be updated accordingly
Therefore the Renderer was refactored to:
- Be initialized without knowing about a surface
- For each RenderView, check the surface and if different from the previous
one:
* Make the context current with it
* Create the appropriate glHelpers (as Surfaces may have != formats)
TO DO:
- Fix picking
- Fix windows exposition
- Fix shutdown / detection of all windows beging closed
Change-Id: I49d070b05f46be4b26cfb57e494feba145d1da9c
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When QAspectManager::quit() is called, the exec() loop finishes. Then
QAspectThread calls shutdown() and deletes the QAspectManager instance.
However, in certain cases, the QAspectManager object can be deleted before
QAspectThread::quit() has a chance to finish running, causing a crash when
it tries to acquire the m_waitForEndOfExec semaphore.
Make exec() wait for quit() to prevent this.
Change-Id: I579e3e6b5684984ec32497852d94cc050cccbef5
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I98454ea6ed5bd5bbfed550317fedbf8ee47a1f8f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: Iabc9afe59052e69725a82fb6bdb42f0dfae7fc91
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I9da605c77c5489b9bef4f07079e05f8babb9559f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I46fb61368e1637c5e06d3b1bd8de38982aa99c7b
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Update other aspects, tests and examples accordingly.
Change-Id: Ib1bcf0bdf4f5aec4422dc0c80bfc32b27fb1a317
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gives aspects a chance to do work just prior to and just after the
main loop in QAspectManager.
Specifically the shutdown functionality is required for the upcoming
logic aspect to ensure a clean shutdown.
Added the onStartup() method for symmetry.
Change-Id: If5f32d62629543cdceb2e6e3ff6383747acb7c99
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|