summaryrefslogtreecommitdiffstats
path: root/src/gui/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-041-8/+8
| | | | | | | | Increases readability Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without feature.xmlstreamreaderTasuku Suzuki2019-07-051-33/+39
| | | | | | | | | | | | | This commit introduces a new feature called vkgen for the tool which depends on xmlstreamreader. Note that when features.vkgen is disabled, vulkan.pri will generate dummy qvulkanfunctions.h and qvulkanfunctions_p.h because buildsystem needs them. Task-number: QTBUG-76159 Change-Id: I03d526a0fd76a2d8b531940f37538cead109d9d3 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* vulkan: Add debug message filteringLaszlo Agocs2019-05-284-0/+57
| | | | | | | | | | | | | | | | [ChangeLog][QtGui] Added support for filtering Vulkan debug messages in QVulkanInstance. This is especially useful for processing or suppressing messages from the validation layers. Change-Id: Idf0d7889085948daf5b1a53d2a9b11081e967609 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-05-131-1/+1
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: I81dbf90fc936c9bf08197baefa071117bddb1c63
| * Doc: replace even more null/0/nullptr with \nullptr macroChristian Ehrlicher2019-05-081-1/+1
| | | | | | | | | | | | | | | | Try to replace all wordings like '.. to 0' with '.. to \nullptr'. Also checked for 'null pointer' and similar. Change-Id: I73341f59ba51e0798e816a8b1a532c7c7374b74a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Replace Q_DECL_NOEXCEPT with noexcept in QtGuiAllan Sandfeld Jensen2019-04-051-6/+6
| | | | | | | | | | Change-Id: I43803b88fea8083782d73ce157c466b022208740 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | More nullptr usage in headersKevin Funk2019-03-141-1/+1
|/ | | | | | | | | | | Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QtGui/Network/OpenGl/Widgets/Xml: use \nullptr in documentationChristian Ehrlicher2019-02-201-1/+1
| | | | | | | Replace null and '\c nullptr' with \nullptr in the documentation. Change-Id: I58934eea06943309ba895833f1991629870ab45b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-153-192/+9
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QVulkanWindow: Fix some load/store ops in the default renderpassLaszlo Agocs2018-09-121-2/+2
| | | | | | | | Stencil is - very likely - cleared just like depth. Also, switch to STORE_OP_STORE for the multisample buffer, for correctness. Change-Id: I31b56658286205af8551018115ca2abbe541be67 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QVulkanWindow: Fix bogus stage masks in readbackLaszlo Agocs2018-09-121-1/+1
| | | | | Change-Id: I08882a02204c95272b100647923c9903f825912c Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix device local alloc in hellovulkantextureLaszlo Agocs2018-09-121-0/+5
| | | | | | | | | | Running with QT_VK_FORCE_STAGE_TEX does not work at all with recent NVIDIA drivers due to QVulkanWindow's and the example's naive way of picking the memory index. Enhance this and add a warning note to the QVulkanWindow docs as well. Change-Id: I7f200e11d982b56e3da3b71ee3915bd7bfca5cc1 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Revise an incorrect QVulkanWindow doc noteLaszlo Agocs2018-09-061-9/+5
| | | | | | | | | | | | | Applying the transformation in question has no effect on the winding order. Rewrite that section. While all the examples are correct, clarify the rules for the geometry they use since the winding order varies. Fix up the triangle example code to use front=CCW for clarity (even though it does not matter much since culling is off there). Change-Id: Icb968c76cc9fa918a5608d3c66b4fccd5668175e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* doc: Fix remaining qdoc warmings for Vulkan stuffMartin Smith2018-01-181-0/+61
| | | | | | | | | | | Several uses of #if QT_CONFIG(vulkan) were modified to for classes QVulkanFunctions and QVulkanDeviceFunctions was added to qplatformvulkaninstance.h, because the include file that contains them doesn't exist when vulkan isn't there. Change-Id: I392202ab5fe9bb4c558a991870e6ebf79254aec0 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add missing template clauses in qvulkaninstance.cppMartin Smith2018-01-121-2/+2
| | | | | | | | Added a few missing template clauses to member functions of QVulkanInstance<T>. Change-Id: Ie13f7e97f6a2183ee66d7ea275bc56a2bc3588e8 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Drop qvulkan headers from QtGui master headerLaszlo Agocs2017-11-032-0/+8
| | | | | | | | | | | | | ...in order to allow applications built against Vulkan-enabled pre-built packages to include <QtGui> on systems without Vulkan headers. This has the downside of not being able to pull in qvulkan* headers via the master header. This is an acceptable compromise for now. Task-number: QTBUG-64073 Change-Id: I63c5834dcec60e66aba34c003d4bfe8e7d31607f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix redundant Vulkan logging category definitionLaszlo Agocs2017-11-031-22/+22
| | | | | | Task-number: QTBUG-64124 Change-Id: Ic8f9a7f62e3c00dba5f345037c45fb45908be848 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QVulkanInstance: Fix compilation with MSVC2013Friedemann Kleint2017-10-141-2/+2
| | | | | | | | | | | | | | | | Use assignment. Fixes: vulkan\qvulkaninstance.cpp(811) : error C2061: syntax error : identifier 'd_ptr' vulkan\qvulkaninstance.cpp(812) : warning C4551: function call missing argument list vulkan\qvulkaninstance.cpp(813) : error C2659: '=' : function as left operand vulkan\qvulkaninstance.cpp(814) : error C2440: 'return' : cannot convert from 'QVulkanDeviceFunctions *&(__cdecl *)(void)' to 'QVulkanDeviceFunctions *' There is no context in which this conversion is possible vulkan\qvulkaninstance.cpp(832) : error C2061: syntax error : identifier 'd_ptr' vulkan\qvulkaninstance.cpp(833) : error C2541: 'delete' : cannot delete objects that are not pointers vulkan\qvulkaninstance.cpp(834) : error C2659: '=' : function as left operand Change-Id: I859b141aa0cb24b1f85dc9f229262a4145651d7c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* 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>