| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Change order of local variables affecting the destructions order
and making sure window outlives the surface selector
Change-Id: Ia04f110656f4cc563643fb056ae491ffadf3a8b4
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
In some cases, the list of pickable objects may contain entities that don’t have an object picker (or not parent has).
Now filter the pick results to only keep entities which either have an object picker or are children of an entity that does.
Added unit test which now passes
Change-Id: I930c3d60cf2d19e845fe6c0de904c53b93ebe8be
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
| |
We always use the same policy anyway.
Change-Id: I3349b8c19ce0e6239b140dfac7ba66f8dda1b9be
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Instead, direclty use the Allocator to acquire and release handles
without an additional indirection. This removes around 30% of the
overhead in run().
Change-Id: Ic4a9343dd52a900eb1c7eb6b4135bc7670076df1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
| |
It's not used anywhere
Change-Id: Id65ec9fc8e38697c0dbd23fe4f816e1637a22483
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
If one ended up with this helper then the applyUniform would lead to a
divide by zero for any type.
As a side-effect, the support for more matrix types needed to be done
for unit tests to keep passing.
Change-Id: I66c8a2eb7e5617f2fed96c689cb4ebc024ef9853
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unit tests for VSyncFrameAdvanceService rely on somewhat strict timing
and may fail under certain loads.
This patch replaces timers with a semaphore to synchronize between
threads. This also makes the unit test closer to actual Qt3D code, where
there's a semaphore in the renderer to synchronize render view
submissions.
Change-Id: Ie328cdee1b3a0c2ad17f02d4f14e57e218556061
Task-Id: QTBUG-62825
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When rendering with Scene3D it could be that doRender() is called a lot more
times than the speed at which the Qt3D simulation loop is running (this
happens when resizing the window)
This results in vsyncFrameAdvance->proceedToNextFrame() being called while the
simulation isn't in a waiting state (simulation loop not yet blocking on
vsyncFrameAdvance->waitForNextFrame()).
This means that when the simulation loop finally unlocks, it would be able to
make several loops for a given frame. Obviously this is really dangerous as
the simulation loop drives the synching of changes and this could result in
the data being prepared by the render jobs and the actual data in the managers
to be corrupt.
To fix that, vsyncFrameAdvance->waitForNextFrame() now acquires all available
resources + 1 to cope with proceedToNextFrame being called more than once.
Obviously this doesn't happen when Qt3D drives the rendering and the
VSyncFrameAdvanceService was adjusted to have different behaviors depending on
whether we are rendering with Scene3D or not.
Change-Id: I495779571256d132fa7e1b3b31114f737de35a71
Task-number: QTBUG-60613
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
| |
Backend nodes should receive frontend proeperty changes
Change-Id: I19ba70d08de833aab467a51d5b21553f0b602ec6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Static library containing helpers for unit tests to avoid having to
build the same files 200 times.
Change-Id: I89d63abbd7777a96276154298c2748e2d6774514
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lights must be part of entities that are actually included in the
final scene effect layer. So the light world positions have to be
forwarded from the actual scene entities to some "dummy" light entities
that exist just for the final scene effect render step.
Also correct model / modelNormal matrices must be used for global
normal/position calculation in the GBuffer render step.
Task-number: QTBUG-46707
Change-Id: I380d2e2ecb008ab0606dcd36cd5d98dd1ec41ba6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I9add67acbfab26c78c137753bb6b81865bf0abcf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove type punning mechanism that was used to filter previously (could lead
to undefined behavior)
- Properly filter based on shader and material
- Add unit tests
Change-Id: I8d0fd4a49d586e6ec26515e2cafe1ea94d38f8f1
Task-number: QTBUG-60183
Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
This is the result of running the (experimental) clang-tidy check
qt-modernize-qsharedpointer-create
Discarded changes: none.
Change-Id: Ic6368521ebf5841267ffe7917cc652627f7b26a7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Up until now, RenderCapture would read back from the back buffer. In cases
where it's used within a RenderTargetSelector, it should instead read back
from the ColorAttachment0 of the framebuffer.
Later on we might allow to specify the ColorAttachment.
Change-Id: I9ca94333184338b2fdb79c5c2668d5929ac8d405
Task-number: QTBUG-61547
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
RGB32F and RGB16F will not work on some drivers.
Shader variables must be initialized to zero, will flicker if not done.
Task-number: QTBUG-56248
Change-Id: Iead5df1a607db80b733aefa73d7a59c8310a8d81
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Change render-qml-to-texture-qml and video-texture to use TextureMaterial.
This removes the dependency to the render-qml-to-texture manual test from
these tests. This also fixes the controls in the render-qml-to-texture-qml
test, which were 'upside down'.
Change-Id: I248014decd8f9d06b0e0922d035afe8c0b0f78ff
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Add deallocation guard and set parent of the reply.
Task-number: QTBUG-61508
Change-Id: Ia299450d792b2254c2944472382c8241b271ebf6
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I88e254c36e99a83a8e7bbc562b7a729a04ace28a
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the parent for elements created by NodeInstantiator are set to
the instantiator's parent. This doesn't work for nested instantiators,
since at the time the inner instantiator's children are being created
the instantiator itself doesn't yet have a parent node yet.
Update the parent of elements created by the instantiator when the
instantiator's parent changes.
Change-Id: I6f260ad2a8a81af5551799e6c643d8849f46e342
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
| |
...and add an autotest
Change-Id: I5c473f5f5918db9cc108f9966fe549e2cba374de
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
| |
Test QColor and fix various issues and typos.
Change-Id: I559fa9887f65d176bb4b7d678deab0b182d0b3a8
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Trigger also on -1, which is what QAbstractClipAnimator::Infinite
is defined as. Updated tests to reflect this change.
Change-Id: Ib33a5e9b58f48b3810a0238b7682e532e382c050
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
| |
Fix: ASSERT: "qGuiApp" in file kernel\qopenglcontext.cpp, line 1282
Task-number: QTBUG-61112
Change-Id: Id3162565aed5d03294f203f711eb712bbc08c06f
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the main rendering loop, first dirty GL resources are uploaded, then
render views are submitted, and then unused GL resources are released.
Consider the following piece of code:
entity->setParent(nullptr);
entity->setParent(root);
If this is executed inside a single frame, entity's children buffers
will be marked for release when they are removed from the scene, and
marked as dirty when they're added again. In the following frame, the
render thread will upload them at the beginning of the frame, and
incorrectly release them at the end of the frame.
This patch adds a reference count for buffers in BufferManager to
prevent this kind of race. The reference is incremented when a buffer is
added to the scene (in Buffer::initializeFromPeer) and decremented when
it's removed from the scene (in BufferFunctor::destroy).
Task-number: QTBUG-60726
Change-Id: I8eed7b4c2d8262ba846e73bf4299edae7bc16b3e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
|
|
|
|
| |
Change-Id: Ia2c5a7ae98d5a3cbf7c0981caeccaa4245a57707
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two cases need to be handled by setParent:
1) Parent already has a backend node and receives a new child
-> in which case we need to send the creation event to the backend
2) Parent was created in the frontend, but has no backend (delayed
notification sending because a ctor can't call a virtual)
-> in that case, when adding a child and setting its parent we shouldn't be
sending the creation change. We rather let that be handled when the
creation change for the parent is requested
Change-Id: I434c7d4e6af785c0314ac6538dc689992d90ed0c
Task-number: QTBUG-60612
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
|
|\
| |
| |
| | |
refs/staging/5.9.0
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/render/geometry/buffer.cpp
Change-Id: If4d28a1e4c95cbd8e81b1751eed3214952516d8c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We used to load buffer data when creating it. This led to cases where
we would not take into account immediately buffer updates after creation.
This would then results in artifacts that would pop up on screen as actual
buffer data and count would be different
Change-Id: I5a2fad4fb5d7c1e1542cd0bf87ded16a111bc613
Task-number: QTBUG-60429
Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now that the underlying problem from QTBUG-58107 in the macOS QPA is
fixed we can go back to using a fresh window for each test function.
Task-number: QTBUG-58107
Change-Id: If77fa7dbcb5b8b1a7e096e262832297ce871313d
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current model where mouseGrab is connected to picker signal
doesn't work. The pressed event is not sent to scene2d item, because it is
already lost when scene2d gets the grabMouse message where it registers to
the picker events. This breaks the mouse event sequence
(press-move-release) for the quick item.
Instead hook to setScene of the node to message scene2d when the scene gets
initialized and always register to the picker events.
Task-number: QTBUG-58876
Change-Id: Ic9ca4b0899a030336ef20ff2cffbe10b567c36f5
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Id657443693009455c9307b51e862d43f41255f1d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove QQmlEngine constructor and source property. Update unit tests and
manual tests accordingly.
Task-number: QTBUG-58876
Change-Id: Ide06bb1381f48efa5378f9a008476734a33089c1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We get the picking coordinates in model local tex coords which have a
different convention than the mouse events in window coordinates. So
flip them vertically to pass them in the right convention.
Change-Id: I558cc62c7c820677407730eead8011193a4b967c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|\|
| |
| |
| | |
Change-Id: I02adbc5294f9d5879cb05e75eccad74196ea2a7c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note: this is a risky change
For some reason the renderer assumed that a RenderQueue would never have a
size of 0. This prevented the renderer from calling proceedToNextFrame() on
the vsync advance service as it somehow felt that it was a case of rendering
with a RenderQueue not yet ready. In the case of OnDemand rendering it is
perfectly valid to have a RenderQueue of 0 (nothing has changed that requires
rendering) but we still need to call proceedToNextFrame() otherwise
syncChanges() is never called and we end up never updating the aspects ever
again.
The renderer was updated to
1) check if a RenderQueue is complete
2) check if the RenderQueue is empty.
(a RenderQueue can be complete but empty (OnDemand case))
3) Proceed to next frame if RenderQueue is complete or RenderQueue is empty.
Change-Id: I27ae778831c9b136db1e1a69892f6fde291fd965
Task-number: QTBUG-59696
Task-number: QTBUG-54900
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|/
|
|
|
| |
Change-Id: Ia9b5ccf8faed1c22c4fe4054c04a149ff12c6675
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I1ef3c275649fe874d2dc4c6caf81082729aca360
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
| |
Change-Id: I3bea4f27361dd4f51f8547c6d9d45c964f4fb5d3
Task-number: QTBUG-58607
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
|
|
|
| |
QSortCriterion was replaced with QSortPolicy, somehow some files were still
around.
Change-Id: Ic41fe557eb77c0b8d9d701a875598a7850a92b62
Task-number: QTBUG-55952
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
|
|
|
|
|
|
| |
Change-Id: Ide10e84479bdcfea71c29cd46b8a29199574d856
Task-number: QTBUG-59828
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Apply the same fix as tst_GraphicsHelperGL3_3.
Unblacklist the test, since it now passes.
Change-Id: I72bde506c3c6c802ed30acf40e10013f01e69de3
Task-number: QTBUG-59921
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
| |
Got fixed in the meanwhile.
Change-Id: I3efccd988b39b77bebab628bbf637b302a247cef
Task-number: QTBUG-59828
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't just generate a multisampled 2D texture with 4 samples per texel;
we need to check the implementation-defined maximum amount of samples.
Lacking glGetInternalformat*, query GL_MAX_SAMPLES. Since OpenGL does not
mandate a minimum, getting 0 is actually allowed; glTexImage2DMultisample
however does not accept 0 as number of samples, hence skip the test in that
case.
Change-Id: Id1b0c9705aed0665093aae44983eac8b656b676f
Task-number: QTBUG-59828
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
Disallow multiple simultanious captures.
Task-number: QTBUG-59456
Change-Id: Ice7cb854a9a7090664ff5a24f332cb28eba6359e
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Juan José Casafranca
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
|
|
|
|
|
|
|
|
|
| |
QRenderCapture::saveToFile() does not return success/failure. Returning this
properly means we don't have to verify success somehow. So add a new method
called saveImage() to return the information, and deprecate saveToFile().
Change-Id: I7cf6639d90baa8bce8b90ee795d953a021de7978
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
|
|
|
|
|
| |
Change-Id: I5469f6724ad28d171dd8ee631e89410f78919497
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
| |
Reduces the noise.
Change-Id: Icb7eea31b140c4f5380b99ba67f0b9f5519faab6
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|
|
|
|
|
|
|
|
| |
It handles both loadign from file and from data constructed using the
public API.
Change-Id: Ic9e71dc60c36869548323312f7129df6c9edd763
Reviewed-by: Mike Krus <mike.krus@kdab.com>
|