| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Sometimes there seem to be null Geometry pointers that are somehow
related to quickly swapping QGeometry. This can be worked around by
skipping those null pointers.
Change-Id: Id2ffbd0eb08f205a7739825932b6d3f0afeab4af
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FBO need to be rebuild when one of the attachments directly or indirectly
changes. By direct change we mean one of the FBO attachment texture being
resized or the list of attachments changing. By indirect we mean when
texture resource is recreated internally by the engine.
Failure to handle this cases resulted in FBO referencing invalid
attachments.
Change-Id: I8dd4c08e464eed7fb0eeefd61a4158304ab4245f
Task-number: QTBUG-64757
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
| |
It appears we never destroyed FBOs which lead to bugs
when destroying and recreating a RenderTarget
Change-Id: I99b3df95b821670aa3bbd63209ff9bcc21afbf79
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
| |
Change-Id: Ibd460eceafdd29d7d88ac2418496dc7002de1095
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EntityRenderCommandData would only be released in a separate job than the one
it was allocated in. However this would only happen if there was at least a
single renderable objects after filtering. In case there was no renderable
following filtering, the EntityRenderCommandData was leaked.
To fix the issue and make it less error prone, we now switch to using shared
pointers to avoid having to handle all possible leak cases with raw pointers.
Change-Id: I842d50d2b35ebba8303f6d6c4e72a2427ce31da3
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
| |
Change-Id: I368935178c285b9beb609083b93ae4621c70e28e
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|\
| |
| |
| | |
Change-Id: Ibf5f508eec94be4bae2df3ce2e1511de696dcd72
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using OnDemand rendering, Scene3D would lock if nothing in
the scene were to change. By being blocked, it would also not
process jobs for other aspects (input, logics). That would prevent
things like a CameraController from running, which in turn would
make it impossible to move the camera and trigger a change in the
scene to request rendering.
Additionally, Scene3D would ignore whether the Qt3D renderer actually
needed rendering or not as it was watching on its own the changeArbiter
for changes to decide whether rendering was required or not. This would
ignore the case where Qt3D needs multiple frames to render a correct frame
(e.g loading buffers, shaders at frame n, rebuilding commands at frame n+1)
Scene3D now asks the Qt3D renderer by calling the shouldRender() function
to decide whether rendering is needed or not, in addition to watching the
changeArbiter.
Regardless of whether rendering is needed, it now let each aspect process
jobs. This ensures things like FrameAction/Input are processed.
Then, Scene3D decides whether full rendering is required or whether
it only has to be called to allow the Qt3D simulation loop to proceed for the
next frame. If the latter, it does it so as not to have QtQuick trigger a
redraw.
Change-Id: I870f773c224286d6b7ec0f6045319e51e09cbf8e
Task-number: QTBUG-80521
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously were checking that the attribute was actually but due to
refactoring the shader is not yet examined at this point.
With this change, we always get the estimated number of points from
the attributes. Potentially it means we're getting it from an attribute
that is not being used but the user should then set the correct number
on the geometry renderer anyway.
Task-number: QTBUG-80697
Change-Id: Ie34131fe3ff41b34609a2f2eb95c4ff678424036
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoids having to check for each uniform (for each frame, each geometry)
whether it is a standard uniform or a user defined one.
Change-Id: I76cff7869aacc1343a9acf991f8035b8118581ed
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| | |
Was needlessly creating a second glHelper instance
Change-Id: Id2e7f4a7be77b52cef628ba84ae4a1ff4a3d3b2e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Avoids repeating that process over and over again in
the submission phase.
Change-Id: Ie2fa36842cd7280f7c966381238e90dd2dbaa821
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Try to give at least 100 entities per worker.
Ideally we'd find a way to only add the required number
of jobs but ThreadPooler doesn't easily allow that.
Change-Id: Ieaf21b66eefd6c3e3b85b949917ea93b73834838
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the post command update synchronization job a lot
faster.
Change-Id: I845c39cd4e2c0e56e8eefa05bbdd20d0bc3d2454
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|/
|
|
|
| |
Change-Id: Ia675f81a3e58e6c4d6fd80be55ea7001aa5e1d10
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Surprisingly it's hard to notice its effect in the speed of execution,
frame preparation looks to be more or less the same with the profiler.
However with vtune, the profiling traces show a huge difference with
QHash, mainly in time spent allocating memory. It shows a noticeable
reduction in CPU usage.
On bigscene-cpp with 600 entities
QHash -> On a 158s run, CPU time is 112s (70%)
free accounts for 26s (23%), malloc 24s (21%)
QVector -> On a 190s run, CPU time is 110s (58%)
free accounts for 5s (4.5%), malloc 4.7s (4.2%)
Change-Id: I880d44b1acf7f051e479ed356864c3caf407f23f
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
| |
Which is only very rarely required by user applications.
Avoid useless memory allocations every frame
Change-Id: I69ea73ebfffdbe928f99333b4d1dd90cf4ada430
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
Can only make the overall destruction of the object longer
Change-Id: Ic5033287fb770ed4a01ffd6b315310b74e8a3797
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
| |
We produce A LOT of these at every frame, reduces allocations by ~ 20%
(also less CPU load at creating and concatenating temp strings).
Change-Id: I342c16ed3b4b8d9e1c66ddf37cb9f60496eb9de5
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Iac18b5fddec79295dd9e4249fd16eb2f121fe771
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Now setting to Loading when the functor change is synced to the backend.
Avoid creating a new functor when downloads have completed, just use
the same one and mark the node as dirty.
Avoid recreating the functor when the format change comes from the
backend (which caused the image to be loaded again).
Change-Id: Ifcbbf54db56b57a58b0b5d1ce5f1475b6587f697
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Ib290491476b083e6aa4cff5c112a802c4e198987
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
All RV end up using exactly the same vector before filtering it down
on per RV specifics. No point in compute RV times the same thing.
Change-Id: Ia674095627771c8e9ada090fa47623cbbbd8a3f8
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Returning early should only be done when not dealing with a shared texture id
as all shared texture id will satisfy the early return condition initially.
This must be the result of a bad manual merge.
Change-Id: I475a608a942a8c178b10c2a49564aee3f464c379
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
We were using worldBoundingVolume->center() but this has been changed
recently and a null bounding volume now cannot be transformed.
Instead just use the worldMatrix transform to compute the light position.
Change-Id: I55d5600cdf7c58a65c27bbe59c1a620c58dbb3a3
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
Also fix warnings in SubmissionContext
Change-Id: I7c8fe353547c6819d7a0a64f4bf49ea0b005f7dc
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I95690444badaf573b9e2775b50c61113de8d1c77
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
| |
Change-Id: I773955df33f0b4dcdaa0953633761ff82f3d0da4
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
| |
Change-Id: I8d5bc69cb75d73e628f08d70b2e40d665c39802b
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In most cases, we can generate the RenderCommands once and reuse them in
subsequent frames only updating the uniforms. We still have to copy the
RenderCommands as the renderer renders while we start preparing the next frame.
This is still faster than regenerating them entirely.
Regenerating the entire commands will happen only when FrameGraph or Scene
structure changes. That should rarely be happening on a per frame basis.
Next step could be to look at how to only update commands for Entity with Parameters
that have changed.
Change-Id: I202870850a46fcd3946f81bffddb7027d192f374
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: I00c875b48d838170fddf0b92f0ac5592828c6f0f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|\
| |
| |
| | |
Change-Id: I39797b5e48cb627638443e20eed207af6ae86c9c
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Some ES2/3 drivers dont support structure arrays
This patch uploads also light_0/7 uniforms in addition to light[0]/[7]
so the shader can be unrolled for those devices that need it
Change-Id: I9356e7624c1c0593e7803914f0ecf2d84de48681
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Only try to cleanup the resources if we know we are called from the right
thread.
releaseGraphicsResources can be called from 2 places:
- Scene3DCleaner when using Scene3D (when closing the window)
- AspectThread when the RenderAspect gets unregistered
In configurations where the context lives in the main thread (Scene3D +
single threaded render loop / ANGLE), the RenderAspect gets unregistered
before the Scene3DCleaner has had time to call releaseGraphicsResources.
This means that we won't release the resources ourselved and that the
driver will have to do that for us.
This has been fixed properly in 5.14 with the AspectThread removal.
Task-number: QTBUG-60971
Change-Id: I49c1c2f74ad09e7162b988f87bac65863f8490d8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|\|
| |
| |
| | |
Change-Id: I44133fbc9b93e96918463b0b0891ee5ab7db9f2c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the Qt3D window is on a specific screen, then it needs to ensure
that any supporting QOpenGLContexts and QOffscreenSurfaces are set to
be using that same screen or it will fail to render the content.
Change-Id: Ief4f3e88bf6f71862bc5dace0cb0bddcdf3a98b5
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ib7b491c638508cfcdfbd523fd4e6a3d757c2c832
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
| |
| |
| |
| |
| |
| |
| | |
Could result in trying to send updates to nodes which have been destroyed.
Change-Id: I3709277e5005f25ec8cb9efe0a2152f879bea89f
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove call to toLatin1(), fixing:
enderers/opengl/jobs/renderviewjobutils.cpp: In member function 'void Qt3DRender::Render::UniformBlockValueBuilder::buildActiveUniformNameValueMapHelper(Qt3DRender::Render::ShaderData*, const QString&, const QString&, const QVariant&)':
renderers/opengl/jobs/renderviewjobutils.cpp:516:126: warning: 'QString::QString(const QByteArray&)' is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations]
Change-Id: I71afa2b29e7af6cb3acad008822b369acc66bed3
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ia56ba6176c86e34904611ae57e682ac9d52c79f7
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ib7b491c638508cfcdfbd523fd4e6a3d757c2c832
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| | |
As the cache depends on both Material/FrameGraph and Shaders.
Change-Id: I87c8ab20f37f111aa24c83401ee689f9e96681eb
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| | |
Also a bit of cleanup
Change-Id: I317fa2dbaa62a55fe371e982ed23976e65696d79
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This has always been disabled, no point in keeping something we don't use.
Can always be reverted later if we find it's actually required.
Change-Id: Icc488b986cee90911a8b46cc88152938e786c1da
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: I9356186ca27518c32ae189d7e432969b767612e9
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove include statements for classes that are no longer used. Makes
it easier to find remaining use cases that need addressed before
complete removal in Qt 6.
Change-Id: I60529ba1929ad64b162d3847d5df47cde2a60dad
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: I3829f621958d98b50563a2a8ed782aec1a7ceb65
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| | |
Will be retraversed only when something in the FrameGraph has changed
Change-Id: Ibb43f8f2928b10a584f468fb13f1d4773c7fcebb
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some values where overridden in Renderer::prepareSubmission so no point
in spending time setting them in the first place
Change-Id: Iceea0cbe044b883d0797aebd7487f8f6b29ac542
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
| |
| |
| |
| |
| | |
Change-Id: I422cf0fb0991319b0f54e5a26b9b3694cb093454
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|