summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/tqtc/lts-5.15.4' into ↵v5.15.4-lts-lgpl5.15Tarja Sundqvist2022-04-072-2/+2
|\ | | | | | | | | | | tqtc/lts-5.15-opensource Change-Id: I5e53a0ce3558d6cca7f2a63f0ef43c2e1041b8b6
| * Restore ObjectLevelLockingPolicy on ShaderManagerPaul Lemire2021-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We are hitting a race condition otherwise. This is likely due to the fact that removing the shaders is done only once we have unloaded them from the graphics API which technically could happen in a separate thread than the scenegraph thread when running with Scene3D. Change-Id: Ic914f3b305bf807081294a90250413a5d263f124 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit a536039d102f911677e5efec03cc6f3d701aceac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Bump versionJani Heikkinen2021-03-031-1/+1
| | | | | | | | Change-Id: I9b0179a127d6ff17d9739c755ae6c613aa11b6c6
* | Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-231563-31114/+31114
|/ | | | | | | | | | | This reverts commit 03e5f60e585701608c1181365faee484d7a1f14c. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I359e89ed77b1b2750607617d138ebb6c316f0296 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix light uniforms not properly being updatedPaul Lemire2021-02-032-1/+8
| | | | | | | | | | | | | | | | | | | - We cache commands and only rebuild them when really needed. When we rebuild then, we also store the mapping between uniform location and parameter name - When reusing a command, we only update the uniform values but expect the mapping between to remain the same. - When dealing with lights however, we can end up in a case where the light type changes, and therefore so does the shader data associated. The command remains cached as nothing really requires a rebuid. Yet, this means we could have more or less parameters than the number of mappings we have stored previously if the shader data defines more or less properties. To account for this, we now rebuild the mapping when building the command or if the number of parameters in the parameter pack is different than at the previous frame. Change-Id: I9400fc7e5bcb4b97ac9da69cdf794010cf81103b Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit a7f627b29b2792154bc2a45f31bd32b74fd508b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update commercial license headersTarja Sundqvist2021-02-021563-31114/+31114
| | | | | | | | | | | | | | | | Updated header.COMM to the files in tqtc-qt3d. Examples, documentation files or tests are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reason for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4155 Change-Id: I139c8ad72c042b0900239decc36cfed4bc1c4951 Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
* Fix parameter priorization documentationAntti Määttä2021-01-185-21/+30
| | | | | | | | | Fixes: QTBUG-64110 Change-Id: I09330ba29b0c120d6e7e0ae0b2bf8d4e388054e1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 9c6563c780eef3890c83b82ebbb0ebf271fb6897) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qpicktriangleevent_p.h Add missing private API warningPaul Lemire2021-01-041-0/+11
| | | | | | | Change-Id: I57f758f279d62ee4508914d12f99ee68cd41a2c7 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 45dfb8a03f4ee2abb963ce3726eaef0dd1c2c521) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix sampler2DArrayShadow uniform in QShaderGeneratorJim Albamont2020-12-282-2/+2
| | | | | | | | Also update the test Change-Id: I23d897f40747192687e632d21aa8fe2f57645909 Pick-to: 6.0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Print warning about using primitive restart on ES2Mike Krus2020-12-221-0/+5
| | | | | | | Change-Id: I6007f1e152e38948b619cdeada84a86f7f4db4e4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 492c976b05256b29aac0df861c4be77e1eb65906) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow assimp to compile on non-gcc compilersJoni Poikelin2020-12-111-1/+1
| | | | | | | | | | | | Gcc 4 version check can also be dropped since it is not supported anymore. Fixes: QTBUG-88821 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit c6716fa7f044985389038802a296bae83951b119) Change-Id: Ice522afc92823156e9545e8e75b16c2c0a614d6f Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix binding of CubeMapArray texturesJim Albamont2020-12-114-6/+113
| | | | | | | | | | | | | | | To bind to a specific face: use glFramebufferTextureLayer and calculate the layer as 6 * layer + face. To bind to a specific cubemap: There is no way in OpenGL to directly bind to an entire cubemap within the array. Instead bind to the entire texture as for a CubeMap with AllFaces. It is up to the drawing code to select the right cubemap and face, 6 * layer + face Change-Id: Ib9e1a598503eeba1fa729677944aba6d799f90b2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 94ab90f93dc5338338f30e6d78854b55353d3cb8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix disabling shader cache via environment variableJim Albamont2020-12-092-1/+3
| | | | | | | | | | | The tests were a broken too because the QT3D_DISABLE_SHADER_CACHE environment var was still set from the previous test. These tests passed before because the shader builder used the cache if either the QT3D_DISABLE_SHADER_CACHE or QT3D_REBUILD_SHADER_CACHE are not set. Change-Id: Ic04bf3bb8bb7b9b27e3dc9663fe5e96647a3bed4 Pick-to: dev 6.0 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QShaderProgramBuilder: add documentation related to cachingPaul Lemire2020-12-071-0/+32
| | | | | | | Change-Id: Icdab60d721a0a5186fe3e8844f40e2e448eb94d5 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit cf8688e0ab17f83ad2909431bfae7be209ba7155) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* OpenGL renderer: fix use of outdated VAO when shader is reloadedPaul Lemire2020-12-013-7/+27
| | | | | | | | | | | | | | | | In a case where an existing shader was updated, VAO previously associated with the shader wouldn't be updated properly. To account for this, we now release all VAOs associated with a shader when loading a shader. Additionally we also skip VAO creation of commands referencing a shader that was loaded in the current frame. The reason for that is we know the command for that VAO is not completed. Qt3D requires a first frame to load a shader + perform introspection and creates valid command against shader only on the following frame. Change-Id: I36f89fdd78e857dc5bc4af3b539d3b32630dfad6 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 7f1bcdb799ad689fc138f976eed7e12f1ce64386)
* SyncRenderViewPreCommandUpdate: fix a few odd casesPaul Lemire2020-12-011-10/+8
| | | | | | | | | | | | | | | | | - We need to perform frustum culling even if camera hasn't moved as entities in the scene could still be moving - We shouldn't return early if there's nothing to draw/or filter. Given we keep 2 sets of render command buffers we flip between every frame, we still need to update the command indices on bufferA, so that bufferB get initialized with values from bufferA at the end of the frame ... Otherwise in the case where at frame N (bufA) we have a visible object and at frame N+1 (bufB), that object is culled object. If we return early, bufB would never gets updated to contain 0 command indices. We would then end up flickering between visible and non visible object. Change-Id: I248c54b89a3795fa69c23ea952424c68696313e1 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit b76e9b0eccdd49a539e213a91bcaecbd98efbd74)
* Only set the state flag after having merged with the other statesPaul Lemire2020-12-011-1/+1
| | | | | | Change-Id: Ic7a0a2cccb2b131eec7fca3cf7324109b4d22b6b Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 6df7098d89cf4a2eec35fe1362d354c91eb7a4ef)
* Introduce QGeometryRendererPrivate::sortIndexMike Krus2020-11-226-1/+40
| | | | | | | | Lets user override the sorting order of entities. Change-Id: Iab7fd0d705f7ddcb424a59f86f8c2c28059813d1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> (cherry picked from commit c6aec09f4f6030fa11b9ba911e4c0df2fe7485b2)
* Add mipmaps count to QAbstracTexturePrivateJuan José Casafranca2020-11-053-0/+3
| | | | | | | Change-Id: Iaec05eb3d7d8647af14d2e155673dd25c3dae994 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 0fa4099b4fde67e381564509e17892965c53b779) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Scene3DItem: release frontend/backend tree on destructionPaul Lemire2020-11-051-3/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | We fully release the AspectEngine when the last of the threads between main/sg thread is destroyed. We do it that way as the destruction order of the threads is non deterministic and we can only destroy the AspectEngine after it has been shut down from the SGThread. However, that can lead to the Entity tree to never be properly released/cleaned up in the case where the main thread is destroyed before the render thread. To account for that, we now release the root entity when the AspectEngineDestroyer allowRelease is called in the context of the main thread. That way, even if the AspectEngine is fully destroyed later once SG thread exits(), the scene tree is still cleaned up while we have an event loop. Special handling is done for that behavior not to happen in the case Scene3D is rendered from with a QQuickRenderControl. This should fix asserts or crash observed when using Scene2D within a Scene3D scene. Change-Id: I77edff567d60e53a61023f88b551fc475885e5eb Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix GLTexture cleanupPaul Lemire2020-11-054-1/+133
| | | | | | | | | | The GLTexture class wasn't registered for cleanup on the manager. This could result in it being reuse while not being reinitialized resulting in incorrect rendering. Change-Id: I85e6a5c3b5ca9d3cfa5ac5bcb1db3695dabfa576 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit dbf5da312ae3f406cc45a80c6ab2464b6e2d1e14)
* Check if texture upload is full sizedJuan Casafranca2020-11-031-6/+23
| | | | | | | | | | This allows to upload full sized compressed textures which was not working before if using the TextureDataUpdate API Change-Id: Ic87e99e60e56d5a10550ca8efdc4f75a7ae1f0b1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit c7c84944d7111b837544e22fe5a0a4fe2a150aeb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Handle invalid entity names in QSceneLoader::componentMichael Brasser2020-11-022-0/+9
| | | | | | | | | Return nullptr rather than crashing. Change-Id: Ie11fe798e0bcd3bfdfda053331eabf9ed16e3d94 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 59387766853e64e70efb911772ea5dfe04ff5aad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add dedicated Qt3D.Renderer.ShaderCache logging categoryPaul Lemire2020-11-023-6/+17
| | | | | | | | | | Might come in handy to troubleshoot issues with the ShaderBuilder caching of generated shaders. Change-Id: I2ccb68608857fa86ff20cb95047d38497df4b3ad Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 2f4a55e833c970b5bb72f2208ed7b2517324f5ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add caching mechanism to ShaderBuilderPaul Lemire2020-11-024-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. Change-Id: Ia348f92ce4cdd5e63ec89e58b7954d1f127f26bb Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 17324467897e25bfc1abef0db540b0690c04a55e)
* Bump versionJani Heikkinen2020-10-271-1/+1
| | | | Change-Id: I4511ab11603fce087be4fa010b510f7d4c886d29
* Document how the font is used for extruded textMichael Brasser2020-10-232-0/+16
| | | | | | | Change-Id: Ib18adc0809948092beaad6511bfddc68f22cc459 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 4ab96961366a8486deed675b27cfbe243ffa2363) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit f852aa731e3fdc79a4045425bc424fbbd3a4e50a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Expand QPaintedTextureImage documentationMichael Brasser2020-10-222-2/+17
| | | | | | | | | Also make use of the newly documented pattern in the manual test. Change-Id: Idefe271eea345848af3817e08ac5b45946843dad Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 3d2d67b571b0f6ed3df1c0d3eeed1e89097bef57) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 41e457cbee41af546f964885e289dab8c9ac99de) 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 Change-Id: I385b150de23a2ae7f2274c7d7350a065bb0c34f5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 60a9f2f0a4a6e7aa756f3fa8a6961855081a3ed5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit fea70a042dd22f8f7762caab50716f52db4badd3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFrameGraphNodePrivate: add private exportPaul Lemire2020-10-051-1/+2
| | | | | | | Change-Id: I7dbff87a1b7a00d4fb6d7b558c38fa6fe5d2cdd5 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 6deb2eea100bf71fc96d6f79b35db5ec67564234) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix a crash when node is added and destroyed immediatelySean Harmer2020-10-052-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. Change-Id: Ibe4289e1e54cdb145f8588f15dc4ad894e427582 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 0a533673b5450d49725d23e08ac13b03fad564fb)
* Fix OpenGL ES 3 shaders for QDebugOverlayMichael Brasser2020-10-021-3/+5
| | | | | | | Change-Id: I72185e825d20aad7c05e4870074831efa199972d Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit dc430c9439ec18fd554c039464ea79db87d0fe44) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Set upload options for compressed texturesJuan José Casafranca2020-10-021-1/+1
| | | | | Change-Id: Icac2b16cfdb3ea98f1b85df397d83a8493bb60ad Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Pass the raw data to the texture data extractorJuan José Casafranca2020-10-022-4/+5
| | | | | Change-Id: If6ca151b22f442985df1ff34108ca0bd216ebf47 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix the assimp scene parser clauseSean Harmer2020-10-011-1/+1
| | | | | | | | | So that it actually gets disabled whwn specifying -no-assimp. Change-Id: I23c166ef977103f2893c8df721a29d8d147badde Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 3166eed9ec9883cb0df5ecc4fbeae68760bb5a58) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Ensure Scene3D re-renders when a backend node is updatedSean Harmer2020-10-013-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two ways in which backend nodes can receive changes from the frontend: 1) By syncing the state directly from the frontend nodes 2) By changs delivered by the change arbiter Scene3D is already equipped to deal with changes going via the first mechanism. However, it is possible for changes going via the second mechanism to not trigger a re-render of a Scene3D item using the OnDemand render mode. This is even true in the case of using a Scene3D inside of a QQuickWidget even though this disables the threaded Qt Quick 2 rendering. The way this manifests is that: * A change is made via mechanism 2) such as creating some new nodes. * The frontend changes trigger a re-render of the Scene3D item via the existing notification mechanism (connection to the change arbiter's receivedChange() signal. * The QQuickWidget uses a timerEvent() to trigger a possible update * This notices the Scene3D is dirty and causes it to render and mark its state as clean. This does not yet pick up the newly created frontend nodes though as they need to go through the deferred post creation init dance. * The change arbiter then processes the deferred node creation events and creates the backend nodes. * At the next timerEvent from the QQuickWidget it still sees that the Scene3D is clean and does not bother to re-render it. This change fixes this by adding a new signal to the change arbiter, syncedChanges() that gets emitted only when the arbiter has actually finished distributing the changes going via mechanism 2) to the backend nodes. This syncedChhanges() signal is emitted on the aspect thread and so Scene3DItem connects to this using a queued connection. This then ensures that once the new backend nodes are actually present and up to date that the Scene3D in OnDemand mode will then re-render the scene with the complete scene graph. Change-Id: I3246f34a3cfe15392a390eb6d97b4e90346288a6 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. Fixes: QTBUG-86436 Change-Id: Ib68f5f1f7f8651c1f20b66060fead7f3dcfb97e0 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 5a4a8e4f6644bc1d1cbfb1b0c96b096d6d4a9a5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 010d2456d8bc02d1c8ce8e0f16f0ecd59ac08803) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow to specify a functor to extract data from QTextureImageDataJuan Casafranca2020-09-282-0/+16
| | | | | Change-Id: Idd052f6c24665a1accd2cd681c80fe74846e5c39 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Allow to set alignment requirement for an imageJuan Casafranca2020-09-283-6/+10
| | | | | Change-Id: Ifffbfd80a3d99b43e348e12bea62e3c90eed80c4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Bump versionJani Heikkinen2020-09-281-1/+1
| | | | Change-Id: I4831a4920683c2fff8dce7083b8848392bb8362a
* Add QNodePrivate::registerDestructionHelper for std::vector containersPaul Lemire2020-09-242-9/+209
| | | | | | | | | Ideally should support generic containers but clang seems to fail to generate the symbol on the mac. Change-Id: Ic1d6d815ab9aff60a97b3b0047228f55d7efe158 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 5a33b94b348e5c65155b526e7746d9fe45560959)
* 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 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit 2e627f8ce77e5c184742234416da88e6393fd2c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* evaluateClipAtLocalTime: prevent negative indices for keyframes lookupPaul Lemire2020-09-181-1/+1
| | | | | | | Change-Id: I811c1a7334674d670f42eb46195e2e0e23b690f3 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 0731f8b336a6792e344dfefad8b7e9c79afac2d2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QShaderGenerator: add a #define LAYER_name for each layerPaul Lemire2020-09-182-0/+48
| | | | | | | | | | This will make it more convenient to insert conditional code based on whether a layer is defined or not. Change-Id: Ia72b569f022dd2ee723bf2493710eab709042639 Reviewed-by: Mike Krus <mike.krus@kdab.com> (cherry picked from commit 7889cf1c6f9790391690ce31f391529b2dd8230e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove the unneeded QScene2D qualifier for the renderPolicy propertyAndy Shaw2020-09-171-1/+1
| | | | | | | | | | | By removing it, it will ensure that it is able to read it correctly when used in QML, so doing Scene2D.SingleShot will be picked up as a valid value. Change-Id: Ibddf2d73ba19ce34ea252794ebd9a0937a6d2d20 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> (cherry picked from commit d8c81e191c13cc44dc444f41b412cdeb82675122) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation error with -no-avx2Laurent Rineau2020-08-312-4/+4
| | | | | | | Change-Id: I1aa49328226d5e3f1da4bd86704c7fad44da6ad9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit d41b639cc46e5d76aa7f779e6ef37bfd4e6c2e72) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>