summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/vkkhrdisplay
Commit message (Collapse)AuthorAgeFilesLines
* vkkhrdisplay: Fix output selectionLaszlo Agocs2023-09-251-1/+1
| | | | | | | | | | | | | | | | | While this platform plugin does not have full multi-screen support, it at least has the ability to choose the one to use via env.vars. This currently does not work. What's more, it looks like it chooses the last display by default, instead of the first. Fix the display/display-mode logic. This now allows QT_VK_DISPLAY_INDEX to work correctly, for example on a RPi4 with two screens connected. Fixes: QTBUG-117416 Change-Id: Ia5ac8fde5827b3a2e1945e8e4f04fb8dd90704e2 Pick-to: 6.6 6.5 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
* plugins: use nullptr instead of 0 and NULLJohannes Kauffmann2022-10-021-1/+1
| | | | | Change-Id: I7f3e56db1d0db178d8a7d9eb91c09e03cae89f6b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
* vkkhrdisplay: Create the platform window alwaysLaszlo Agocs2022-08-161-1/+5
| | | | | | | | | | | | | | | | | No matter what the surface type was. We only support VulkanSurface, so if the type is something else, then a a qWarning is in order, but instead of returning nullptr (which will almost certainly cause a fail or crash in some form), we can just carry on normally. The resulting window will not be renderable from the application of course, but that is not always needed in fact, plus failing gracefully is nicer. The tst_qrhi autotest can now be run on the RPi4 also with -platform vkkhrdisplay. While there are some odd messages occurring from Mesa and co., the run now completes normally, with no failures. Change-Id: I77bd249096aede8e05458559458581d702054540 Pick-to: 6.4 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* vkkhrdisplay: Silence validation complaints about presentation supportLaszlo Agocs2022-08-152-4/+12
| | | | | | | | | Zero reason to do this query, but the validation layer complains otherwise. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-105527 Change-Id: I7a72e4d6d89f41279db94efe663a696302f05ded Reviewed-by: Andy Nichols <andy.nichols@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>
* Use SPDX license identifiersLucie Gérard2022-05-165-190/+10
| | | | | | | | | | | | | 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>
* Plugins: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-05-042-6/+10
| | | | | | | | | As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* vulkan: Try loading libvulkan.so.1 firstLaszlo Agocs2022-03-111-1/+1
| | | | | | | Change-Id: I876899fbfc126136f2842e9361e21ac10af8f14b Pick-to: 6.3 Fixes: QTBUG-101592 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPEAlexandru Croitor2021-08-061-1/+1
| | | | | | | | | | | | | The intention is to remove TYPE as a keyword completely before 6.2.0 release, but in case if that's not possible due to the large amount of repositories and examples, just print a deprecation warning for now and handle both TYPE and PLUGIN_TYPE. Task-number: QTBUG-95170 Pick-to: 6.2 Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't give plugins PUBLIC usage requirements part 2Alexandru Croitor2021-07-151-1/+1
| | | | | | | | | | | | | Plugins shouldn't have public usage requirements. Amends 434ada8dcb6132b3a597ea56b57a66c627f51728 Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Iffb3def07ea428b1c3c5b9873e259a4d5168b7a1 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* CMake: Don't give plugins PUBLIC usage requirementsJoerg Bornemann2021-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | The pro2cmake.py conversion script faithfully reproduced the .pro files for the plugins, which specified the libraries as public. But in CMake, the implications of this are that public usage requirements should then be propagated to consumers. We don't expect any consumers, since a plugin is created as a MODULE library in CMake, so for Windows we don't even have an import library to link with. The only exception to this is for static builds where plugins are created as STATIC libraries instead, but only in certain controlled situations do we then link to plugins. Even then, usage requirements are not expected to propagate to the consumers, so these relationships should always be specified as private. Pick-to: 6.2 Task-number: QTBUG-90819 Change-Id: Ibc7c2bcd3b6a9dc77df40c4c0c22ff254a80f33d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Long live VK_KHR_display platform plugin!Laszlo Agocs2021-02-087-0/+932
Experiment with this once again, this time in a more forward looking manner: move the code previously placed into eglfs's eglfs_viv backend into its own plugin. Move our attention to devices like the Raspberry Pi 4, where VK_KHR_display has recently been introduced to the Mesa v3dv backend. This is not in Mesa 20.3.3, the latest release at the time of writing, but is available and functional when building master. This serves as the reference system for testing the plugin, because it looks like a fairly robust implementation. The sole thing the plugin enables at the moment is creating a QVulkanInstance and a QWindow with surfaceType VulkanSurface. This is sufficient to run plain QWindow+QRhi (with QRhi::Vulkan), Qt Quick, and Qt Quick 3D (with QSG_RHI_BACKEND=vulkan) applications. One display and mode is chosen, by default the first in the enumeration lists reported by the Vulkan extension. This can be overridden with QT_VK_DISPLAY_INDEX and QT_VK_MODE_INDEX (modeled after QT_VK_PHYSICAL_DEVICE_INDEX). The indices can be determined based on the logs printed to the debug output. Changing the mode seems to be working nicely with v3dv. Multiple screen setups, where there would be more than one VkDisplayKHR enumerated, have not been tested yet. Regardless, multiple screens (reporting more than one QScreen, with a different QWindow on each, eglfs style) are not currently supported. This may be improved later (while keeping in mind that VK_KHR_display does not have a fully-featured output management API). Multiple (non-fullscreen) windows and especially raster windows (QWidget) are not and will not be supported. Our single QWindow is always forced to fullscreen. When it comes to input, the level of support should match linuxfb and eglfs. Note that while mouse input is fully functional, there is no mouse cursor. (and this is unlikely to be implemented) [ChangeLog][Platform Specific Changes][Embedded Linux] Introduced a vkkhrdisplay platform plugin to run Vulkan-based applications in fullscreen, without a windowing system, on systems where VK_KHR_display and VK_KHR_display_swapchain are supported by the Vulkan implementation. Change-Id: I6388416f7fb2bfdc4b412a0a4971f25cc05d4668 Reviewed-by: Andy Nichols <andy.nichols@qt.io>