summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-254-1/+124
|\| | | | | | | Change-Id: I13dfef5918cada019dfa29a28a8eee6a6efa7e27
| * texture_property_updates test: specify texture formatPaul Lemire2018-12-211-0/+2
| | | | | | | | | | | | | | | | | | It used to work before because it would default to RGBA_Unorm but that should be either deduced when using a QTextureLoader or specified when using a raw QTexture2D Change-Id: I930ce490a393f48b870d4e2c1f15e0551c468f2d Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * QEnvironmentLight: add uniforms for envmaps sizePaul Lemire2018-12-201-0/+98
| | | | | | | | | | | | | | | | | | This makes future ES2 PBR implementation possible as textureSize() is not available on ES2 Change-Id: Ibf2b36240778a3f30f4316a67819f9052e46bdf1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
| * Texture: initialize internal format to NoFormatPaul Lemire2018-12-192-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format was initialized to RGBA8_UNorm on TextureProperties. This had the side effect that if you created a TextureLoader entry with no source yet set, the backend would try to load and return early since no texture data had yet been generated. Yet it would still send a notification change with the format (which was RGBA8_UNorm instead of NoFormat) back to the frontend QTextureLoader. This would prevent the QTextureLoader from later being loaded correctly with the format actually read from the image file. Also updated QTextureData/QTextureImageData/QTextureFromSourceLoader for consistency. Change-Id: I23e2287fac297b9b8901476715b1bc1e78c6342b Task-number: QTBUG-72651 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | Only execute SSE alignment tests if we are not doing the AVX alignment testsPaul Lemire2018-12-211-1/+1
| | | | | | | | | | Change-Id: I942cc8b42b2563f28f7760e823298872676a1529 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Fix overflow in ThreadPooler test when CPU has high number of coresPaul Lemire2018-12-211-3/+3
| | | | | | | | | | Change-Id: I10b678dc5ea574d3723f41c2f1b77053f9fbaa26 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | QShaderProgramBuilder: add properties to access generated shader codePaul Lemire2018-12-142-3/+168
| | | | | | | | | | | | Change-Id: Ib4d448198b2f53850ff0c9b1f2ff4d2d905eea26 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | QObjectPicker and QPickingSettings NearestPriorityPick picking modePaul Lemire2018-12-125-1/+436
| | | | | | | | | | | | | | | | | | | | | | | | Add a new priority property on QObjectPicker and a new QPickingSettings mode. This will select the result with the highest priority if there are several results on a given ray. If we have several results with identical properties, the result with the closest distance is selected. [ChangeLog][Qt3DRender] QObjectPicker: add a priority based result selection Change-Id: I7af12db6e163c3c2d9dad696e6d9f9bbbee064ed Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-112-1/+89
|\| | | | | | | | | | | | | Conflicts: src/render/renderers/opengl/textures/gltexture.cpp Change-Id: I57e9a296dc15f0b5dc3af3664f698bdc799c4bb5
| * Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-12-041-0/+88
| |\ | | | | | | | | | Change-Id: I9f4dd807f0179d7bd95a5263e57c37198e7432f4
| | * Reset last selected picker when releasing out of viewportPaul Lemire2018-11-301-0/+88
| | | | | | | | | | | | | | | | | | Change-Id: Iec70e84024caf879358183fee34638def5038aef Task-number: QTBUG-72160 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * | Remove wince check as it is not supportedOliver Wolff2018-11-221-1/+1
| | | | | | | | | | | | | | | Change-Id: I4f12b9d823d8468b3a66de0242a5a6d6de27d702 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | | QComputeCommand allow to control the run behaviorPaul Lemire2018-11-142-0/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | It can either be Continuous, like it was until now or Manual. When in manual mode, the compute shader will only be executed by calling trigger() Change-Id: Icaae24f4691ccd821297f967d564e7a883fa60b5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Remove GPU_BLACKLIST support from various testsEdward Welbourne2018-10-124-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The feature has been unused for some time and shall be reduced from qtbase in due course. Change-Id: I9e2b655dacd8290fa396588b03238399139259f7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | Make backend FG node use FrameGraphDirty instead of AllDirtyPaul Lemire2018-10-123-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | So as to later on allow finer grained job launching and not force every job to be rerun when we know only the FG has changed. Change-Id: I09f935f8a1793722159ba645acc2ad4b00983041 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Implement WaitFence/SetFence handling into the rendererPaul Lemire2018-10-126-21/+427
| | | | | | | | | | | | | | | | | | | | | | | | Slightly reorganize jobs between jobs needed for rendering and jobs that should run even when no rendering is required. Change-Id: I02d262efd8cb46c71c40ac6dbcd4d1b25bb725e1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Register QWaitFence/QSetFence with QML modulePaul Lemire2018-10-111-0/+2
| | | | | | | | | | | | | | | Change-Id: I14477a3ceb21fdcf2e1ba175fa828d4df4e81b6d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Add backend nodes for QWaitFence and QSetFencePaul Lemire2018-10-115-1/+376
| | | | | | | | | | | | | | | | | | | | | Follow up commits will make use of them Change-Id: I8e06f0a5cfba1650579605c7bdb70cd115e6417f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Texture: update renderer to send handle and handle type on frontend texturesPaul Lemire2018-10-112-1/+5
| | | | | | | | | | | | | | | | | | Change-Id: I78047f354a9f7cdbb56bd2b5dee79cb77e6cb749 Task-number: QTBUG-70055 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Renderer: implement using OpenGL textures from a texture idPaul Lemire2018-10-1110-0/+923
| | | | | | | | | | | | | | | | | | Change-Id: Ifc65966c50cb6fc8780206852f92bf1d4a6b4d5b Task-number: QTBUG-69918 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | QAbstractTexture:: add handle and handleType propertiesPaul Lemire2018-10-101-0/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will allow to retrieve the OpenGL texture id for textures created by Qt3D. Also completed tests along the way. [ChangeLog][Qt3DRender] QAbstractTexture: Expose raw texture handle and handleType to share with 3rdparty engines. Change-Id: I27d390c223303d9d11a418c2957aaae6ae1df850 Task-number: QTBUG-70055 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | | Introduce QSetFence/QWaitFence to synchronize with 3rd party enginesPaul Lemire2018-10-105-1/+566
| | | | | | | | | | | | | | | Change-Id: Id0a3db229a33b3ee9dc01bf1b01ddd3af27cb34f Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | | Register QSharedGLTexture to qmlPaul Lemire2018-10-081-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: I332e90ed23a5ba0ef5980445ba84808562af530a Task-number: QTBUG-69918 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | | Add QSharedGLTexturePaul Lemire2018-10-085-0/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractTexture subclass that will allow to make Qt3D work with a texture id created by another GL engine on a shared context. [ChangeLog][Qt3DRender] Add QSharedGLTexture to allow creating a Qt3D from an OpenGL texture id. Change-Id: Ic5b19eae6ebc7aca7e6372d62217348f99db19df Task-number: QTBUG-69918 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-051-1/+20
|\| | | | | | | | | | | Change-Id: I6ce88af90fc64b4b9bed33297df0b80824e67117
| * | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-221-1/+20
| |\| | | | | | | | | | Change-Id: I1a1c178055502b1cd37ad1be30dcb2f5409ed7a8
| | * Complete ES 3.1 and 3.2 helpersPaul Lemire2018-09-211-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which didn't handle indirect drawing, compute and tessellation Since ES 3.1/3.2 don't provide API for glShaderStorageBlockBinding, code was adjusted to use the default binding points and not require that API. Change-Id: Ie4dcd05f0a1d72e4a25f49b5fae138dc605ba5e3 Task-number: QTBUG-70660 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Add private API to access child nodes of QEntity and QFrameGraphNodeSvenn-Arne Dragly2018-09-032-16/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This opens up for reduced bookeeping on the backend, and is used by the experimental Dragon render aspect, which is currently being implemented in qt3d-runtime. Change-Id: I4cc2e98e4e0e7e8d456ed11c4fbc48db5c93f2a2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 77e418fde850c86e39d9dd8528876599fbe9dc34) Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Dont play animations that are disabledJuan Jose Casafranca2018-09-191-9/+47
| | | | | | | | | | | | | | | | | | Change-Id: I5293ff8d16c511de79c4583783b238154af32f61 Task-number: QTBUG-69373 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Add an easy way to get a particular component from an entityJuan Jose Casafranca2018-09-191-0/+33
| | | | | | | | | | | | | | | Change-Id: I188fab5019d3e05354a4c1582fb12097a569fbb8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Add private API to access child nodes of QEntity and QFrameGraphNodeSvenn-Arne Dragly2018-08-262-16/+77
|/ / | | | | | | | | | | | | | | | | This opens up for reduced bookeeping on the backend, and is used by the experimental Dragon render aspect, which is currently being implemented in qt3d-runtime. Change-Id: I4cc2e98e4e0e7e8d456ed11c4fbc48db5c93f2a2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Renderer: remove code shutting down thread in renderer dtorPaul Lemire2018-08-207-1/+246
| | | | | | | | | | | | | | | | This should have already been performed by Renderer::shutdown(). Doing it again in the dtor only hides potential issues. Change-Id: I33b02df42d1667ea4cbc02cb6f4cb8fabcf70996 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | EntityLoader: add sourceComponent propertyPaul Lemire2018-08-201-26/+49
|/ | | | | | | | | Now handles either loading from file or from a Component [ChangeLog] EntityLoader now also supports loading an Entity from a Component Change-Id: I1988f897071e5527b36e1b494bba57e9ab165bd8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Improve backend texture unit testsPaul Lemire2018-08-131-0/+186
| | | | | Change-Id: Ie7baba99e03defcd3d8194fd11838a86d1680060 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Properly update properties from Backend to Frontend texturesPaul Lemire2018-08-087-1/+308
| | | | | | | | | | | | | | | | | | | Taking into account we have texture sharing in the backend, we can only update frontend texture properties once we have created the shared backend texture. Code was adjusted to retrieve these properties when creating the GLTexture. Such changes are stored and sent on the next run loop from a job where they are distributed to all referenced frontend Texture. The status property handling has also been updated to send status changes to all shared textures instead of just the texture whose data generator is used to gather the data. A manual test checking texture property updates, sharing and remote url sharing has also been added. Change-Id: I8ed2449fe57c9d7337580b0f7561f974cbd5006d Task-number: QTBUG-65775 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add support for loading specific animations from glTF 2 filesSean Harmer2018-08-029-0/+586
| | | | | | | | | | | | | | Can now specify source urls to QAnimationClipLoader with query parameters for animationIndex or animationName. Add a new manual test to demonstrate/test this by loading the 2nd animation from the Rigged-Simple.gltf file. Will followup with the same support for Qt 3D native json animation files. Change-Id: Icb66073f29b8471fe06e2e2e9c43720567dc9ee5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Enable ConstantInterpolation for fcurvesJuan Jose Casafranca2018-07-311-0/+22
| | | | | Change-Id: If51c8377f5b29433feaa520a7586f0608b7510f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix: Do not enforce TextureImage to be parented only by TexturePaul Lemire2018-07-188-20/+435
| | | | | | | | | | | | | | | | | | | | This behavior prevented using TextureImage not directly parented by the Texture that uses them (assert would be triggered). In turn, this also prevents sharing a TextureImage among several Texture instances which is counter productive since this is where the data is actually stored. This patch fixes this issue. It removes all direct coupling between Texture and TextureImages. Now Texture only contains the list of TextureImage ids it references. This allows to not make look-ups into the TextureImageManager to retrieve handles, which could be an issue if TextureImages have not yet had their backend created. TextureImage doesn't keep track of the referencing texture that uses it anymore. Instead, we let the renderer do the job of checking if any of the TextureImage referenced by a Texture has changed to trigger actual Texture update. Change-Id: I3c63379d0f4b314e9b53f225870eeaded0bb4aec Task-number: QTBUG-69407 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QNode: _q_postConstructorInit set scene on whole subtreePaul Lemire2018-07-181-0/+49
| | | | | | | | | | | | | | | _q_postConstrutorInit is called in a deferred invocation when constructing a Node with a parent. If several nodes are created that way, the _q_postConstructorInit call from the node which parents the other will actually build the node creation changes for the whole subtree and incidently prevent the _q_postConstructorInit invocation for the children to do anything (including setting the scene). Therefore _q_postConstructorInit should set the scene on all the Node it will be creating creation changes for. Change-Id: I07d4e80675758b9701cc941881f1faaa1c89af4b Task-number: QTBUG-69352 Reviewed-by: Svenn-Arne Dragly <svenn-arne.dragly@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Check animator can be played in frontend and backendJuan Jose Casafranca2018-07-111-0/+27
| | | | | | | | | | | We check that the animator can be played in the frontend. Each animator subclass must implement their own canPlay method. In the backend we correctly check the clipAnimator can be played Task-number: QTBUG-69369 Change-Id: If8bca9b73321e2bfdb4d68ddc286df0109ee91f1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Do not delay cleanup of backend Texture instancesPaul Lemire2018-07-113-0/+76
| | | | | | | | | | | | | | | | | | | If we delay the cleanup of backend Texture instances, in the case of a texture being reparented from an existing node with backend to a node with no backend, the resulting node destroyed, node created changes delivered in the same loop would result in the Texture still being marked for destruction and eventually being destroyed even though it was recreated. This patch now still marks textures that were destroyed (by storing their ids), so that the GL Texture managers can update the resources accordingly. However, we now cleanup Textures immediately. We also remove textures ids marked for destruction in the GL texture managers if we detect a Texture with the same id is readded. Change-Id: I29092d7dff9f70bb9fb4b15f4e9419ee1791b6e2 Task-number: QTBUG-69379 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* More fuzzy evaluation when calculating rootsChristian Strømme2018-07-101-0/+13
| | | | | | | | If the discriminant is close to zero, evaluate it as being zero. Change-Id: Ief2624dd512d703e44d8a0c63431baef3cee7c45 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Handle reparenting to nodes which have no backendPaul Lemire2018-07-041-0/+158
| | | | | | | Change-Id: Ibbaae84a616afbe8be35904e9185be668e32f1c7 Task-number: QTBUG-69284 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QGraphicsApiFilter: fix Vulkan enum value aliasingPaul Lemire2018-06-251-0/+9
| | | | | | Change-Id: I8c8583e318aef59c4fc280bc85ea6171538f53f3 Task-number: QTBUG-69028 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix race condition when executing multiple filterlayerjobs at oncePaul Lemire2018-06-253-3/+10
| | | | | | | | | | The updating of referenced layer ids for each Entity should only be performed once and not by multiple jobs. Therefore, this update was moved into a dedicated job which is now a dependency of the filterentityjob instances. Change-Id: Ie8ecc49a7c6c7d41a1f1f0d18619b5e142b68204 Task-number: QTBUG-68942 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix compile warningsPaul Lemire2018-06-202-3/+3
| | | | | Change-Id: I71f1352de28383d5105c7ff887191265b509d191 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix UniformValue data size for texturesLaszlo Agocs2018-06-121-0/+9
| | | | | | Task-number: QTBUG-68759 Change-Id: I26d4db00bf58ce6061a797e415371abaee1b1202 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid locking up on Radeonv5.11.0-rc1Laszlo Agocs2018-05-041-1/+1
| | | | | | | | | Could not find a decent way to do a renderer/vendor string query due to the convoluted internals so just used a define for now. Task-number: QTBUG-67937 Change-Id: I0dcfa41377a5e430d3f7973c5aaa01535100c53c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Animation: Make a fuzzy comparison when verifying cubic rootsSvenn-Arne Dragly2018-04-241-35/+53
| | | | | | | | | | Accept cubic roots that are close enough to 0 or 1 that the difference is likely a numerical error. Also add a regression test to catch one of these corner cases. Task-number: QTBUG-67886 Change-Id: Ia05650699638e4bb7d13fa18b31d71071909bd51 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Add replacement materials examplev5.11.0-beta3Sean Harmer2018-04-042-2/+2
| | | | | | | | | | | | | | All texture assets were made by KDAB under the CLA. The material "sphere" mesh is from Allegorithmic and published under the Creative Commons 4 license. See paragraph 1.2 of https://www.allegorithmic.com/legal/substance-share Task-number: QTBUG-61415 Change-Id: I23d61723bbac561e22e11fa57105b29148c01699 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 74c06c02f896c6aba408cfd0857d317378572736)