summaryrefslogtreecommitdiffstats
path: root/src/gui/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* Work around qvulkanfunctions.h not getting installedLaszlo Agocs2017-06-221-0/+3
| | | | | | Change-Id: I975dd975bab8f57091218fca4db7a32ac6008c18 Reviewed-by: Joni Jäntti <joni.jantti@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* QVulkanWindow: return QMatrix4x4 by valueMarc Mutz2017-05-222-4/+4
| | | | | | | The function never returns nullptr, so return the matrix by value. Change-Id: I7c1eeb43b9693866049763565b575348ddd35548 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QVulkanWindow: use QVector, not QSet, for small int setMarc Mutz2017-05-222-5/+6
| | | | | | | | | | Apart from being more efficient to construct and test, for the expected very small number of entries, the example code itself shows that a sorted vector is much more useful than an unordered set. Change-Id: Ic5e38df0176ac4be08eac6a89c2e1cabab2a9020 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QVulkanWindow: fix fatal warning on Clang 4Shawn Rutledge2017-05-031-1/+1
| | | | | | | | | | | | | | | qtbase/src/gui/vulkan/qvulkanwindow.cpp:1882:42: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] VkClearColorValue clearColor = { 0.0f, 0.0f, 0.0f, 1.0f }; ^~~~~~~~~~~~~~~~~~~~~~ { } 1 error generated. VkClearColorValue is a union, so it wants to be clear that we are initializing only one of the union's members, apparently. (Even though initing more than one wouldn't make sense.) Change-Id: Id4afa3ddc1b4ce7e24e681fb93c0ee9083c41e08 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QVulkan{Layer,Extension}: various fixesMarc Mutz2017-04-052-16/+84
| | | | | | | | | | | | - don't export simple structs - make op== non-member - add op!= (required by EqualityComparable) - add qHash() (should be defined by Qt for every EqualityComparable class) - add Q_DECLARE_TYPEINFO Change-Id: Ia14ac3fea48a6a0ad1d8993c9408afe77bbe6c1a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Vulkan: Fix shadow buildsAndy Nichols2017-04-053-7/+9
| | | | | | Change-Id: I6529c76109e2d668355524b9b0d65048a6d3df2e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix some capitalization issues in QVulkan docsLaszlo Agocs2017-04-042-6/+6
| | | | | | | ...and remove see-alsoing wrappers that do not get a doc page. Change-Id: Ia26aeef3c142b15a47e650dfc7f64ad7339cc80d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* doc: Fix several qdoc warnings in new softwareMartin Smith2017-03-313-42/+69
| | | | | | | | | | This change fixes several common qdoc warnings in this new software. However, because vulkan/vulkan.h is not always available, a few typedefs were also added to define some standard vulkan types for clang to see when vulkan.h is not available. Change-Id: Id3db8c0a59b0c415829c1873a868aba0e84fe21c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* doc: Ensure that clangqdoc sees QVulkanInstance declMartin Smith2017-03-314-4/+4
| | | | | | | | clangqdoc must see the declaration in vulkan regardless of whether Qt is configured with vulkan. Change-Id: I91fcaa4c39121b70e10c4fc3e854e49d959a6c02 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Clarify the front face winding order in the Vulkan examplesLaszlo Agocs2017-03-261-0/+4
| | | | | | | | | After applying the correction matrix the front face is CW, not CCW. The examples work either way but fix them up to avoid reader confusion. Change-Id: I491e6dc17c21897a59f36d32061e937f2b6c4c9d Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QVulkanWindow: Add missing device wait after user codeLaszlo Agocs2017-03-261-6/+17
| | | | | | | | | | In a multi-threaded setup it is not unlikely that releaseSwapChainResources() will wait for and submit any remaining frame building. Hence a wait is necessary also after invoking the user's implementation. Change-Id: I3c963c05c1c3981980da5e4ff9c572df24a1e473 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add missing class doc for QVulkanWindowRendererLaszlo Agocs2017-03-231-4/+24
| | | | | | | | The functions are documented but the class does not show up in the docs without the \class. Change-Id: I8a7e4c82ba11354855ca272e5c6be59cf1419f14 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add license attribution for vk.xmlLaszlo Agocs2017-03-222-0/+37
| | | | | | | | Same license as the existing OpenGL stuff. Change-Id: I6d0a77a7213f496971b5c3a8676dedb8e4377ceb Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Introduce QVulkanWindowLaszlo Agocs2017-03-224-2/+3032
| | | | | | | | | | | | | | | | | | | A convenience subclass of QWindow that provides a Vulkan-capable window with a double-buffered FIFO swapchain. While advanced use cases are better served by a custom QWindow subclass, many applications can benefit from having a convenient helper that makes getting started easier. Add also three examples of increasing complexity, and a variant that shows embeddeding into widgets via QWindowContainer. [ChangeLog][QtGui] Added QVulkanWindow, a convenience subclass of QWindow. Task-number: QTBUG-55981 Change-Id: I6cdc9ff1390ac6258e278377233fd369a0bfeddc Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix up QVulkanInstance docsLaszlo Agocs2017-03-221-9/+13
| | | | | | | | | Remove HTML tags. Fix notes that predate the introduction of deviceFunctions(). Add a note about the function wrappers being auto-generated. Change-Id: If99022ce74313c6bb33c3bb7bd6840b6cf26b3be Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Basic Vulkan enablersLaszlo Agocs2017-03-177-0/+6671
For Android, Windows and xcb. Verified on Win10 with NVIDIA, Win10 with AMD, Android with Tegra K1, Android aarch64 with Tegra X1, and Linux aarch64 with Tegra X1 (Jetson TX1, L4T). Introduce QPA-based Vulkan library loader, core function resolver, and instance creation support. In addition to creating a new VkInstance, adopting an existing one from an external engine is supported as well. The WSI specifics are hidden in the platform plugins. Vulkan-capable windows use the new surface type VulkanSurface and are associated with a QVulkanInstance. On Windows VULKAN_SDK is picked up automatically so finding vulkan.h needs no additional manual steps once the LunarG SDK is installed. [ChangeLog][QtGui] Added support for rendering to QWindow via the Vulkan graphics API. Task-number: QTBUG-55981 Change-Id: I50fa92d313fa440e0cc73939c6d7510ca317fbc9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>