summaryrefslogtreecommitdiffstats
path: root/examples/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVector in examplesJarek Kobus2020-06-234-4/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: Id14119168bb1bf11f99bda7ef6ee9cf51bcfab2e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-081-4/+4
| | | | | | | Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QtConcurrent::run: accept more then five function's argumentsVitaly Fanaskov2020-03-111-2/+2
| | | | | | | | | | | | | | [ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run has the following signatures: run(Function &&f, Args &&...args) and run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member pointer, the first argument of args should be an object for which that member is defined (or a reference, or a pointer to it). See the documentation for more details. Fixes: QTBUG-82383 Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-135-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * Doc: Specify install path for Vulkan examplesTopi Reinio2020-01-305-0/+5
| | | | | | | | | | | | | | | | | | | | Vulkan examples, although part of the Qt GUI documentation project, live under their own directory under /examples. Mark the correct install path for these using the \meta command. Fixes: QTBUG-81360 Change-Id: I0b98a19bf56d5b1953dbd90c0d5103be9041689a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Regenerate examplesAlexandru Croitor2020-02-045-9/+9
| | | | | | | | | | | | Change-Id: I04b2adbe370ffea81d7787ad90e4ae69d2c165cb Reviewed-by: Qt CMake Build Bot Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | cmake: add examples/vulkanFrederik Gladhorn2019-10-076-0/+252
|/ | | | | | | Fixes: QTBUG-78216 Change-Id: Id7d936ab0b3febc6b7ad3170ec2ea67836484217 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CMake Build Bot
* Fix use of qrand/qsrand in an exampleEdward Welbourne2019-04-011-3/+4
| | | | | | | | | | | Convert an example to use QRandomGenerator::global(). This saves the need for seeding. At the same time, use continuum random values rather than discrete ones, to better fit what the example using it is doing. Change-Id: I0adebaadb2e35832c629e314fda37e60b51f760d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtBase: replace deprecated QString functionsChristian Ehrlicher2019-03-041-7/+7
| | | | | | | | | | | | Replace deprecated QString functions in examples and tests: - QString::sprintf() - QString::null - QString::fromAscii Change-Id: I4404d17c1a65496c9079e8a7300e72a5b3740fe5 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Fix device local alloc in hellovulkantextureLaszlo Agocs2018-09-121-0/+10
| | | | | | | | | | 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>
* Fix src access with staging buffer in hellovulkantextureLaszlo Agocs2018-09-121-3/+3
| | | | | Change-Id: Iafcd94ec812a61dcfae6da43b1ca9f5771e05e56 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Revise an incorrect QVulkanWindow doc noteLaszlo Agocs2018-09-063-4/+4
| | | | | | | | | | | | | 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: Add missing full stops in briefsPaul Wicking2018-06-215-5/+5
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Vulkan Examples: Fix Clang warnings about initialization of VkClearColorValueFriedemann Kleint2018-04-304-4/+4
| | | | | | | | | | | | | | hellovulkanwindow.cpp(97,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0.0f, m_green, 0.0f, 1.0f }; hellovulkantexture.cpp(771,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0, 0, 0, 1 }; ..\shared\trianglerenderer.cpp(455,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0, 0, 0, 1 }; renderer.cpp(896,38): warning: suggest braces around initialization of subobject [-Wmissing-braces] VkClearColorValue clearColor = { 0.67f, 0.84f, 0.9f, 1.0f }; Change-Id: I3c2403699059dac2f88541f2a2102b774db0c887 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* hellovulkantexture: Fix issues with new validation layerLaszlo Agocs2017-10-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrading to a recent Vulkan SDK (e.g. 1.0.61) leads to getting a few previously unseen warnings from the validation layers. Fix these: vkDebug: ParameterValidation: 8: vkCreateSampler(): The samplerAnisotropy feature was not enabled at device-creation time, so the maxAnisotropy member of the VkSamplerCreateInfo structure must be 1.0 but is 0.000000. vkDebug: DS: 461375808: vkCmdPipelineBarrier(): pImageMemBarriers[0].srcAccessMask (0x4000) is not supported by srcStageMask (0x1). The spec valid usage text states 'Any given element of pMemoryBarriers, pBufferMemoryBarriers or pImageMemoryBarriers must not have any access flag included in its srcAccessMask member if that bit is not supported by any of the pipeline stages in srcStageMask, as specified in the table of supported access types.' vkDebug: DS: 6: vkCmdDraw(): Cannot use image 0x7 with specific layout VK_IMAGE_LAYOUT_GENERAL that doesn't match the actual current layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL. vkDebug: DS: 61: Descriptor set 0xc encountered the following validation error at vkCmdDraw() time: Image layout specified at vkUpdateDescriptorSets() time doesn't match actual image layout at time descriptor is used. See previous error callback for specific details. Change-Id: I1a3200221ac725c2fa661eff3ac075262b9355c2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QVulkanWindow: return QMatrix4x4 by valueMarc Mutz2017-05-223-3/+3
| | | | | | | 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-223-4/+3
| | | | | | | | | | 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>
* hellovulkanwidget example: Add a widget showing debug outputFriedemann Kleint2017-03-303-9/+34
| | | | | | | Add a tab widget for vulkan info and debug log. Change-Id: I0428bb5b6f847d0e94d62e846d34e4cb69eda5b6 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add the Vulkan cube exampleLaszlo Agocs2017-03-2931-1/+5703
| | | | | | | Features a little bit more than a cube, though. Change-Id: I636d4875ba9ccf722ed3caab97f14570be785748 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Clarify the front face winding order in the Vulkan examplesLaszlo Agocs2017-03-262-3/+3
| | | | | | | | | 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>
* Introduce QVulkanWindowLaszlo Agocs2017-03-2237-0/+2761
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>