summaryrefslogtreecommitdiffstats
path: root/src/gui/vulkan/qbasicvulkanplatforminstance.cpp
Commit message (Collapse)AuthorAgeFilesLines
* vulkan: Do not set the portability bit with old SDKsLaszlo Agocs2023-09-251-2/+7
| | | | | | | | | | | | | Because it's a validation error with old ones, but required in some cases from 1.3.216 on (MoltenVK). Ridiculous. Amends 7fbc741d107ab679f6abd680ec909ce9b2bf333a and b018bc6e2d27b95024ee8f1b8c719199df47c264. Fixes: QTBUG-117412 Pick-to: 6.6 6.5 Change-Id: I9b4cacbe611d4e557ee1c156527142eb919d6b77 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-111-4/+4
| | | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace, with manual unstaging of the actual definition and documentation in dist/, src/corelib/doc/ and src/corelib/global/. Task-number: QTBUG-99313 Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* vulkan: Add flag to opt out from enumerating Portability phys.devicesLaszlo Agocs2022-09-261-2/+4
| | | | | | Task-number: QTBUG-106912 Change-Id: I1cb4adae4bed62f31d781a89a03b70885411f91f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* vulkan: Re-enable VK_KHR_portability driversLaszlo Agocs2022-09-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Vulkan loader as of SDK 1.3.216 and MoltenVK decided that all existing applications need to stop working with non-conformant Vulkan implementations such as MoltenVK, unless they start specifying the right soup of instance flags, extensions, and device extensions. Set VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR in VkInstanceCreateInfo::flags. Automatically request VK_KHR_portability_enumeration, if supported, on the instance. This handles the instance side. On the device side we can add support in QRhi so Qt Quick continues to work with MoltenVK. This involves requesting VK_KHR_portability_subset on the device whenever the extension is reported as supported (not doing so would be an error) However, applications creating their own VkDevice will need to take care of this themselves. This device extension requires VK_KHR_get_physical_device_properties2 on the instance (which QRhi does not control). This is no problem with Qt Quick as that already does this automatically, but in the unlikely case of wrapping an existing VkInstance in QVulkanInstance it will be up to the creator of VkInstance to enable that as well. Pick-to: 6.4 6.3 6.2 Fixes: QTBUG-106912 Change-Id: Idaf277549b3ec982e99bfc49e4ad6a67976c141a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* vulkan: Port to VK_EXT_debug_utilsLaszlo Agocs2022-08-101-37/+70
| | | | | | | Fixes: QTBUG-89762 Change-Id: Ie32043578968cbeda7c7f87990b98c10f5d06ff8 Reviewed-by: Andy Nichols <andy.nichols@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+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>
* Gui: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | Change-Id: I27321235d9c8428de0cff1e22a618299b9e5a97f Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* vulkan: Try loading libvulkan.so.1 firstLaszlo Agocs2022-03-111-7/+33
| | | | | | | Change-Id: I876899fbfc126136f2842e9361e21ac10af8f14b Pick-to: 6.3 Fixes: QTBUG-101592 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix build without features.libraryTasuku Suzuki2021-05-191-1/+0
| | | | | | Change-Id: I53eaaea149324d2495e794ba8bd58544e648e48e Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* vulkan: Add instance-level version getterLaszlo Agocs2021-01-181-0/+24
| | | | | | | | | | | ...as described in the Vulkan >= 1.1 spec. One can now call supportedApiVersion() (before create(), similarly to the other supported* functions) to determine the available Vulkan (instance-level) version. Fixes: QTBUG-90333 Change-Id: Ibe8482402b7f07e4abc48c88252ff0365e4e2faa Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Another round of 0->nullptr cleanupAllan Sandfeld Jensen2020-07-311-1/+1
| | | | | Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Use QList instead of QVector in gui implementationJarek Kobus2020-07-071-6/+6
| | | | | | | Task-number: QTBUG-84469 Change-Id: I366e845249203d80d640355a7780ac2f91a762f1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-221-0/+405
Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>