summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Render: Use SIMD Vectors and Matrices in the backendPaul Lemire2018-02-0222-401/+515
| | | | | | | | | | | | | | | Change-Id: I19b3b2f8fcb06eb2bc600ebe370465dd15a8eabc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Keep rendering in sync with aspect jobs by adding barriersSvenn-Arne Dragly2018-02-028-70/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure that jobs that depend on a specific state of the renderer (such as context being initialized) never run before this is the case. This reduces the number of possible race conditions and checks we need to do to ensure the jobs and the renderer are in the correct state. This way we no longer swap buffers when nothing has been rendered, which in turn makes sure that we only draw one frame when the render policy is OnDemand and there are no changes. This change also adds a number of assertions on pointers to resources to make it easier to detect missing job dependencies. Finally, this change overhauls the job dependencies in Renderer and RenderViewBuilder. Task-number: QTBUG-66024 Change-Id: I3e4e9dd0dd53b5c88f5c1b17d68df42f28eae794 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Handle primitive restart in buffer visitorLaszlo Agocs2018-02-151-5/+16
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-66407 Change-Id: Ic79851e94fcadee8f707cb2682938692db094aa7 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-144-54/+102
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp src/render/backend/renderer_p.h tests/auto/render/renderer/tst_renderer.cpp Done-with: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Change-Id: I2ca9bac4777e51434579edf86030414734f533ac
| * | | Ensure node creation changes are sent before using in list propertiesSean Harmer2018-02-081-0/+83
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completes the fix for out of order event delivery related to creation changes. We now ensure that QNodes used as values in singular and list properties are fully constructed on the backend before they are referenced in properties of other nodes. Also added a check to not recurse into sending too many changes when adding a child node. Written with Svenn-Arne Dragly. Task-number: Task-number: QTBUG-65956 Change-Id: I1470e0f685c81d1277ac04ad985ec1b76f1c27c0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 8fa23602cff47de6d19d05a8428a8e753bf73d61) Reviewed-by: Antti Määttä <antti.maatta@qt.io>
| * | Fix OnDemand render policySvenn-Arne Dragly2018-02-013-54/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The OnDemand render policy has no effect because the ShadersDirty and ComputeDirty flags are always set. This commit resets ShadersDirty so that ShaderGathererJob is only run when needed. It also introduces the TechniquesDirty flag so we know when to run FilterCompatibleTechniqueJob and makes sure the job is only run if the context has been initialized and the renderer is running. Task-number: QTBUG-65965 Change-Id: Icbcc03ed2dc6b14c6580cc794267b5a88e5f4ca2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add support for layers to control ray castingMike Krus2018-02-053-8/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RayCaster and ScreenRayCaster can have a number of layers which are used to control how entities with the matching layers are handled for ray casting. Similar rules apply as for LayerFilter in the frame graph. Change-Id: I9f666563a686ac99d7f178da33a539ba9edef51b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Unit test for ray casting jobMike Krus2018-02-015-0/+382
| | | | | | | | | | | | | | | Change-Id: I3b183bfe0231409facce40a7dacc3b923d65b73f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Unit tests for QRayCaster and backend nodeMike Krus2018-02-015-0/+311
| | | | | | | | | | | | | | | | | | Change-Id: Ic3b9676497086b228e467bae3eebeef5c5beb8ce Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Manual unit test for ray castingMike Krus2018-02-0112-1/+637
| | | | | | | | | | | | | | | | | | Change-Id: Icdd27b5ef6b50512e4af40d68d1ba7525f56b991 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Introduce QScreenRayCasterMike Krus2018-02-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split common functionality into abstract base class. Both frontend classes use the same backend implementation. Split common pick functionality for the object picking and ray casting jobs into abstract base class. Change-Id: Ieb8bdcf65d81db12234841d72c6cb0160e145bf6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Ray casting jobMike Krus2018-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Does the intersection calculations and sends hits back to frontend object. The entity pointer is updated in the front end before emitting the signal. This is done using private friend method to avoid detaching the hit object and causing a copy. Change-Id: If2fa0573f8f7120f2dcbb433c46efe1859f0eb5f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge branch '5.10' into devSean Harmer2018-01-268-6/+1018
|\| | | | | | | | | | | Change-Id: I4728b29c349a16867951a781c9417054c798e04a
| * | Unit tests for Matrix4x4Paul Lemire2018-01-265-1/+975
| | | | | | | | | | | | | | | Change-Id: I1b269bd33dd033d628d5bdb3fb014fec86277859 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | SceneLoader: fix broken scene tree unloadingPaul Lemire2018-01-231-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To unload the scene, we need to process the empty path in the backend to reset the status and send a change to the frontend QSceneLoader that will take care of deleting the previously created scene tree. With the introduction of remote urls support, the case of the empty path was not properly handled. It would end up being recognized as a remote path, a download request would be made. Eventually it would silently fail. A warning was added when a download request fails. Change-Id: I60222453ccde63d69f6a107d33d7c842313d98ed Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | SceneManager: rename pendingSceneLoaderJobs()Paul Lemire2018-01-231-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Renamed to takePendingSceneLoaderJobs() as the name better indicates we are resetting the vector of jobs internally. Change-Id: I68a16139994552b7b26f1cf88a206a61a30950e0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Fix private tests for boot2qtSami Nurmenniemi2018-01-232-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix overflow in tst_SegmentVisitor::testVisitLinesAdjacencyIndexed - Blacklist tst_FilterCompatibleTechniqueJob, offscreen platform does not support OpenGL context creation. Also the previously blacklisted tests on Windows fail because of problems with OpenGL context creation. Task-number: QTBUG-63152 Change-Id: I826c732d4cc0b45b0bedd9a85a460b30b1dc2e2c Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add normalizedTime function to blendedlclip animatorsChristian Strømme2018-01-232-7/+84
| | | | | | | | | | | | | | | Change-Id: I19c1907371d9d131295558eb19c297d544ebef7d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Add support for setting a time index in the ClipAnimatorChristian Strømme2018-01-233-20/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to seek the animation clip to a specific position in the time-line. The index is a real value between 0 and 1, where 0.0 is the start of the clip and 1.0 is at the end of the clip Change-Id: Ic8c57d04e4f1e0a7628713e057b5b8a41a400c5a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Add convenience functions to convert between seconds and NSsChristian Strømme2018-01-231-4/+4
| | | | | | | | | | | | | | | | | | | | | Makes it easier to read and to re-use. Change-Id: I74be7a623d0c2495ff2f6a42ac495ab469bb4d60 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devAndy Nichols2018-01-233-1/+258
|\| | | | | | | | | | | Change-Id: I2167d8d1d0050c7ca94180785a59f8753badaab4
| * | Merge branch '5.9' into 5.10Sean Harmer2018-01-223-1/+258
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/frontend/qcamera.cpp tests/auto/render/render.pro Change-Id: I8f848a1f863d07eecb328965fbe27d74b8d442f1
| | * Calculate and store real transform of camera in addition to view matrixSvenn-Arne Dragly2018-01-223-1/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to store the viewMatrix as returned by QMatrix4x4::lookAt in the transform component of the QCamera. This was unfortunate for two reasons: 1) An arbitrary entity could not be used as a camera without changing its transform to a viewMatrix, which breaks any other use of the entity. 2) Adding entities as children to cameras lead to the wrong transformation. This made it impossible to properly add objects that should be attached to the camera, such as the hands of a character in first-person view. This commit computes the transform of the camera based on the requested position, view center and up vector. The view matrix is calculated when the matrices are updated in the RenderView. This calculation assumes that the view direction is along the entity's negative z-axis and that the up vector is along the y-axis. Change-Id: If22b29e3d38bf55fbf79e9f7baf0c922e0a48aeb Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-223-20/+75
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer_p.h src/render/geometry/geometryrenderer.cpp src/render/geometry/qmesh.cpp src/render/geometry/qmesh_p.h tests/auto/render/commons/testrenderer.h tests/auto/render/meshfunctors/tst_meshfunctors.cpp tests/auto/render/qmesh/tst_qmesh.cpp Change-Id: Ia078029e2faf23fe253c5ce385e393c094266e3b
| * | Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into ↵Liang Qi2018-01-222-1/+75
| |\ \ | | | | | | | | | | | | refs/staging/5.10
| | * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-222-1/+75
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/render/backend/renderer.cpp Change-Id: I691f54cd6daef8a966df37d447164c94badce34c
| | | * Add unit test and fix for broken order of event deliverySean Harmer2018-01-181-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure a backend node is always created before it is used in a property of any other node. This avoids a race between sending the creation, add child and property update changes and the start of a new Qt 3D frame. The race is caused by the use of the event loop to trigger the node created and child added changes. Also be careful not to repeat the node creation. Task-number: QTBUG-65829 Change-Id: I6ca5eb269ce657f8d42d855550fb4f898e3bd420 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Volker Krause <volker.krause@kdab.com>
| | | * Scene3D: allow to force blocking renderingPaul Lemire2018-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Scene3D, when the jobs preparing the render commands for the 3D scene take too long (more than the QtQuick refresh rate), the Scene3D wouldn't render anything when QtQuick requested it to. Then, the next time it would be asked to render (next QtQuick frame), if the jobs have finished by then, it will render. If the jobs are still not ready, then the above process is repeated. This patch introduces an environment variable SCENE3D_BLOCKING_RENDERMODE which can be set to force Scene3D to wait (for at most 10ms) instead of returning immediately for the jobs being ready. Change-Id: I2db10e622570a7bc8a2e2cbaff113c110135cd3e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Generate default channel values as neededSean Harmer2018-01-221-19/+0
| |/ / | | | | | | | | | | | | Change-Id: I20871448ba10cf6459b156d00bebdf7a7c8a319b Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | QMesh: do not rely on QAspectEngine to create QGeometryFactoryPaul Lemire2018-01-222-11/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This would prevent QMesh created without parent/scene to have a proper geometry factory. - This avoid passing the engine around Change-Id: I5091970f96e87ab8b129475a1113ef84ce170388 Task-number: QTBUG-65506 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Mesh loading: send status updatePaul Lemire2018-01-222-0/+5
| | | | | | | | | | | | | | | | | | Change-Id: Id4b73655ee30c3c225ee804f1e9244cc2b16aebf Task-number: QTBUG-60927 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | QMesh: do not rely on QAspectEngine to create QGeometryFactoryPaul Lemire2018-01-222-11/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This would prevent QMesh created without parent/scene to have a proper geometry factory. - This avoid passing the engine around Change-Id: I5091970f96e87ab8b129475a1113ef84ce170388 Task-number: QTBUG-65506 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | QMesh: add a status propertyPaul Lemire2018-01-221-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | This will allow to monitor the loading of the mesh. Change-Id: I52ad7a7d556c64bfdb04173be932d6fe79bf5ae2 Task-number: QTBUG-60927 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-203-95/+505
|\| | | | | | | | | | | Change-Id: If94c3e34550fa45ec2df47f813ac7aa22c1de2b1
| * | Add a function to calculate the default value for missing channelsSean Harmer2018-01-191-0/+164
| | | | | | | | | | | | | | | | | | Change-Id: Ic7bee59324da81fe2e467fd940029706297fc286 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Store more information in the ChannelNameAndType structSean Harmer2018-01-191-27/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should be renamed in a follow up commit to something like ChannelDescription. This additional information is required to track where we need to substitute in default channel values for clips with those channels missing when building the blend tree format. Change-Id: I46ce9624fc887b1e902ad1a800c69637bdf9a163 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Add getters for joint transformations to SkeletonSean Harmer2018-01-191-0/+58
| | | | | | | | | | | | | | | | | | Change-Id: I29e6dec8486f1e9efe709815615cb09ab5be5598 Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Wrap up the format describing source clip and formatted resultsSean Harmer2018-01-182-68/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need more information that just the source indices to be able to properly describe the transformation from the raw evaluation results of a clip, through to the formatted layout later consumed by the MappingData objects. The playback of a QClipAnimator still works but it seems that the process for properly blending animations is more complicated than previously thought. We cannot simply assume a default value of 0 for all channel components. If a clip has a channel missing but the user has still requested that this channel be evaluated (by way of a mapping or a subset of clips having matching channel data), then we must provide sensible defaults for those channel components. This deficiency will be dealt with in a following commit. Change-Id: I7d7d0f7ce19c545629bb347e1132fc4ed6a59d0d Reviewed-by: Christian Stromme <christian.stromme@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | Add function to return name of a jointSean Harmer2018-01-181-0/+18
| | | | | | | | | | | | | | | Change-Id: Ia6fcf9014b25037c076e7dbce08941fb384ce527 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Merge branch '5.10' into devSean Harmer2018-01-173-44/+47
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I248aa369ba98659a61e563fd29cc811c76ea1e2d
| * | Merge branch '5.9' into 5.10Sean Harmer2018-01-122-44/+41
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/animation/backend/handle_types_p.h src/extras/defaults/qtexturematerial.h src/render/backend/entity_p.h src/render/backend/handle_types_p.h src/render/backend/renderview.cpp src/render/io/scenemanager.cpp Change-Id: Ic145062cc98360e9067fd60f0992c7a6b51e41bb
| | * Get rid of the INDEXBITS template argument for QHandleLars Knoll2017-12-132-44/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | It's not required anymore, as the resource manager can grow as needed. Change-Id: If509de7f2ef90e1af9729d8fc60d7ecb08ede687 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Add test for QPickEvent private dataMike Krus2017-12-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | QPickEvent carries the id of the picked object in the private pimpl. This was previously broken (breaking Scene2D) so adding a test to check it doesn't get dropped in the future Change-Id: Ic19db84877458329a2e98713805d7294fb2b7185 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Revise buffer traversal in bounding volume calculationLaszlo Agocs2018-01-081-1/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take the index attribute (and buffer) into account, when present. Rely on QGeometryRenderer::vertexCount(), when set. Task-number: QTBUG-65590 Change-Id: I1bf237df7c4c0ef2162b23a62f83bddfb77e0998 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLaszlo Agocs2017-12-133-8/+35
|\| | | | | | | | | | | Change-Id: Ib51c8311ce78b2fec62dd0c09cb943a85a7d0b2b
| * | Add QBlitFramebuffer auto-parenting behaviorLaszlo Agocs2017-12-112-7/+34
| | | | | | | | | | | | | | | | | | | | | | | | As is common with other nodes. Task-number: QTBUG-65081 Change-Id: I12ccd2fb5344e116f2f5333b73edb4562799543d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Improve performance for finding entities in subsetSvenn-Arne Dragly2017-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using set_intersection reduces the time spent in this function by almost 90 %. Change-Id: I993930ad8e017d58352dfe504fa593e11860e6a7 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Cache material parameter gatherer resultsSvenn-Arne Dragly2017-12-062-4/+20
| | | | | | | | | | | | | | | Change-Id: I0660f876d7d967d552f7982c3e33e7c971c9abb4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devAndy Nichols2017-11-2014-201/+567
|\| | | | | | | | | | | Change-Id: Ia6496e1ea22f2393a28e37cdd9f6e34f7613db49
| * | Split animation callback handling into its own frontend classSean Harmer2017-11-163-1/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This keeps things consistent between the 3 mapping types: * Regular properties * Callbacks * Skeletons The ChannelMapping backend node handles all 3 frontend types. Change-Id: I824aeb25aa69d96f20d844e7d953c68567829321 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>