summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* QShaderGraph: disable edges connected to disabled nodesv5.15.0-rc2v5.15.0-rc1v5.15.0Nicolas Guichard2020-04-271-0/+44
| | | | | | | | | | | | | | | | | | | | This graph failed to generate statements with enabledLayers = {"0"}: _edge0i__ function0 __edge0o__ / \ input output \_edge1i__ function1 __edge1o__/ with function0 and edge0o on layer "0" only and function1 and edge1o on layer "1" only and all other nodes and edges on all layers. The issue was that when only layer "0" is enabled, edge1i didn't get properly discarded and Kahn's algorithm didn't ever schedule input. Task-number: QTBUG-83766 Change-Id: Idb8705d487c3748153e0c4b3330b9589e827139e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* rhi: Port most of Qt3DExtras materials to RHIJean-Michaël Celerier2020-04-221-0/+2
| | | | | Change-Id: Iba20f047404b20c1e5b9bdcef917b3c2a1000d59 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* rhi: Handle RHI-required information in QShaderGraphJean-Michaël Celerier2020-04-211-1/+1
| | | | | Change-Id: I705843bbb1f6928c2e36b327469882e11fb9613e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Merge remote-tracking branch 'origin/5.14' into 5.15Antti Määttä2020-04-219-0/+564
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/renderers/opengl/graphicshelpers/submissioncontext.cpp src/plugins/renderers/opengl/graphicshelpers/submissioncontext_p.h src/plugins/renderers/opengl/renderer/renderer.cpp src/render/backend/attachmentpack_p.h src/render/frontend/qrenderaspect.cpp src/render/picking/qabstractraycaster.cpp tests/manual/manual.pro Change-Id: I617b7e34bf7e11b2921bfc15e1b99c3e81891ec7
| * Allow for when a Scene3D item switches screensAndy Shaw2020-03-139-0/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Scene3D item switches screens then it will need to be reinitalized so that the supporting contexts, offscreen surfaces are set to use the same screen and not the original one. This ensures that the item is still rendered correctly on the new screen. This includes a manual test using QQuickWidget in separate windows that enables it going from one screen to the other. This is a fresh version after the previous version was found to have a bug shown in the scene3d-loader test which has now been resolved. Change-Id: I3c711e894018db52ec00a8a5d2e0fb0128743ab1 Done-with: Antti Kokko <antti.kokko@qt.io> Fixes: QTBUG-79192 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Revert "Allow for when a Scene3D item switches screens"Paul Lemire2020-02-185-300/+0
| | | | | | | | | | | | | | | | | | This reverts commit 648b7459e8a6ce8ce1f115a14da63d546b743439. Reason for revert: Introduces QTBUG-82275 Change-Id: I5514ad58707c086eaaab3203773614c939e461e8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
| * Destroy FBOs when RenderTarget node is destroyedPaul Lemire2020-02-131-0/+42
| | | | | | | | | | | | | | | | 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>
| * Allow for when a Scene3D item switches screensAndy Shaw2020-02-075-0/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a Scene3D item switches screens then it will need to be reinitalized so that the supporting contexts, offscreen surfaces are set to use the same screen and not the original one. This ensures that the item is still rendered correctly on the new screen. This includes a manual test using QQuickWidget in separate windows that enables it going from one screen to the other. Fixes: QTBUG-79192 Change-Id: Id5bbc0d30d04ea4a945463238868b68283df0543 Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
* | Adjust number of jobs based on number of render pathsMike Krus2020-04-142-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renderer currently creates a large number of jobs, most of them doing nothing, this quickly adds up when we have lots of branches. To keep those down, we adjust the number based as estimate of branches that have work to do (no draw detection will fail if it's not the leaf node). Also make RenderViewCommandBuilder and MaterialParameterGathererJob only run if necessary (and reset instance counter on each frame). Finally, only create the right number of MaterialParameterGathererJobs for the amount of updates required. Change-Id: I2d38c72589a38445d0110fc22a472fb9482d1a03 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | bigscene-cpp: add debug overlayPaul Lemire2020-04-141-0/+3
| | | | | | | | | | Change-Id: Ie5c5bc56e194a2d31bc7217d023c9d94c3c92748 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Make bigscene-cpp multiviewportPaul Lemire2020-04-141-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | It is now testing with more than a single Framegraph branch which should allow to check how well it scales horizontally, given FG branch are processed in parallel. Increasing the number of entities only allows to check how well it scales vertically. Change-Id: Ic039a0d198cb7ae9bbe7f2d24be833a04a60d74a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add benchmark for ShaderParameterPackPaul Lemire2020-04-145-1/+136
| | | | | | | | | | Change-Id: I05e42f7fdfb6b54c30299b7e6664a48f61116b28 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Properly stop running animations when using a negative playratePaul Lemire2020-03-301-0/+108
| | | | | | | | | | | | | | | | When reaching a normalized time of 0 they would otherwise continue to run Change-Id: Idaea755d3a12f9c9da9c25732c2221e9b3f9f4c7 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add ability to dump filter statesMike Krus2020-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add button in overlay UI to dump: - the details of technique and render pass filters in the render views - the details of technique and render pass keys in the scene graph This is useful to understand why some objects are not rendered. Change-Id: I57a284081ec986e49e90c979042cc0c17ee0d1cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix crash in rendercapture-cpp manual testPaul Lemire2020-03-231-1/+1
| | | | | | | | | | Change-Id: Id4ad6552fc1a254bd9414bab63400d624e902442 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Move shadergraph to Qt3DJean-Michaël Celerier2020-03-1912-1/+3787
| | | | | | | | | | Change-Id: I3ed10747175a58513933b29eac66ddf92fe87d07 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Initial creation of RHI plug-in and refactoringJean-Michaël Celerier2020-03-164-1/+453
| | | | | | | | | | Change-Id: Ifbb51003e15f798798040597b5f7224641e8147c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Split examples so that build works without qtdeclarativeJean-Michaël Celerier2020-03-115-77/+105
| | | | | | | | | | Change-Id: I98507808b43b116b1950fd60df54704562a234ce Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Allow Qt3DWindow to choose which graphics API to use on constructionJean-Michaël Celerier2020-03-111-1/+1
| | | | | | | | | | Change-Id: Id3ff72a2eaa7f85844a546ef55dc3e1b71a14659 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge gatherer and caching jobsMike Krus2020-03-062-7/+2
| | | | | | | | | | | | | | Avoid extra thread sync just for copying data around Change-Id: Ib119115bbb3a7a8a2aa99a3e271595caecc371f7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Move common job handling out of RendererMike Krus2020-03-0612-84/+262
| | | | | | | | | | | | | | | | | | Should be done in aspect as it's independent of the backend. Moved some tests to separate test using an empty renderer as other backends are likely to have different jobs. Change-Id: I2bec0939045acea7b91ecb1622ba18bf9f5db3c6 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Add ability to dump job graph to dot fileMike Krus2020-02-141-1/+1
| | | | | | | | | | | | | | | | | | Can be triggered from the overlay API and using sending a "dump jobs" command to the aspect engine. Gets saved in the current working directory. Change-Id: I19fc94a1215187c1d7eb9d1f3b13b968939cc917 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Destroy FBOs when RenderTarget node is destroyedPaul Lemire2020-02-131-0/+42
| | | | | | | | | | | | | | | | It appears we never destroyed FBOs which lead to bugs when destroying and recreating a RenderTarget Change-Id: I507b045d9b9e1088ff49f719c8846cc43c4fc8f2 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Shader fixesPaul Lemire2020-02-131-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | - Make sure that shaders marked for destruction are un marked from destruction if recreated before having been destroyed. - When loading shaders, make sure the shader wasn't already loaded when loading it. This can happen is a shader is abandoned and then re adopted. Change-Id: I04597479d782bc6d31e4c7f78425c02c31217c7e Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Animations: handle colors as vec3 or vec4Paul Lemire2020-02-121-9/+105
| | | | | | | | | | Change-Id: If450816fadce4adad4881938ecaea9c4000afe16 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Merge "Merge remote-tracking branch '5.14' into 5.15"Mike Krus2020-02-062-7/+37
|\ \
| * | Merge remote-tracking branch '5.14' into 5.15Mike Krus2020-02-052-7/+37
| |\| | | | | | | | | | Change-Id: I76b7e29d240b89e27ef509b30cc3cd622f281fc9
| | * Fix stale Entity cachesPaul Lemire2020-01-312-12/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we mark the internal state as dirty when Entities get cleaned up. We could otherwise end up with stale caches referencing Entity's that have been cleaned up (referencing null bounding volumes ...) Change-Id: Ia2d2c67f8635e28690f33c0a7d4c9ff1de0eb471 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | tst_qresoucemanager: add test to make sure cleanup is workingPaul Lemire2020-02-061-0/+21
| | | | | | | | | | | | | | | Change-Id: I5006778b74fee6d030f65deaba86bb38a7a0a86b Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Remove QtGui module path from OpenGL related pathsMike Krus2020-02-063-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Many are moving to opengl module in qt6, will make merging easier. Change-Id: I0ad08510e6999a5d887d9197fe2cb0dc21919fb9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Move classes in OpenGL renderer plugin into an OpenGL namespacePaul Lemire2020-02-0517-210/+219
| | | | | | | | | | | | | | | Change-Id: I5314da1df7fbfd1b6db4412e7bc71231525d9de2 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | | Make the OpenGL renderer a pluginPaul Lemire2020-02-0547-158/+309
|/ / | | | | | | | | | | | | | | By default the QRenderAspect will try to load this plugin Change-Id: Ie55e207fb8e6d0b64f717bbb99699eb669eaa3f2 Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | ResourceAccessor: make it work with the modular renderer architecturePaul Lemire2020-02-031-4/+12
| | | | | | | | | | | | | | This makes Scene2D work again. Tests restored as well. Change-Id: I4082d362c999a674be2debc297d59075f4b7c9e9 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QShaderProgram: add a format propertyPaul Lemire2020-02-032-2/+111
| | | | | | | | | | | | | | | | | | Can be either GLSL (default) or SPIRV at the moment. This variable will be used by the rendering backend to know what type of shader code was provided (e.g with Vulkan, the GLSL could be internally converted to SPIRV) Change-Id: I1f9b734a675c581ef0721edc4464e466a18afbb0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Introduce a GLShader classPaul Lemire2020-02-036-357/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLShader is renderer specific shader implementation for OpenGL. Shader now contains only backend information for a QShaderProgram frontend node. - Similar to the GLTexture handling, a generic adopt/abandon manager for shaders was introduced (regardless of the actually GraphicsAPIShader class). - The renderer and renderviews were adapted to the new changes. This was the last major thing preventing the modularisation of the QRenderAspect and renderers Change-Id: If671d60928b433977e9d6e5c58199827f9408a3f Task-number: QTBUG-61151 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Add dedicated managers holder for GL ResourcesPaul Lemire2020-02-032-15/+19
| | | | | | | | | | | | | | | | | | | | | | That way NodeManagers only refers to managers holding nodes (so can be used by aspect and all renderer) and GLResourceManagers refers to renderer specific resources. Note: the Scene2D resourceaccessor was making direct access to GL resource through the managers, this has been commented and will be restored later. Change-Id: Ic32784f60eac35aab8c066d1769f078639fa25b8 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | tst_filtercompatibletechniquejob: fix unregister in case context creation failedPaul Lemire2020-02-031-1/+2
| | | | | | | | | | Change-Id: I7988ab2c918ecca694df996cc95cd9730d69a6cd Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | tst_filtercompatibletechniquejob: skip test if unable to create contextPaul Lemire2020-02-031-0/+14
| | | | | | | | | | Change-Id: I79bfa9f14518427bc1211cc48f6561906b1653ce Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Deprecate functor APIsMike Krus2020-01-3117-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Deprecate functor based APIs for buffer generators, geometry factories, texture data generators and mesh loaders While these are useful for some of Qt3D's internal mechanisms, they complicate some of the backend operations. Will delete some or make them private in Qt6. Change-Id: I64eaa338e0306647867d2084819ef8591e2c91c0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Unit tests for qschedulerPaul Lemire2020-01-283-1/+210
| | | | | | | | | | Change-Id: Iaa26160736bc6b92ecf0be767cb289d776cf46ad Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | QMouseDevice: add updateAxesContinuously propertyPaul Lemire2020-01-282-4/+114
| | | | | | | | | | | | | | | | | | | | | | The default behavior is to only update axes when one of the mouse buttons is pressed. This property, when enabled, allows to record X/Y axes value changes regardless of the state of the mouse buttons. [ChangeLog] QMouseDevice add updateAxesContinuously property Change-Id: Ib54a1e54c6c278ea08722760c2d317ec46437b2f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* | Clean up tracing codeMike Krus2020-01-271-0/+1
| | | | | | | | | | | | | | | | | | | | - Removed some old optional timing code. - Separated jobsDone into 2 parts since, on single threaded rendering mode (ie macOS), the render aspect blocks until the next vsync which confuses tracing Change-Id: Icb641e3f8079da2cb9af0416b0f7c4dc4dd36c3c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Merge remote-tracking branch 5.14 into 5.15Mike Krus2020-01-252-0/+10
|\| | | | | | | | | | | | | | | | | | | * origin/5.14: Fix usage of C++14 features Use animation rather than event to drive simulation Fix for incorrect QML property names in GeometryRenderer doc Add viewAll support for orthographic projection mode Change-Id: I397bdee907389a6f5cabb8390a805fa9a89ed4ca
| * Fix usage of C++14 featuresMike Krus2020-01-141-0/+4
| | | | | | | | | | Change-Id: Ibd460eceafdd29d7d88ac2418496dc7002de1095 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * Use animation rather than event to drive simulationMike Krus2020-01-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using events can be problematic as they contribute to flooding of the event queue leading to issues with running animations. So we now use an actual animation which runs in a loop and triggers every 1ms (rendering still vsync locked though). If animation have not been enabled for the qt build, we fall back to using events as before. Tests were changes since frame progress is no longer driven by events, so processEvents does not trigger a frame update. Change-Id: I89b11862ef432dffae0c3dfb140eedd61754697e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Fix deprecation handlingMike Krus2020-01-1419-226/+70
| | | | | | | | | | | | Change-Id: If981333f7a3d78028d4f08c59867453d4192b955 Task-number: QTBUG-81058 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Remove use of messages for RayCasterMike Krus2020-01-131-42/+13
| | | | | | | | | | Change-Id: Ibe0b38df62700608135788331adfcb7fa28159a7 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | QSortPolicy: add Uniform sorting modePaul Lemire2019-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We used to perform uniform minization between adjacent render commands all the time. Since this can yield to a higher CPU usages (but more efficient rendering submission), we now make this step optional. [ChangeLog] QSortPolicy add Uniform mode (to control whether uniform minization should be performed) Change-Id: I5c0e0dba22400a9884ee1d75426fd76b073fdcb5 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Move AspectCommandDebugger to system service, activate command executerMike Krus2019-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | - Always compile in AspectCommandDebugger and CommandExecuter - AspectCommandDebugger start when QT3D_COMMAND_SERVER_ENABLED is set - System information service becomes entry point for commands from the debugger - Added commands to enable and disable tracing Change-Id: Ic0d7fe72fa8a118a43ca348ca4284595a71827a4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | Update textures and disables in postJobsMike Krus2019-12-162-30/+1
| | | | | | | | | | | | | | | | Work was done in postFrame() in main thread anyway, so reduce amount of jobs slightly Change-Id: I8bbb3efcaf9246eb8df1033bde133bc16233f889 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>