summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Try to investigate why tst_GraphicsHelperGL3_3::blitFramebuffer() failsv5.9.0-beta3Giuseppe D'Angelo2017-04-181-2/+2
| | | | | | Change-Id: Ide10e84479bdcfea71c29cd46b8a29199574d856 Task-number: QTBUG-59828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_GraphicsHelperGL3_2::blitFramebuffer(): check how many samples are supportedGiuseppe D'Angelo2017-04-182-3/+6
| | | | | | | | | 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>
* tst_GraphicsHelperGL3_3: remove blacklist of blitFramebufferGiuseppe D'Angelo2017-04-181-2/+0
| | | | | | | | Got fixed in the meanwhile. Change-Id: I3efccd988b39b77bebab628bbf637b302a247cef Task-number: QTBUG-59828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_GraphicsHelperGL3_3::blitFramebuffer(): check how many samples are supportedGiuseppe D'Angelo2017-04-181-1/+6
| | | | | | | | | | | | | | 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>
* Fix rendercapture-cpp example crash when using continuous captureMäättä Antti2017-04-181-3/+5
| | | | | | | | | | 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: add saveImage() to replace saveToFile()Andy Maloney2017-04-122-2/+2
| | | | | | | | | 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>
* Fix license headers in manual testsSean Harmer2017-04-126-48/+294
| | | | | Change-Id: I5469f6724ad28d171dd8ee631e89410f78919497 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use using namespace declaration to animation clip unit testSean Harmer2017-04-121-8/+10
| | | | | | | Reduces the noise. Change-Id: Icb7eea31b140c4f5380b99ba67f0b9f5519faab6 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Rename AnimationClipLoader to AnimationClipSean Harmer2017-04-126-42/+42
| | | | | | | | 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>
* Add a flag to AnimationClipLoader to track where its data comes fromSean Harmer2017-04-122-0/+6
| | | | | | | Nicer than implicitly tracking it via m_source.isEmpty(). Change-Id: I120cb3728504b2bbc77d5959711a3f94731399ce Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Picking: don’t emit click if mouse released on different entityMike Krus2017-04-121-4/+4
| | | | | | Task-number: QTBUG-59582 Change-Id: I88e49add59d1caa3167576c8f0c014dd61211f29 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use interpolation enum from QKeyFrameSean Harmer2017-04-112-8/+10
| | | | | | | No point in duplicating this on the backend just for the sake of it. Change-Id: I1852f7f22d5519b260ed90adce3715ab4257df61 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Adapt manual test to exercise new animation data APISean Harmer2017-04-115-3/+180
| | | | | Change-Id: I977ae430e33b2c4ded91e6aa2af0d55f1672918e Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add manual test to prove out API for defining clipsSean Harmer2017-04-116-1/+271
| | | | | Change-Id: I273a210ef207fe9188ac2ed4b44787163cbe895d Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Blacklist a tst_VSyncFrameAdvanceService test on openSUSE 42.1Tony Sarajärvi2017-04-041-0/+2
| | | | | | Task-number: QTBUG-56576 Change-Id: I7ad2367de7d5dc855a2493832db99dc1b9c4c070 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Blacklist tst_GraphicsHelperGL3_2::blitFramebuffer on Ubuntu 16.04Tony Sarajärvi2017-04-041-0/+2
| | | | | | Task-number: QTBUG-59921 Change-Id: I2385f5079adf91d6ced64470dfa90d8f654d0f35 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Fix QML registration of QAnimationClipLoaderSean Harmer2017-04-032-3/+3
| | | | | Change-Id: I8fae537aa38059ff2592c2f49c238408ea27f7e0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Blacklist tst_GraphicsHelperGL3_3::blitFramebuffer on Ubuntu 16.04Tony Sarajärvi2017-03-311-0/+2
| | | | | | Task-number: QTBUG-59828 Change-Id: I5fc74639dc9bffcccdfc42655656ba37822ae07c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove pointless template member function from QAbstractFunctorSean Harmer2017-03-306-9/+9
| | | | | | | Use template free function instead. Change-Id: I1171279423f164b877aaef21926ceda512fcbd2e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use [setL|l]oopCount in C++ for QAbstractClipAnimatorSean Harmer2017-03-304-24/+24
| | | | | | | | | Keep the property name as loops for consistency with Qt Quick. Avoids ambiguity in function name meaning. Change-Id: Icf35f30d3020e77aba9db878c9dbc6e890c898ff Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Rename QBuffer::access property to accessTypeSean Harmer2017-03-291-1/+1
| | | | | Change-Id: Ie56a792272d2bf748a0d64096d46852ab718c37a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add Threshold suffix to QLevelOfDetail enum valuesSean Harmer2017-03-293-10/+10
| | | | | | Change-Id: I70a39b4a2664e2952d9f3cdd1ace1f021b0311dd Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add arguments to notify signals in QFirstpersonCameraControllerSean Harmer2017-03-281-2/+2
| | | | | Change-Id: Ic7a970bf51e11dde38bbf3ce9b708e957f9fee8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix ShaderData following texture support changesPaul Lemire2017-03-271-2/+70
| | | | | Change-Id: Ia1ef3fdd796070fa6c5b37be5774babd1eaf2d96 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove last vestiges of parent-child data from ClipBlendNodeSean Harmer2017-03-261-2/+0
| | | | | Change-Id: I76c28fc48ee6683f3e86aceffd66e2b579899d5b Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Make ClipBlendNodeVisitor use allDependencyIds()Sean Harmer2017-03-261-9/+15
| | | | | | | | | Instead of childrenIds() which no longer makes sense since we do not use the parent/child relationship to define the tree but rather explicit properties on each node type. Change-Id: Ia2a20a62d5f51acbbb364f6b5bd1ffebdbc8a28c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add allDependencyIds() pure virtual and overrides to backend nodesSean Harmer2017-03-265-0/+25
| | | | | | | | This will be used to visit all nodes by the visitor for the purpose of collecting vlaue nodes that should be evaluated. Change-Id: Iff84eed2ee139a0ecd3639994549e5859b5827d0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename dependencyIds() to currentDependencyIds()Sean Harmer2017-03-266-11/+11
| | | | | | | | | | We need to add another function that returns all potential dependencies rather than just those that are dependencies given the current state (blend value). Make room for that by renaming this to a more descriptive name. Change-Id: I06cdc2e471007e3bd40cd7b687a4a2c21e4b2828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QClipBlendNode::performBlend() to blend()Sean Harmer2017-03-263-3/+3
| | | | | | | | Now the old blend() virtual is gone we can give this function a nicer name. Change-Id: I74e427692f9667d52342d5c558bff3e7cf63c652 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove blend() virtual function from backend blend tree nodesSean Harmer2017-03-265-69/+0
| | | | | | | | No longer needed as replaced by the more general doBlend() protected virtual. Change-Id: I5f11c068f8a379baa53a033e5ce8ce63ff64d5ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove ClipBlendNode::parentId() functionSean Harmer2017-03-262-11/+0
| | | | | | | | No longer needed. The tree is not managed by parent/child relationships any longer. Change-Id: I711e71a4b54491f5713732ea54100b7ce9526527 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove clips property from QAbstractClipBlendNode and friendsSean Harmer2017-03-269-318/+0
| | | | | | | | No longer needed as concrete subclasses each provide their own specific APIs for managing clips or sub trees. Change-Id: I8e090bcf18ad9bf0d19e36128d7556aaa6cd6edf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update animation-keyframe-blendtree exampleSean Harmer2017-03-257-482/+949
| | | | | | | | | To use new json format and blend tree node API. Now wondering if we should drop the "clip" suffix from blend tree node properties as they can be other sub-trees not just values (clips). Change-Id: I96e83a84722a983c2929aa2bbfc4b41c3c2c7dd1 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add overload of buildPropertyMappingsSean Harmer2017-03-251-0/+196
| | | | | | | | | | Eventually we should remove the original form which is currently called by the non-blended animation code path. It will be better to merge the blended and non-blended code paths so we have less code to maintain. Also the blended code path seems more efficient. Change-Id: Ib6aa4006e4b830a32b985527bae900ce6f3facec Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function to generate component indices for blend tree formatSean Harmer2017-03-253-0/+577
| | | | | | | | | | This generates the format indices required by the formatClipResults() function which performs the gather to reorder the raw results from an animation clip to the format used by the blend tree/animator. Change-Id: I5cd8fbe366792ae9d8317f098699c413450b9b87 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function assignChannelComponentIndicesSean Harmer2017-03-251-0/+66
| | | | | | | | | | | | | | This iterates through the channel description and assigns channel component indices in ascending order. The next step will be to use this in conjunction with the channel description with the layout of channels in each clip to generate the format indices that will allow us to quickly map from the clip's raw ClipResults to ClipResults formatted in the layotu used by the blend tree/animator. Change-Id: I04dd5a21ca8355529118cfb2b05f4904e43ef0e2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a function to build list of unique channel names and typesSean Harmer2017-03-251-0/+126
| | | | | | | This will be needed to construct the data layout for blend trees. Change-Id: I0b11076f5ecd55cfad094d864f3f8270841fc62a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add function to format clip results using a gather operationSean Harmer2017-03-251-0/+68
| | | | | | | | | If an index in the format is -1 put a default value of 0 into the formatted results. This will allow clips to not have to provide every channel used anywhere by the blend tree. Change-Id: I9e18d0840e75a959ef680cbd54259a74c9331fa8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add methods to set and retrieve format indices for a blend value nodeSean Harmer2017-03-251-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | In order to have a consistent data layout for all interior nodes of a blend tree, we need a place to convert from whatever data layout a clip produces when evaluated to the format used by the blend tree. We will do this by creating for each value leaf node a vector of indices that can be used to map from the ClipResults layout output by the clip to the ClipResults format used by the blend tree. With this approach, we can do the following: * Evaluate each leaf node in the blend tree * Perform a gather operation using these format indices to reorder the data into a consistent layout for the whole blend tree * Evaluate the blend tree using this consistent layout This completely avoids having to perform complex mappings when evaluating each blend node, which is a significant saving in overhead and allows for more parallellism in the future. Change-Id: Ie534534f9555842d0d0f1a89fc996e25f5c6ce9e Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function to evaluate a blend treeSean Harmer2017-03-251-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out with this design, evaluating the blend tree is actually really simple. Visit the tree nodes and call blend on the interior nodes. The leaf nodes will already have their values from an earlier stage. This also makes apparent yet another opportunity for parallelism during the blend tree evaluation. The blend tree may contain independent subtrees that can safely be evaluated in parallel. Once we have the ability for jobs to spawn jobs there are at least 3 ways we can have parallelism in the blend tree evaluation: 1) Each blended clip animator can be processed in its own job. 2) Sub trees of the blend tree can be evaluated in parallel, relying upon dependencies between jobs to do this properly. 3) Within each node's doBlend() there is potential to use a parallel implementation of the map operation like parallel_for in TBB. There are also other opportunities in earlier stages of processing such as when evaluating the actual clips, we then need a gather operation to map the clip results into the layout used by the blend tree. This evaluations could be done in parallel as well as a parallel gather (which is just a map with a random access read operation). This all bodes well for being able to process large numbers of animations each containing large numbers of channels which will be needed when we add support for skeletons. Change-Id: Id81e3a5e563a7ef9b7ac39b90c518c656cf8a3cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add virtual doBlend to ClipBlendNode and subclassesSean Harmer2017-03-254-1/+446
| | | | | | | | | | | | | | | | | | | This is called by the non virtual performBlend (will be renamed once old implementation is removed). The key here is that all nodes in the blend tree will have the exact same layout for the ClipResults for a given animator. This means we don't need to have a mapping data structure for every node in the tree. This really simplifies the blending implementation and will allow us to parallelise this much better in the future as each blend node could make use of a parallel_for() or map() type operation. To achieve this we will need to perform a gather operation that maps the ClipResults coming straight out of an animation clip to the ClipResults layout used by the blend tree as described above. This will be done in a follow up commit. Change-Id: I389383d3b9197a6ef36b529f44ac89cb5c593023 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add missing parentheses in conditionalSean Harmer2017-03-251-2/+2
| | | | | Change-Id: I58dc19a06283a5999dbcd76f74d095daf0a9017d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add function to recursively calculate duration of a blend treeSean Harmer2017-03-255-0/+154
| | | | | | | | | | | | | | The resulting duration is independent of which animators the blend tree is associated with so this can be implemented as a simple set of virtual functions in the concrete classes. The value node simply returns the duration of the contained clip; the additive node returns the duration of the base node; and the lerp node lerps the durations of the start and end nodes. Change-Id: Ib6edea3fa495885493fa72d44437fea5a8c5a446 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix scene2d mouse event coordinate calculationAntti Määttä2017-03-233-2/+293
| | | | | | | | | Apply the window size and use correct texture coordinates. Task-number: QTBUG-57253 Change-Id: Ibc5f7ef878baf938b1b3e3b7cfb4eba2cea38ad6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add function to find set of leaf blend node ids that need evaluatingSean Harmer2017-03-191-0/+69
| | | | | | | | | | | | | | | | | | | We should only evaluate the clips that are actually dependencies of the blend tree being evaluated given its current state. At present this will simply be the set of all leaf nodes in the blend tree but in the future when we support generalised lerp nodes etc, this will yield the subset needed for the current state. This involved adding support for pre-order traversal of the blend tree. As a result, extended the visitor to work with both pre and post orders and for all nodes or only the dependencies. Note that we return the ids of the blend tree nodes, not the ids of the clips themsevles. This is so we can then index the results by blend node id in a later commit. Change-Id: Ia13fe90ec3090306c1e8ade316ce0540f36a67fd Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function to evaluate clip at a given phaseSean Harmer2017-03-191-0/+107
| | | | | | | This is another piece of the puzzle for evaluating blend trees. Change-Id: If0604125b11bacf0c205a69a59d39f601dd2ebd1 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function to calculate phase of animation from global timeSean Harmer2017-03-191-0/+165
| | | | | | | | | | | | | | | | | When we come to evaluate animation blend trees, the resulting duration of the blend tree will also be blended. This means that we can't just map from global time to local time of each leaf node clip. Instead we need to evaluate the clips at a consistent phase. This way we can safely blend a 3 second walk animation cycle with a 2 second run animation cycle safely. So long as the animator lines up the foot falls at consistent phases. We will therefore need to be able to calculate the phase from the current global time and the blend tree's duration before we can eventually evaluate the clips at the phase. Change-Id: I7bce231cdc2eee8cb873f2c98c6c8c2e05533c8c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add using namespace Qt3DAnimation::Animation to some backend testsSean Harmer2017-03-173-20/+26
| | | | | | | Reduces visual clutter. Change-Id: I244fdbab32d6f8fb77d5f9bd364fa1f9c8c7ec2c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add virtual to ClipBlendNode to allow querying dependenciesSean Harmer2017-03-175-0/+88
| | | | | | | | | | | This will allow a job to build up a list of clips to be evaluated for the blend tree. This has enough flexibility to allow us to support many types of bend node in the future but still allow us to only evaluate the clips actually needed at any given time and for the current set of blend node states. Change-Id: I6bfff6d18434af4f09764d890af6f8f429996994 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Use using namespace Qt3DAnimation::Animation in tst_clipblendnodeSean Harmer2017-03-171-22/+26
| | | | | | | Reduces visual clutter Change-Id: I807adbdabc2c010f0b33a7ebf89f7aeeaabd5b6d Reviewed-by: Mike Krus <mike.krus@kdab.com>