summaryrefslogtreecommitdiffstats
path: root/tests/manual/rhi/multiwindow
Commit message (Collapse)AuthorAgeFilesLines
* Add configure feature for MetalTor Arne Vestbø2024-03-191-2/+2
| | | | | | | Simplifies maintenance of code paths that rely on Metal. Change-Id: I1d1f705fffc14dbafde346eeb555b43be6d5be54 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change license for tests filesLucie Gérard2024-02-041-1/+1
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* rhi: Make it a QPA-style private but semi-public APILaszlo Agocs2023-05-211-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qrhi.h, qshader.h, qshaderdescription.h (and qshaderbaker.h from shadertools; done separately) become "RHI APIs", following the concept of QPA APIs. Mirror completely what is done for QPA headers, but using the "rhi" prefix for the headers. This involves updating syncqt to handle the new category of headers. (a note on the regex: matching everything starting with "qrhi" is not acceptable due to incorrectly matching existing and future headers, hence specifying the four header names explicitly) There is going to be one difference to QPA: the documentation for everything RHI is going to be public and part of the regular docs, not hidden with \internal. In addition to the header renaming and adding the comments and documentation notes and warnings, there is one significant change here: there is no longer a need to do API-specific includes, such as qrhid3d11[_p].h, qrhivulkan[_p].h, etc. These are simply merged into a single header that is then included from qrhi.h. This means that users within Qt, and any future applications can just do #include <rhi/qrhi.h> (or rhi/qshader.h if the QRhi stuff is not relevant), no other headers are needed. There are no changes to functionality in this patch. Only the documentation is expanded, quite a lot, to eliminate all qdoc warnings and make the generated API docs complete. An example, with a quite extensive doc page is added as well. Task-number: QTBUG-113331 Change-Id: I91c749826348f14320cb335b1c83e9d1ea2b1d8b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-171-6/+0
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-231-1/+1
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-08-031-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* rhi: gl: Avoid magic adjustments to the context/window formatLaszlo Agocs2022-08-011-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...by removing the entire adjustedFormat() helper. Qt Quick has never used this, which indicates it is not that useful. Same goes for Qt Multimedia or Qt 3D. Ensuring depth and stencil is requested is already solved by using QSurfaceFormat::setDefaultFormat() or by adjusting the formats everywhere as appropriate. The helper function's usages are in the manual tests that use it as a shortcut, and in the GL backend itself. Remove it and leave it up the client to set the depth or stencil buffer size, typically in the global default surface format. (which in fact many of the mentioned manual tests already did, so some of calls to window->setFormat(adjustedFormat()) were completely unnecessary) By not having the built-in magic that tries to always force depth and stencil, we avoid problems that arise then the helper cannot be easily invoked (thinking of widgets and backingstores), and so one ends up with unexpected stencil (or depth) in the context (where the GL backend auto-adjusts), but not in the window (which is not under QRhi's control). It was in practice possible to trigger EGL_BAD_MATCH failures with the new rhi-based widget composition on EGL-based systems. For example, if an application with a QOpenGLWidget did not set both depth and stencil (but only one, or none), it ended up failing due to the context - surface EGLConfig mismatches. On other platforms this matters less due to less strict config/pixelformat management. Pick-to: 6.4 Change-Id: I28ae2de163de63ee91bee3ceae08b58e106e1380 Fixes: QTBUG-104951 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-281-1/+1
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-49/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* rhi: manual tests: Switch to VK_LAYER_KHRONOS_validationLaszlo Agocs2021-05-311-12/+1
| | | | | | Task-number: QTBUG-88388 Change-Id: Ia6d7caf0357b017625d3245a72d21a3023d81035 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add a dedicated QWindow surface type for D3DLaszlo Agocs2021-01-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though there is no D3D-specific logic in the windows platform plugin, meaning a QWindow with either OpenGLSurface or VulkanSurface (or anything really) is DXGI/D3D-compatible, it now looks like it is beneficial, and more future proof, if there is a dedicated surface type. As the linked report shows, there are OpenGL-specific workarounds accumulated in the platform plugin, while not being clear if these are relevant to non-OpenGL content, or if they are relevant at all still. (and some of these can be difficult/impossible to retest and verify in practice) When D3D-based windows use the same surface type, all these are active for those windows as well, while Vulkan-based windows have their own type and so some of these old workarounds are not active for those. To reduce confusion, having a dedicated surface type for D3D as well allows the logic to skip the old OpenGL workarounds, giving us (and users) a more clear overall behavior when it comes to OpenGL vs. Vulkan vs. D3D. The change is compatible with any existing code in other modules because any code that uses OpenGLSurface for D3D will continue to work, using the new type can be introduced incrementally. Task-number: QTBUG-89715 Change-Id: Ieba86a580bf5a3636730952184dc3a3ab7669b26 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-231-2/+2
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* High-DPI: Remove usage of Qt::AA_EnableHighDpiScalingTor Arne Vestbø2020-08-281-1/+0
| | | | | | | | This attribute is now on by default. Change-Id: I7c9d2e3445d204d3450758673048d514bc9c850c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* CMake: Regenerate manual testsAlexandru Croitor2020-07-081-2/+2
| | | | | Change-Id: Id42b9e481375d2ec0e68b73dc1e2ff36f0cbd49e Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Use QList instead of QVector in other qtbase testsJarek Kobus2020-07-071-2/+2
| | | | | | Task-number: QTBUG-84469 Change-Id: Ie0455c890c048c52eacad1badd6d21df999badf9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* rhi: Harmonize create-destroy API pattern with the rest of QtLaszlo Agocs2020-05-281-6/+6
| | | | | | | | | | For historical reasons we use build and release instead of create and destroy. This becomes confusing now that more modules in Qt start taking QRhi into use. Migrate to the more familiar naming, so those who have used QWindow or QOpenGLContext before will find it natural. Change-Id: I05eb2243ce274c59b03a5f8bcbb2792a4f37120f Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Regenerate projects one last time before mergewip/cmakeAlexandru Croitor2020-02-121-2/+1
| | | | | | Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/dev' into merge-devLeander Beernaert2020-01-241-3/+3
|\ | | | | | | Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
| * Enable QRhi Metal backend on iOSLaszlo Agocs2019-11-271-3/+3
| | | | | | | | | | | | | | | | | | | | While we are at it, remove the Border and MirrorOnce wrap modes that have not been supported on OpenGL, because they are unsupported with Metal+iOS as well. Task-number: QTBUG-78580 Change-Id: I0db94b9d3a6125b3bb5d7b1db5d02a42cd94d2c2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Convert all of tests/manualLeander Beernaert2019-11-141-0/+39
|/ | | | | | | Fixes: QTBUG-78164 Change-Id: I28b59bf84533fc33fafafd1511b5337d36af0e2b Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Ensure drawable size atomicity within a frameLaszlo Agocs2019-09-291-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert surfacePixelSize() to be a getter only. With Metal this will mean returning the "live" layer size (and so not the layer.drawableSize), which is in line with what we expect with other backends. Instead, we leave it to the swapchain's buildOrResize() to "commit" the size by setting drawableSize on the layer. With typical application or Qt Quick logic this ensures that layer.drawableSize is set once and stays static until we get to process the next resize - on the rendering thread. This of course would still mean that there was a race when a client queries surfacePixelSize() to set the depth-stencil buffer size that is associated with a swapchain. (because that must happen before calling buildOrResize() according to the current semantics) That can however be solved in a quite elegant way, it turns out, because we already have a flag that indicates if a QRhiRenderBuffer is used in combination with (and only in combination with) a swapchain. If we simply say that setting the UsedWithSwapChainOnly flag provides automatic sizing as well (so no setPixelSize() call is needed), clients can simply get rid of the problematic surfacePixelSize() query and everything works. Task-number: QTBUG-78641 Change-Id: Ib1bfc9ef8531bcce033d1f1e5d4d5b4984d6d69f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* rhi: Add compute api and implement for Vulkan and MetalLaszlo Agocs2019-06-171-2/+2
| | | | | | | | | | | | | D3D11 and GL (4.3+, ES 3.1+) will come separately at a later time. Change-Id: If30f2f3d062fa27e57e9912674669225b82a7b93 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Introduce the Qt graphics abstraction as private QtGui helpersLaszlo Agocs2019-06-133-0/+658
Comes with backends for Vulkan, Metal, Direct3D 11.1, and OpenGL (ES). All APIs are private for now. Shader conditioning (i.e. generating a QRhiShader in memory or on disk from some shader source code) is done via the tools and APIs provided by qt-labs/qtshadertools. The OpenGL support follows the cross-platform tradition of requiring ES 2.0 only, while optionally using some (ES) 3.x features. It can operate in core profile contexts as well. Task-number: QTBUG-70287 Change-Id: I246f2e36d562e404012c05db2aa72487108aa7cc Reviewed-by: Lars Knoll <lars.knoll@qt.io>