summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Make sure destroyed OpenGL context is no longer usedv5.8.0-rc1Miikka Heikkinen2016-12-164-0/+25
| | | | | | | | | | | | Listen to QOpenGLContext::aboutToBeDestroyed() signal in classes that do cleanup related to OpenGL context to disallow its use after its destruction. Task-number: QTBUG-57578 Change-Id: I580e737da7b0c9167dc3cfd65514f2b3f689bb62 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Fredrik Orderud <forderud@gmail.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Only pass static metaobjects around and fix EntityLoaderPaul Lemire2016-12-1612-5/+427
| | | | | | | | | | | | | | - Ensure the notification changes only pass in static metaobjects. - Make the EntityLoader use the AsynchronousIfNested incubation mode to avoid cases where we could destroy something still being incubated - Add a manual test to test this cases This fixes the crashes occurring when using NodeInstantiators and EntityLoaders as delegates. Change-Id: I104c60b4be34cfb843a74dd09a8b96fdac44657d Task-number: QTBUG-57655 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add changes file for 5.8.0Antti Kokko2016-12-141-0/+51
| | | | | Change-Id: I27724f6108936aadb93ceee4bd526f0bfedc0950 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* Ensure offscreen surface used during cleanup is created on gui threadSean Harmer2016-12-1410-8/+245
| | | | | | | | | | | | Windows uses a QWindow to back QOffscreenSurface so we must needs create it on the gui thread. To complicate matters we don't know the format used by Qt 3D until the Renderer is initialized. So we have to defer creation of the offscreen surface until that time and do it in the gui thread with the correct format. Task-number: QTBUG-57496 Change-Id: Idaad23c2229ab069f3e02c8d075be8e6718a8a50 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a new job type entryPaul Lemire2016-12-141-1/+2
| | | | | | Task-number: QTBUG-57509 Change-Id: I40f2bf58e8faff1639c79a152974c60a1c0d99bb Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Properly order texture jobsPaul Lemire2016-12-145-1/+25
| | | | | | | | | | | | | | | 1) Load all the texture data 2) Sync 3) Look for dirty textures We want to wait for textures to have been loaded to look for the dirty textures otherwise the texture may not be ready and we would render some invalid texture. Task-number: QTBUG-56466 Task-number: QTBUG-57509 Change-Id: I2326f81bfe51dcdc753ff4eba150ce4cfae1635f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Textures: properly abandon and release texture dataPaul Lemire2016-12-148-13/+77
| | | | | | | | | | | | | | When a texture is destroyed it now properly destroys the GLTexture if the GLTexture was not being shared. Also, when a GLTexture is created but the texture image data for its content already existed, make sure we still request the data to be uploaded. This happens since functors can be shared, in which case the image data isn't reloaded and therefore doesn't call texture->requestUpload() implicitly. Task-number: QTBUG-57595 Change-Id: Id8f437ff64eea39be75ebb1a548516b29932e23e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix hover support in QObjectPickerMike Krus2016-12-142-29/+6
| | | | | | | | | | | Remove early termination test (looking to avoid doing picking on mouse move) as it breaks hover support. Need to more thorough test later Change-Id: Ia65803f921a63765d56d44620bdae2155ef0666e Task-number: QTBUG-57592 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Also fix other problems with the trianglevisitorAntti Määttä2016-12-101-11/+12
| | | | | | | | Indexed triangle strips have wrong index passed to visit. Triangle fans do not set the first index and traverse incorrectly. Change-Id: I75971d485edaf1660dd1531d733702283f673e9b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix indices passed to TriangleVisitorAntti Määttä2016-12-101-17/+17
| | | | | | | | | TriangleVisitor traverse functions incorrectly pass indices offset by vertex stride to visit function. Task-number: QTBUG-56989 Change-Id: I7617953377d3cef72f887cfc732140f1b3db192f Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Work around QML -> C++ float to int conversionSean Harmer2016-12-103-1/+13
| | | | | | | | | | | | | | | | | | | | QML converts values of reals that have zero fractional parts e.g. 2.0 to integers when passing them to C++. This can result in Qt 3D and the Uniform class passing these to uniform floats in GLSL by reinterpret_casting the integer to a float which results in a garbage value in the shader which in turn leads to very difficult to debug shader issues. This commit handles this particular case (in a hacky way) for the Qt 5.8.0 release. We need to find a more fully featured solution for converting Uniform's to the correct introspected GLSL types. This will require being in position of the introspected shader interface when building the RenderViews. This is too large of a change to do in time for the 5.8.0 release. Hence this work around solution for now. Task-number: QTBUG-57510 Change-Id: I6631879fff8259a32960e461bad4c692ca630220 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix texture data upload timingSean Harmer2016-12-104-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Following the texture refactoring, textures are correctly uploaded at application startup. However if the content of texture data is later changed, e.g. by changing source property of a TextureImage, this is never made available to the GPU. Tracing this through, the texture image data generator is correctly executed but it seems the OpenGL submission thread tries to upload the data before the new data is made available to the TextureDataManager. The subsequent clearing of the dirty flag means it never gets uploaded. To fix this the TextureData dirty flag in GLTexture has been re-purposed to mean that the generators have been executed and the data is ready and available for upload. This flag was actually redundant for the purpose of scheduling the generators to be executed as that is handled directly by the texture data manager and GLTexture. With this commit, the upload is never attempted until after the texture image data is ready and we see textures behaving correctly once again. Task-number: QTBUG-57509 Change-Id: I662c8d17e17283a2a3be5afbf61289ec2405d4fc Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Fix warnings about unregistered metatypesSean Harmer2016-12-082-0/+5
| | | | | | Task-number: QTBUG-57495 Change-Id: Ia1dc858d3c6c223498cec3644dcd8d35b7181630 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Ensure GL resources are released at renderer shutdownSean Harmer2016-12-081-5/+26
| | | | | | | | | Also taking care to handle Scene3D case where releaseGraphisResources() may get called more than once. Task-number: QTBUG-57496 Change-Id: I987a372ddfeb026c95a6b50a885c57687d294a00 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* RenderCapture: register with version 2.1Paul Lemire2016-12-073-4/+4
| | | | | | | To clearly identify this was added in 5.8 and not part of 5.7 Change-Id: Ifd713efa34f0092c250eae58260fab71865bb49e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Handle Android assetsBogDan Vatra2016-12-071-1/+5
| | | | | | | Allow the user to load textures from Android's assets Change-Id: Ia6cb67419345c0120f9a8af3c22bdce22b02c930 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add plumbing and process AxisAccumulators each frameSean Harmer2016-12-0720-5/+529
| | | | | Change-Id: I91a0f9384c7ef2ba642db1a2becdba1d2e374d87 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Export AxisAccumulator to QMLSean Harmer2016-12-071-0/+2
| | | | | Change-Id: I5d351b89d78846a9654674ec52a783c947c5f4c4 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* QAxisAccumulaor should be a componentSean Harmer2016-12-073-7/+7
| | | | | | | | So that it can be aggregated by entities to accumlate axis values which is behavior implemented on the backend. Change-Id: Idd7a1a2c1e3f7e73c3c83023ebad9b3e85f31a5d Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Add backend class for AxisAccumulator and testsSean Harmer2016-12-076-3/+424
| | | | | Change-Id: I2d6071c11054eff7d5a574ce3a3dba54dd9bad12 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-2866-1472/+3025
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/input/backend/updateaxisactionjob.cpp src/render/renderstates/qalphacoverage.cpp src/render/renderstates/qclipplane.cpp src/render/renderstates/qdithering.cpp src/render/renderstates/qseamlesscubemap.cpp src/render/renderstates/qstenciltest.cpp Change-Id: I5b279d30bbbb06af5e8ee9fc47e9794b78a567f5
| * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-256-32/+1586
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/resources/qframeallocator.cpp src/plugins/sceneparsers/gltf/gltfparser.cpp src/render/frontend/qrenderaspect.cpp tests/auto/render/renderqueue/tst_renderqueue.cpp Change-Id: Icdc2be2c80e7de6135a09e2f370ee004e395f514
| | * remove dependencies from sync.profileOswald Buddenhagen2016-11-061-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | the CI obtains them from the qt5 super repo nowadays. Change-Id: If4ad33246234c8d579e6c4f8c3acd9e5981de0ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
| | * QFixedFrameAllocator: Extract Method scan()Marc Mutz2016-10-242-17/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code used indices to detect when it fell off the end of m_chunks and needed to allocate a new chunk, but this was opaque to Coverity, which saw the potential for m_lastAllocatedChunk == nullptr at the end of the function, and thus reported a nullptr deref there. Fix by moving the scanning of m_chunks into a new method, scan(), which more clearly communicates that it never returns nullptr, not least because it returns by reference instead of pointer. Coverity-Id: 154279 Change-Id: I0cfe8fd819bbfc5b03a98b5e9354c0e98a521d34 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * QRenderAspect: remove misleading checkMarc Mutz2016-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check of d->m_renderer against nullptr follows an unconditional deref of the same pointer with no intervening code. It must therefore be always true. Remove it. That done, m_renderer _is_ nullptr after the ctor ran, and before the dtor runs (there's a check), so maybe the code should at least assert the existence of m_renderer before using it. Coverity-Id: 156307 Change-Id: Iacf2c09db1c0a5a55a67cfb6ef2a00652e557d09 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * Merge fix for tst_renderqueue::concurrentQueueAccess autotest to 5.6Milla Pohjanheimo2016-10-191-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is failing in 5.6 also. Same as e8a691192d5646924453cd1c617eae1b3d2a93aa Task-number: QTBUG-53915 Change-Id: I8075c65abc96536c3fafad912c07b73aa6e0b2d7 Reviewed-by: Antti Määttä <antti.maatta@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| | * GLTFIO: check return value of QFile::open()Marc Mutz2016-10-051-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We checked that the file exists prior to opening it, but it could still be unreadable (due to permissions, e.g.), so check with QFile::open() and emit QFile::errorString() in case it goes wrong. Coverity-Id: 161328 Change-Id: I3489488023bb697d6cb9eee6be07c0edd923c478 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
| | * remove pointless load(qt_build_paths)Oswald Buddenhagen2016-10-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all .prf files that need the variables it sets actually load it by themselves. This reverts commit 3ec11e4d94d57678f4dd1162185beef62e43da12. Change-Id: Ia662f252b8215f83e090391748947a8579566885 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | Merge remote-tracking branch 'origin/5.7.1' into 5.7Liang Qi2016-11-2411-43/+73
| |\ \ | | | | | | | | | | | | Change-Id: Idb141c715c7d06d2ecdce403d0f3740ee18b2b8f
| | * | NodeInstantiator created nodes go to its parentv5.7.1Kevin Ottens2016-10-147-38/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, elements created by the NodeInstantiator are children of the instantiator itself. Change that to parent them in the instantiator parent instead. Rationale for that is that it will behave similarly to Repeater this way, and gives a chance of using NodeInstantiator in frame graphs. Indeed, anything which is not a FrameGraphNode gets pruned in that context that would include branches starting from NodeInstantiator. Change-Id: I651a51471d92fcf466c9abd5dbbbfa2960ef1247 Task-Id: QTBUG-55908 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| | * | Give access to FrameGraphNode as a grouping nodeKevin Ottens2016-10-144-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is convenient to allow creating (Q)FrameGraphNode and have them take part in the tree traversal even though they don't change any state. Allows for easy grouping of frame graph parts, and even needed in some situations in conjunction with NodeInstantiator. Change-Id: If33d48801781113a174971398b33c27d55fa1423 Task-Id: QTBUG-55908 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Readd doc that was removed by e3c70ea206eaef9fe310ebc880070b173977530eAndy Shaw2016-11-181-0/+21
| | | | | | | | | | | | | | | | | | | | Change-Id: I8fd9fde776b81b09b3d107f2ad95f90672a354ab Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Remove old deferred-renderer-cppJoni Poikelin2016-11-1719-944/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | deferred-renderer-cpp example has been moved under tests/manual/, but old example was not completely removed. Task-number: QTBUG-55659 Change-Id: Ic8e934092879b05c4e04c5f70f0f3632cc8c3ec3 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | | Update docs for render states part 2Antti Määttä2016-11-1410-198/+559
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1ce94b0c6d25c709cb9e4f2e0a37ec6c68217ef9 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Update docs for render statesAntti Määttä2016-11-1411-117/+436
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I40379d4b20baf79657926a1cef5b29e83579b46c Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Update QComputeCommand and QDispatchCompute docsAntti Määttä2016-11-142-29/+95
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic6555d2900a4d6a10ea8ebf8da746c70915ae6f1 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Update QFrustumCulling docsAntti Määttä2016-11-141-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id02bac23bd25574c872a3b44e40f7d454c454ad6 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Update docs for render targetsAntti Määttä2016-11-143-81/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update docs for QRenderTarget, QRenderTargetSelector and QRenderTargetOutput Change-Id: Iceff6605e4a5093e9af29718600534b9267f8c3d Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Fix Clang warning about overwriting a vtableThiago Macieira2016-11-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statevariant_p.h:100:20: warning: destination for this 'memcpy' call is a pointer to class containing a dynamic class 'BlendEquationArguments'; vtable pointer will be overwritten [-Wdynamic-class-memaccess] statevariant_p.h:100:20: note: explicitly cast the pointer to silence this warning Change-Id: I149e0540c00745fe8119fffd146452409ca5c945 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Move struct Entry outside class ByteArraySplitterMika Salmela2016-11-011-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type info declaration must be before the struct Entry is used. Therefore this patch moves the definition before the ByteArraySplitter. Task-number: QTBUG-56789 Change-Id: I29e3ec35778778536c5e1de08b6b7133bb78c0f8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | Fix NodeInstantiator::objectAdded docsDaniel Vrátil2016-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 2nd argument name in the documentation was different from the actual name. Change-Id: I626f2ab4258d977a4679bf1750dace3b23b65dd5 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * | | GraphicsContext: remove misleading check in specifyAttribute()Marc Mutz2016-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'location' argument is checked for non-negativeness first thing in the function, and is not modified in between, so the re-check in the loop is both unneeded and misleading, as it suggests that the variable may have changed from the previous test. Fix by removing the second check. Introduced by 8c1e1df4be02de8d64807d7abeccedc6becd3076, which means only 5.7+ is affected. Coverity-Id: 168546 Change-Id: I3adc0ace2eac234142ab856738e553b1a7e76e1f Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | | UpdateAxisActionJob: remove misleading redundant checkMarc Mutz2016-10-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code is in the then-branch of an if (buttonInput), and buttonInput is not modified in between, so the check for buttonInput here is redundant. So remove it. Also declare 'buttonInput' as const to have the above analysis checked at compile-time, too. Introduced in 496d8b53b16bd0703ab06978f18fcbbb7d95e845, so Qt 5.6 is unaffected. Coverity-Id: 161331 Change-Id: I86e4d81e534d7906281fc36b70dc57ccb56184ca Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
| * | | Doc: Fix QT variable value for Qt Quick apps on front pageLeena Miettinen2016-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the value for 3drender module - Add 3dlogic and 3dextras Change-Id: I27e41559d831ea03d473d5088fb4187d50d811d1 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | | Fix GCC warning about assignment in an ifThiago Macieira2016-11-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | renderer.cpp:449:48: error: suggest parentheses around assignment used as truth value [-Werror=parentheses] Change-Id: Ic46ff326a6ba46bc877cfffd14831fe2a9371bed Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Mika Salmela <mika.salmela@qt.io> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | | Technique: add isCompatibleWithFilters functionPaul Lemire2016-11-254-1/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will allow to simplify technique filter filtering. Required to update the creation functor Change-Id: I7e6612e3c505ca57e5cc300335b3ba4fcc514638 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Technique: add a flag to check for compatibilityPaul Lemire2016-11-253-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Will allow to avoid doing the expensive GraphicsApiFilterData comparison every frame but only when the Technique has actually changed. Change-Id: Ife4b6a03b7da5d157df33c7fc2770fea2d7b76fc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | FrameGraphVisitor: use RenderViewBuilderPaul Lemire2016-11-251-285/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: Iff44ed6c22af1cd2b1f9cc3e4aabf3ebeb149f4d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Add RenderViewBuilderPaul Lemire2016-11-253-2/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring of what's in FrameGraphVisitor::visit Will allow to unit tests this complex process Change-Id: I6561bbefc9b67fbd73c5e30e09c5f3698896cbe7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | | Add unit tests for materialparametergathererjobPaul Lemire2016-11-243-1/+472
| | | | | | | | | | | | | | | | | | | | Change-Id: If31ebf6c148277067b8fe897d66b186f4f1d73fc Reviewed-by: Sean Harmer <sean.harmer@kdab.com>