summaryrefslogtreecommitdiffstats
path: root/src/gui/vulkan/qvulkanwindow_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Modernize and fix frame sync in QVulkanWindowLaszlo Agocs2025-05-121-5/+3
| | | | | | | | | | | | | | Follow 24d62ffd720b5bec5d07b07b8d2c9dda7635f3c0 for QVulkanWindow. The Vulkan backend of QRhi has diverged from QVulkanWindow even before that recent fix, having many changes over the years that are not present in QVulkanWindow. Introduce some of these now, to make things work with the newer validation layer bundled with the Vulkan 1.4 SDKs. Task-number: QTBUG-135645 Change-Id: Ic630e9a57c344843c171871b5a0386ed18027b22 Reviewed-by: Andy Nichols <[email protected]>
* QVulkanWindow: sync surface size logic with QRhiLaszlo Agocs2023-12-041-0/+1
| | | | | | | | | | | | | The legacy QWindow convenience subclass does not have the robust logic that was later implemented for the Vulkan backend of QRhi. (i.e., never trust the QWindow; problem with QVulkanWindow is that it half-trusts those values still, which leads to the classic pixel-size-differs-by-one problem) Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-118568 Change-Id: I5f83999e86a9907efe08b38ca069bae20152a4e0 Reviewed-by: Andy Nichols <[email protected]>
* QVulkanWindow: Add a way to control post-1.0 Vulkan featuresLaszlo Agocs2023-11-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | So now instead of filling out a VkPhysicalDeviceFeatures and sending it in via VkDeviceCreateInfo::pEnabledFeatures, we rather create a VkPhysicalDeviceFeatures2, which contains a VkPhysicalDeviceFeatures (for 1.0 stuff) and a pNext chain, and chain it via pNext to the VkDeviceCreateInfo. QVulkanWindow will not do anything with post-1.0 features by default. (in this regard it deviates from the QRhi Vulkan backend which already tackles 1.1, 1.2, and 1.3 features as well, but this is not going to change) However, applications may want to enable some of those still. To enable this, add a new callback. When set, the callback is invoked and the alternative behavior described above is activated. Fixes: QTBUG-117966 Change-Id: I8560a6b23421f545ee760e714cbe2ec2f6078406 Reviewed-by: Andy Nichols <[email protected]>
* Replace usages of Q_CLANG_QDOC with Q_QDOCLuca Di Sera2022-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | To allow the user to customize the C++ code that QDoc sees, so as to be able to work-around some limitations on QDoc itself, QDoc defines two symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an entire execution of QDoc. At a certain point in time, QDoc allowed the user the choice between a custom C++ parser and a Clang based one. The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol would be defined only when the Clang based parser was chosen. In more recent times, QDoc always uses a Clang based parser, such that both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent. To avoid using different symbols, and the possible confusion and fragmentation that derives from it, all usages of Q_CLANG_QDOC are now replaced by the equivalent usages of Q_QDOC. Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f Reviewed-by: Kai Koehne <[email protected]>
* 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 <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* QVulkanWindow: make it possible to override the enabled featuresLaszlo Agocs2022-01-201-0/+1
| | | | | | | | | | | | | | | We already have a precedent for this: the QueueCreateInfoModifier callback. Following the pattern, add a EnabledFeaturesModifier that can alter the VkPhysicalDeviceFeatures that is passed to vkCreateDevice(). [ChangeLog][QtGui][QVulkanWindow] QVulkanWindow can now invoke a callback to alter the VkPhysicalDeviceFeatures object used to create the Vulkan device. This allows enabling 1.1, 1.2, and extension features. Fixes: QTBUG-99803 Change-Id: I5ede0c6bc3430cbb304d4961eb9e44faad5ce4d7 Reviewed-by: Andy Nichols <[email protected]>
* Fix QVulkanWindow on WaylandEskil Abrahamsen Blomfeldt2021-03-121-1/+1
| | | | | | | | | | | | | | | | The Wayland backend needs 4 buffers and is failing when making QVulkanWindow since there was a hardcoded limit at 3. The Vulkan-backend to RHI already has smarter handling of this. We want to limit the changes we do to the "legacy" QVulkanWindow, so we keep the hardcoded max value but increase it to 4 to accommodate the requirements on Wayland. Task-number: QTBUG-91418 Change-Id: I830bc30d1c2eeac1b076c50d35d5d138fd46dace Reviewed-by: Laszlo Agocs <[email protected]>
* Handle maxImageCount 0 in QVulkanWindowLaszlo Agocs2021-01-041-1/+1
| | | | | | | | | Take the logic we use in QRhi's Vulkan backend. Pick-to: 6.0 5.15 Fixes: QTBUG-85791 Change-Id: Ifdc2b3d351af71fbc86e20abcede902303e41fc4 Reviewed-by: Andy Nichols <[email protected]>
* Use QList instead of QVector in guiJarek Kobus2020-06-291-3/+3
| | | | | | | | Applied to headers only. Source file to be changed separately. Task-number: QTBUG-84469 Change-Id: Ic08a899321eaffc46b8461aaee3dbaa4d2c727a9 Reviewed-by: Laszlo Agocs <[email protected]>
* Move QtVulkanSupport into QtGui and QtOpenGLTor Arne Vestbø2020-05-221-1/+1
| | | | | | Task-number: QTBUG-83255 Change-Id: Ib021cecebda89fa2ab9332752124a8cec0a51a10 Reviewed-by: Laszlo Agocs <[email protected]>
* Deprecate constructing QFlags from a pointerAllan Sandfeld Jensen2019-11-201-1/+1
| | | | | | | | | This was used to support QFlags f = 0 initialization, but with 0 used as a pointer literal now considered bad form, it had been changed many places to QFlags f = nullptr, which is meaningless and confusing. Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8 Reviewed-by: Thiago Macieira <[email protected]>
* QVulkanWindow: Allow to change queues to createFrank Richter2019-09-241-0/+1
| | | | | | | | | | | | This allows users to request queues beyond the default graphics queue without having to completely reimplement Vulkan device initialization or giving up the convenience of QVulkanWindow. [ChangeLog][QtGui] Extended QVulkanWindow to allow user to specify additional queues to be created. Change-Id: I96d8d4bcc4da3ffedca3d25c87547669f5b18e40 Reviewed-by: Laszlo Agocs <[email protected]>
* 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 <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* doc: Ensure that clangqdoc sees QVulkanInstance declMartin Smith2017-03-311-1/+1
| | | | | | | | clangqdoc must see the declaration in vulkan regardless of whether Qt is configured with vulkan. Change-Id: I91fcaa4c39121b70e10c4fc3e854e49d959a6c02 Reviewed-by: Martin Smith <[email protected]>
* Introduce QVulkanWindowLaszlo Agocs2017-03-221-0/+188
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 <[email protected]>