summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add caching mechanism to ShaderBuilderPaul Lemire2020-10-284-7/+311
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a 2 level cache system: runtime and offline First we now generate a hash key based on unique features of a graph, the api it targets, the last time the graph file was modified. We then use that hash key to at runtime check whether we have already loaded a graph matching the same hash key. If that's not the case, we switch to using the offline cache and checking whether a file already exists for that shader or not. If the file exists, we load it, use the code it contains and add it to the runtime cache. If the file does not exist, we revert to actually generating the shader and we save the generated code to both the offline cache and the runtime cache. By default, the offline cache with try to write into the location reported by QStandardLocation::writableLocation(QStandardLocation::TempLocation). Optionally, the environment variable QT3D_WRITABLE_CACHE_PATH can be set with a path to a writable location. If QT3D_REBUILD_SHADER_CACHE is not empty, cache will be regenerated. Alternatively if QT3D_DISABLE_SHADER_CACHE is set, cache will be ignored. Pick-to: 5.15 Change-Id: Ia348f92ce4cdd5e63ec89e58b7954d1f127f26bb Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Make QAbstractFrontEndNodeManager privateMike Krus2020-10-2712-15/+39
| | | | | Change-Id: Ic12bc80a00e887a959c6cb27e72be0422d71b254 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Pass the raw data to the texture data extractorJuan José Casafranca2020-10-274-29/+8
| | | | | | Change-Id: If6ca151b22f442985df1ff34108ca0bd216ebf47 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 6fdf835639e56c68ae01da894c7d2b9f552dd87d)
* Fix compilation with latest QMutexLocker changedPaul Lemire2020-10-262-4/+4
| | | | | Change-Id: I0991a7df7b4c8444030bfb6a551a87ff94e7e2fa Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Update QShaderFormat matching logic to account for RHI shader snippetsMichael Brasser2020-10-231-0/+3
| | | | | | | | | OpenGLCompatibility/NoProfile should not match RHI shader snippets. Task-number: QTBUG-85018 Change-Id: Id56656c7d6d64884092595d125e8f65178e5b9f8 Pick-to: 5.15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Document how the font is used for extruded textMichael Brasser2020-10-232-0/+16
| | | | | | Pick-to: 5.15 Change-Id: Ib18adc0809948092beaad6511bfddc68f22cc459 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Expand QPaintedTextureImage documentationMichael Brasser2020-10-222-2/+17
| | | | | | | | Also make use of the newly documented pattern in the manual test. Pick-to: 5.15 Change-Id: Idefe271eea345848af3817e08ac5b45946843dad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Document the origin of extruded textMichael Brasser2020-10-212-0/+8
| | | | | | | | | Many other mesh types use the center as the origin, so be explicit that extruded text is different. Change-Id: Iab443fab7a0e3a3f0a05dfcc7f17a837f69b2ae8 Pick-to: 5.15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Trigger an update on the quick window when creating a render aspectSean Harmer2020-10-211-0/+3
| | | | | | | | | | | | | Sometimes if a scene is large there is a timing issue that prevents Qt Quick from knowing it needs to do an update. When creating a new RenderAspect give the QQuickWindow a nudge to force an update. Pick-to: 5.15 Change-Id: Id0bd597ac8845ec5d9c89c7aa00ad57ae6b0056d Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Render enough frames to flush the Qt3D pipeline when dirtySean Harmer2020-10-212-4/+19
| | | | | | | | | | | | Sometimes Qt3D needs 2 frames if it involves introspecting and then compiling shaders. So render at least this many frames when needed. The change in formatting is pushed upon us by the clang-format use in the pre-commit hook. Pick-to: 5.15 Change-Id: Ie9f48876351a8d1a7bd0df705a9e43831753ac69 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* CMake: Make optional components that are not found more quietAlexandru Croitor2020-10-201-4/+4
| | | | | | | | Doesn't display a big stack trace warning, instead just saying that the component was not found. Change-Id: I07780f34c865b854573e8acd5399a7a9253d7ff3 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* CMake: Regenerate examples to use qt_add_executableAlexandru Croitor2020-10-2032-32/+32
| | | | | | Task-number: QTBUG-87661 Change-Id: I594521a2b9aada164d684b8ef6ce71c730bfb64a Reviewed-by: Mike Krus <mike.krus@kdab.com>
* RHI: fix face index for texture uploadPaul Lemire2020-10-201-1/+1
| | | | | | | | | Needs to be an index between 0 - 5 and not the GL enum value. Fixes crash when QAbstractTexture::updateData is called. Other code paths that use Texture Images already had that fix in. Change-Id: I2390d71e23d8d481e3d212942dd11a4fd31958ef Reviewed-by: Mike Krus <mike.krus@kdab.com>
* RHI: add warnings when pipeline resource bindings mismatchPaul Lemire2020-10-201-1/+31
| | | | | | | | | | | | | We use introspection to generate the resource layout of the RHI pipelines. However, at runtime, we build the resource binding set based on what was provided for the material. In case, some parameters are not provided (typically samplers), the RHI backends might complain. Therefore we add a warning about which parameter is missing to help users diagnose the issue (except for the envlight uniform samplers which are automatically set by Qt3D). Change-Id: I0b8ea8ff1691a8603342d6f3c2c12134985e805f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Port instanced-arrays-qml to RHIPaul Lemire2020-10-197-17/+138
| | | | | Change-Id: I272cfa7688260f4ffb6b8ff49012188f717f62f4 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* CMake: Regenerate qt3d examplesAlexandru Croitor2020-10-1630-8/+504
| | | | | | | | | | | | Many of the examples were missing find_package() calls. Some were missing some example install dir things. Some missing special cases. Some incorrectly specified library names due to missing mappings in pro2cmake. Some incorrectly specified target names. Change-Id: I131a02dc679502ea6c1cdeb32962e77f09e672af Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add changes file for Qt 5.12.10Antti Kokko2020-10-161-0/+41
| | | | | | | Change-Id: I648bb37f0d4d800543812330d163da615b835ccc Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit c9d86b593e62c880d567a0672bd86283d8242f15) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid multiple animation updatesMike Krus2020-10-161-3/+6
| | | | | | | | | Check that the handle is not already in the lists. Avoids doing the same updates several times in the Pick-to: 5.15 Change-Id: I385b150de23a2ae7f2274c7d7350a065bb0c34f5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update dependencies on 'dev' in qt/qt3dJani Heikkinen2020-10-151-3/+3
| | | | | | | | Use dependency shas from Qt 6.0 Beta1 Change-Id: Ic04351dcc847f6d81ffe96f38e7b309f9944fd57 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* CMake: Honor INSTALL_EXAMPLESDIRJoerg Bornemann2020-10-1325-25/+125
| | | | | | | | | | | Re-generate examples, but only the chunks that handle INSTALL_EXAMPLESDIR, because there have been so many manual changes that were not special-cased. Fixes: QTBUG-87331 Change-Id: I0926c015ce2733b462adba18e3dbf47621a7e679 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Christophe Giboudeaux <christophe@krop.fr>
* Update dependencies on 'dev' in qt/qt3dQt Submodule Update Bot2020-10-101-3/+3
| | | | | Change-Id: Ic48cd5908e1bf73f96d8aaf3837264d54ca85794 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Adapt to platform API renameMike Krus2020-10-101-1/+1
| | | | | | | Task-number: QTBUG-87314 Change-Id: I0b0321a7a592ca4350cffcd5e2aaf3441cbf4735 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename test targets conflicting with qtbase onesKai Koehne2020-10-082-1/+23
| | | | | | Task-number: QTBUG-87217 Change-Id: I2c6f2e0af475d03baa74799a61d70c603fd2ce85 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Disable usage of CMake API compatibility wrappersAlexandru Croitor2020-10-071-0/+5
| | | | | | | | | | Setting the QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS variable in the project ensures we ported away from old API calls. Task-number: QTBUG-86815 Change-Id: I0be16a3ab0e83da4cc9ee11dc9a9b7572fccea97 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use internal CMake APIMike Krus2020-10-07363-574/+574
| | | | | | Task-number: QTBUG-86815 Change-Id: I7a8755571c8977be1f16b2287e5a8055e9016ee5 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependencies on 'dev' in qt/qt3dQt Submodule Update Bot2020-10-071-3/+3
| | | | | Change-Id: Ib20ce48f092fc380585fc6e08c8e832ab0a55d6a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix QtQml integration for basic typesMike Krus2020-10-074-292/+937
| | | | | | | | | | | | Adds registration for QVector2D, QVector3D, QVector4D, QQuaternion, QMatrix4x4 and QColor types so that QML API can be used without requiring to import QtQuick. Replaces old private API with registered extension classes. Change-Id: Id5e98175c986bf125e4c3c9476a09e438793bad2 Task-number: QTBUG-87184 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* RenderView: remove warning about no CameraSelector being setPaul Lemire2020-10-071-2/+0
| | | | | | | | | | | | It is after all valid in some cases to not have a CameraSelector (simply clearing the screen, blitting, rendering directly in normalized coordiates ...). While the warning might be useful for beginners, it results in the console being flooded with warnings when one of the above listed valid cases is performed. Change-Id: Id26625f35519f7afd405384289db5c4a11b95465 Pick-to: 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* QFrameGraphNodePrivate: add private exportPaul Lemire2020-10-051-1/+2
| | | | | | Pick-to: 5.15 Change-Id: I7dbff87a1b7a00d4fb6d7b558c38fa6fe5d2cdd5 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Android: rename Android's package name for Qt 6Assam Boudjelthia2020-10-031-2/+2
| | | | | | | | | Rename Android package name org.qtproject.qt5.android to org.qtproject.qt.android to avoid inconsistency with Qt 6 name. Task-number: QTBUG-86969 Change-Id: Ife5db0d7272473872231a9f3cf94171dea95945a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make DebugOverlay accessible from QMLMichael Brasser2020-10-023-0/+33
| | | | | | | | Register and document QDebugOverlay. Change-Id: I357918ce3448c451d796f88656ec287bf03ffcfd Reviewed-by: Mike Krus <mike.krus@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix OpenGL ES 3 shaders for QDebugOverlayMichael Brasser2020-10-021-3/+5
| | | | | | Change-Id: I72185e825d20aad7c05e4870074831efa199972d Pick-to: 5.15 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix the assimp scene parser clausev6.0.0-alpha1Sean Harmer2020-10-011-1/+1
| | | | | | | | So that it actually gets disabled whwn specifying -no-assimp. Pick-to: 5.15 Change-Id: I23c166ef977103f2893c8df721a29d8d147badde Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix a crash when node is added and destroyed immediatelySean Harmer2020-10-012-0/+52
| | | | | | | | | | | | | | When a node is added to the scene it is scheduled for a post-creation initialization. However, if the node is destroyed before this post-creation queue has been processed we will crash. This commit ensures that the node being deleted is removed from the post-creation queue. Usually the queue will be empty and so this should not add a performance penalty. Pick-to: 5.15 Change-Id: Ibe4289e1e54cdb145f8588f15dc4ad894e427582 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Only set the format to 1.0 if it was not changed due to OpenGLAndy Shaw2020-09-301-1/+1
| | | | | | | | | | | | | Since the userRequestedApi variable can be set when a second Qt3DWindow is created (since the environment variable is set after the first time). Then we should be sure to only set the format version to 1.0 if it was not already set due to OpenGL being used. Pick-to: 5.15 Fixes: QTBUG-86436 Change-Id: Ib68f5f1f7f8651c1f20b66060fead7f3dcfb97e0 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Only use surfaceSize if m_surfaceSize is not validAndy Shaw2020-09-301-1/+1
| | | | | | | | | | | This amends 2e3607aa120324f60832ca1cd42aaeaf22cc148d which made it always use surfaceSize. But if m_surfaceSize->size() is valid then this should be used as it will account for HighDPI setups. Fixes: QTBUG-86721 Change-Id: I634b6c3257ac2dcf8042acbbeb999960f68bb266 Pick-to: 5.15 5.12 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Update dependencies on 'dev' in qt/qt3dQt Submodule Update Bot2020-09-291-3/+3
| | | | | Change-Id: I8d8a981514926c3dbcd78bdf9b27455f6a4d3557 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update qml dependencie and adjust value providersPaul Lemire2020-09-282-213/+101
| | | | | Change-Id: I6dad0a179aacc3ec3a0ed6e43b92c589554deb5c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add missing QSequentialIterable headerPaul Lemire2020-09-281-0/+1
| | | | | | Change-Id: I58693eeeba78be65ff5f112d377480ecd6216a15 Task-number: QTBUG-87002 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Allow to specify a functor to extract data from QTextureImageDataJuan Casafranca2020-09-284-0/+37
| | | | | Change-Id: Idd052f6c24665a1accd2cd681c80fe74846e5c39 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Allow to set alignment requirement for an imageJuan Casafranca2020-09-285-6/+33
| | | | | Change-Id: Ifffbfd80a3d99b43e348e12bea62e3c90eed80c4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix animation not runningMike Krus2020-09-256-29/+30
| | | | | | | | Previous fix for compile issue forgot to account for the fact that the data changes after being registered with the class. Change-Id: Ice5238221f190f758ec3f25d883c56877c185e1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Update frontend data after jobMike Krus2020-09-251-0/+7
| | | | | | | | | | | Data computed by the core aspect needs to be available for the render aspect when it runs. This forces the update to the front node from the job thread which should be save currently since the main thread is blocked, there's no other core aspect jobs running, and the render aspect job depends on this one. Change-Id: I9483066d272eec02456f9c02f8e4a34acad35e0b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Doc: Add Qt 6 changes filePaul Wicking2020-09-242-0/+47
| | | | | | Task-number: QTBUG-84051 Change-Id: Ic7b798b13596d376bdcf52b2a6d17672ee20698d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Only release context if we own itMike Krus2020-09-231-1/+2
| | | | | | | | | | Otherwise we release the context that is owned by the QtQuick rendering engine which leads to assert failures and crashes in the single threaded case. Change-Id: I5f5e03bbe43a0990a29d41b2fc96e714668d85fc Pick-to: 5.15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add QNodePrivate::registerDestructionHelper for std::vector containersPaul Lemire2020-09-232-9/+201
| | | | | | | | | Ideally should support generic containers but clang seems to fail to generate the symbol on the mac. Change-Id: Ic1d6d815ab9aff60a97b3b0047228f55d7efe158 Pick-to: 5.15 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Update QML type providers following recent changesPaul Lemire2020-09-212-173/+1
| | | | | Change-Id: I8a976e25dc3123f1665e09c75fb3ad81d28d7c68 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* RenderCommands: try to resolve API shader at command build timePaul Lemire2020-09-182-5/+31
| | | | | | | | | | | | This ensures that if a commands keeps being rebuilt, it will be usage for the current frame, assuming the shader exists. This aligns the RHI renderer with what the GL renderer does. The instanced-arrays-qml is a good way to verify that a command that keeps being rebuilt is rendered correctly. Change-Id: Ie9e574e98efeec6eb836af613d28cbf4cdf2fef5 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* RHI renderer: begin frame and submit even if we have no commandsPaul Lemire2020-09-181-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We still need to upload textures/buffers which might be needed later on even if we have no draw calles to perform. This fixes the following case: Frame 1: A buffer is created, no command generated -> buffer data transfer not performed but still recorded in the RHI command buffer Frame 2: buffer is reallocated (we orphan, destroy the old rhi buffer and create a new one with the new size as we cannot resize rhi buffers). This time, we have commands, so we perform data transfer but in this case, we may crash as we have since destroyed the RHI buffer from Frame 1, yet we still have in the command buffer the data transfer command for the old rhi buffer (we have no way of removing commands once they have been inserted in the command buffer). With this patch, the data transfer command would get performed at Frame 1 even if we have nothing to draw, ensuring we have no left over transfer commands when reaching Frame 2. Change-Id: I48357633f6c2ee727fb74b4fd81af86e5bad68a6 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* evaluateClipAtLocalTime: prevent negative indices for keyframes lookupPaul Lemire2020-09-181-1/+1
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: I811c1a7334674d670f42eb46195e2e0e23b690f3 Reviewed-by: Mike Krus <mike.krus@kdab.com>