summaryrefslogtreecommitdiff
path: root/demos
AgeCommit message (Collapse)AuthorFilesLines
2017-05-02cube: Throttle rendering rather than presentationDamien Leone2-24/+7
It is currently impossible to reliably throttle presentation per the Vulkan spec. The previous code was relying on fences returned by vkAcquireNextImageKHR() to throttle. The only information this fence holds is whether it is possible to render to that image since the *last time* it was presented, which could have happened several frames ago. Instead, we can throttle the rendering by passing a fence to vkQueueSubmit(). The previous code (only the cube.c version) was using a fence there to synchronize a vkMapMemory() in demo_update_data_buffer(), which doesn't seem necessary. Before this commit, we were effectively throttling to the number of frames in the swapchain rather than on FRAME_LAG. In the FIFO present mode, this could schedule too much work in the presentation channel (since we have to account for VBLANK events) and thus causing undesired side effects, such as stutters when trying to move the cube window on a desktop, which is I assume why the throttle code was added in the first place.
2017-04-26demo/smoke Android build update: use latest cmake with Android Studioguanghuafan4-78/+88
2017-04-24vulkaninfo: Fix various entries in VkPhysicalDeviceFeatures outputTobias Markus1-4/+6
The VkPhysicalDeviceFeatures dump missed the multiViewport and samplerAnisotropy fields. The alphaToOne field was at the wrong position (compared to the official definition in the Vulkan specification). The fields {vertex,fragment}StoresAndAtomics as well as shaderTessellationAndGeometryPointSize had the misleading and incorrect names {vertex,tessellation,geometry}SideEffects.
2017-04-12vulkaninfo: Add missing case for CPU deviceChris Forbes1-0/+1
Fixes #1664
2017-04-03demos: Remove DbgMsgs from incremental_present extIan Elliott1-13/+0
The only DbgMsg messages left tell the user, if they use "--incremental_present", whether the functionality is actually being used, or if the VK_KHR_incremental_present extension isn't available. NOTE: When somebody wants to see all of the DbgMsg messages, they should use "git revert" with this commit. Change-Id: Ic4189cbec2a64c50135b16c331c808fbbce975dc
2017-04-03demos: Use VK_KHR_incremental_present extensionIan Elliott1-1/+70
Show how to use the VK_KHR_incremental_present extension. Other notes: - There are a few diagnostic DbgMsg()'s, which can help show the usage. - Added a "--incremental_present" command-line option to turn on use of VK_KHR_incremental_present - Should compile and run on Windows, Linux, and Android, but the feature will only really be used on systems that support the extension. Change-Id: I8a79d806cab7d35197c94dd85358a62b6b7469be
2017-03-27cube: Remove most DbgMsg usage the VK_GOOGLE_display_timing extensionIan Elliott1-88/+2
The only DbgMsg messages left tell the user, if they use "--display_timing", whether the functionality is actually being used, or if the VK_GOOGLE_display_timing extension isn't available. NOTE: When somebody wants to see all of the DbgMsg messages, they should use "git revert" with this commit.
2017-03-27cube: GH1609: Use VK_GOOGLE_display_timing extensionIan Elliott2-25/+493
Show how to use the VK_GOOGLE_display_timing extension (currently, only available on the Android O release). Other notes: - There are many diagnostic DbgMsg()'s, which can help show the usage. - This includes a port of the Vulkan CTS (dEQP) time code for use in cube. - Added a "--display_timing" command-line option to turn on use of VK_GOOGLE_display_timing - Compiles and runs on Windows, Linux, and Android, but the feature will only really be used on systems that support the extension.
2017-03-23demos: Wait for fences before destroying swapchainTony Barbour2-0/+6
Addresses GH #1048 Change-Id: Ie94796bcd13dc506e1b97c483763df9023567ac6
2017-03-16build: Fix potentially uninitialized VS2015 warningJamie Madill3-1/+7
This fixes the a few occurences in demos, the loader and a test. It also adds the warning to the always-on list so it will prevent future regressions. Fixes #1587. Change-Id: I26f69e977b57749a3ab4ddb548ada95384131edc
2017-03-15demos: Select alpha based on capabilities in cubeTony Barbour1-2/+33
Change-Id: I44e3654ee8d2f1b127284ae5f66ca75cb9ff54a7
2017-03-15demos:Add cube option --validate-checks-disabledTobin Ehlis1-1/+16
Added option to cube demo "--validate-checks-disabled". This option will use the VK_EXT_validation_flags extension to cause validation to skip all validation flags that have a flag. This is meant to provide a basic test for the VK_EXT_validation_flags extension and find any obvious bugs/crashes.
2017-03-13demos: Remove tabs from cube.cTony Barbour1-28/+28
Change-Id: I6ec4465d52db8f3b6d41a13d3238957a41a6ea1f
2017-02-22demos: Use device local heap for depthJeremy Hayes2-3/+3
Fix GH 116: Cube demo does not allocate depth buffer in device local heap. Change-Id: Ic368bc039fc555f0d8739b0aeb6648237a6fcc5c
2017-02-16demos: Remove image layer referencesMark Lobodzinski3-7/+4
Change-Id: I937f1387ca6d4405cbceea12d66e97985d367bbd
2017-02-15demos: Support cube on iOS and macOS via MoltenVKBill Hollings1-0/+73
2017-02-02cube: Error handling improvementsRobert Morell2-2/+14
- Add a newline to the end of the error message when printing to stdout for ERR_EXIT. - Handle demo_read_spv failures by calling ERR_EXIT rather than just continuing on and calling the Vulkan library with a NULL pointer.
2017-02-01demos: Add XInitThreads to xlib path of cubesTony Barbour2-0/+2
Change-Id: Idb2991972bdd91c3e48ad5d796de4b31d7138c98
2017-01-31cube: Add direct to display supportDamien Leone3-0/+317
Although this extension is platform agnostic, this commit only enables it on Linux because this is the only platform I am able to test. Direct to display is enabled by passing '-DDEMOS_WSI_SELECTION=DISPLAY' to cmake. Change-Id: I5f23019d4b0c87104e1f834d3a6901850bfda7a3
2017-01-31vulkaninfo: Kill printed whitespaceMark Lobodzinski1-3/+3
Change-Id: I1e9d088d744bd1c4745a4c77ea75207f5350bf02
2017-01-31vulkaninfo: Print human-readable heap sizesTobias Markus1-1/+37
Since the size of a memory heap can be rather substantial, it is helpful to have the size additionally printed out in a human-readable format, i.e. using prefixes. Change-Id: I47aad4fce06471804ce9e853ba300626b6ad34c8
2017-01-27build: Enable declaration hiding warning on WindowsKarl Schultz3-51/+48
Fixes #1388 Turn on the Windows compiler option (4456) to report hidden declarations. Fix all places where this was occurring. Change-Id: I3346d87da8b70d6299c206fcac68520a091ed1a6
2017-01-26repo: Clang-format LVL source files using GoogleMark Lobodzinski23-784/+711
Switch clang-format standard from the LLVM style to the Google style for more consistency. Change-Id: I247c4abc275d7873a91522e1e234198adaa24033
2017-01-26repo: Clang-format c/cpp/h LVL files using LLVMMark Lobodzinski31-19680/+10716
Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
2017-01-25demos: Protect smoke demo data file from c-fMark Lobodzinski1-0/+5
Clang formatting the teapot mesh data file makes it unnecessarily lengthy -- disabled for the data definition portion of the file. Change-Id: I773fc4655b381b26a33e32fe845514f36b9d8e66
2017-01-19Vulkaninfo: Vulkaninfo crashes when DISPLAY is invalidArda Coskunses1-0/+7
On Linux the following command crashes: DISPLAY=foobar ./vulkaninfo This patch fixes this issue. https://github.com/LunarG/VulkanTools/issues/125 Change-Id: Ibb8d7b8b6cb4dc730aab9f5b4311e744c903029b
2017-01-13demos: Add uniform buffer per swapchain image to cubeTony Barbour1-113/+119
Change-Id: I290ed2a8f72303c58a52cace3c9d640cb3264def
2017-01-13demos: Cube quit ignoring NULL fence errorsTony Barbour1-4/+0
Change-Id: I2cc5c49b53a19716096ac912120286f03f7d6f91
2017-01-13demos: Cube updated to use triple bufferingTony Barbour1-4/+7
Change-Id: I2ae1cb03ec98ee8f31c6103ed3fc8f1f8edc4a2c
2017-01-11demos: Fix static analysis warnings in vulkaninfoKarl Schultz1-8/+16
Add exit code after failed mallocs. Dynamically allocate gpu info and handle arrays, getting rid of artificial limit. This also moves a large allocation from the stack to the heap. There are still some false positives from the MSFT analyzer that aren't worth fixing or suppressing.
2017-01-11demos: smoketest: Add --flush option for tracingjoey-lunarg3-5/+27
Running smoketest with --flush will call vkFlushMappedMemoryRanges so that the trace layer is aware of modified memory. This is not necessary with the --PMB option in vktrace. Change-Id: If72c0ed0c651cf82f2f2c4c78ec2534a0d475a9c
2017-01-05demos: Make spacebar pause work in cube demo (Linux).Karl Schultz2-35/+34
Fixes #1316. Rework XCB event processing code to handle events properly and avoid hangs when pausing. Fix polarity of decrease/increase spin rate keys. I suspect that this was an artifact from fixes made to the transforms a while back. Change-Id: I74adf7309227fafd175d8972ca930a304c58a1dd
2017-01-04build: Cleanup warnings when compiling with clangKarl Schultz4-51/+51
Travis-CI is building this repo with gcc and clang. This commit fixes warnings reported by clang but not by gcc. All the fixes involved adding an extra set of braces in initializers. Change-Id: I88e7841d9ab13afe2e45362b8f85261863d5b7fa
2016-12-12demos: Fix smoketest --c 20 hang on LinuxKarl Schultz1-3/+4
Fixes #1249. When frame count is reached in ::on_frame(), inform the caller that it is time to quit by calling Game::quit(), but go ahead and finish submitting this frame, because the caller is waiting on the fence. Change-Id: If3d918f8a8b5bf3697e9569d045dbe7c8aec98e5
2016-12-09demos: Add very limited Wayland support to vulkaninfoTony Barbour1-37/+34
Also allow only one WSI selection at a time Change-Id: Ie7ca4f98c71a5097b7e07a4b5e2762b59606317c
2016-12-09Cmake: Move all find_packages to base CMakeLists.txtTony Barbour1-3/+0
Change-Id: Id27307788c7c230e75d620f1bf5470b1450289f2
2016-12-09Demos: Add Mir warnings and placeholdersTony Barbour3-1/+33
Change-Id: I7e7ca30bd1452a216213c02a7aa29ce8829b2974
2016-12-09Demos: Remove simultaneuos xlib and xcb support from cube*Tony Barbour2-156/+57
Change-Id: I2f28dc3e21fc10ae96dde2dbfc7f3025efd9c2f0
2016-12-09Demos: Add DEMOS_WSI_SELECTION to pick Linux wsi to useTony Barbour1-9/+21
Change-Id: Ic1fcc6cf888d94b84a43661aa33815948d85b701
2016-12-09Cmake: Add files needed to build with MirTony Barbour1-1/+11
Change-Id: I640e45db5d586a379674fb209e38075ba7f0cf29
2016-12-09Cmake: Move WSI compile decision to subdirectoriesTony Barbour1-21/+21
Change-Id: I61ac8910200a1751a23aa92fe0e7d955ee9e03e5
2016-12-08demos: Fix compile warning in smokeTony Barbour1-0/+2
Change-Id: I60ee7f881cfd2bd78de21fa14146ef5667e20cc6
2016-12-07smoke: Don't load validation layers by defaultCody Northrop4-10/+15
This was an inadvertent change from 3f3748ad
2016-12-06smoke: Port arg parsing from HologramCody Northrop3-1/+56
2016-12-06smoke: Allow Android to specify layers other than standard_validationCody Northrop5-2/+11
2016-12-06smoke: Add layers to Android APKCody Northrop1-0/+6
2016-11-23build: Fix cube.cpp build issues for WaylandKarl Schultz1-22/+33
Fixes #1190 Change-Id: Iefb03b803b049a1634ae2075178afbd3dee691bd
2016-11-21demos: Set attachment description flag bits in cubeTony Barbour2-2/+3
Fixes a cubepp crash running on AMD Change-Id: Ie8ef8625a2e8a8a416bcbfe4a62871fef5e07f71
2016-11-18vulkaninfo: Fix variable, struct and function namesjoey-lunarg1-149/+149
Cleanup to match Google c++ style guide. Change-Id: Ifecbf5c8680159684e24a184421e907d1d815627
2016-11-18vulkaninfo: Add surface present modesjoey-lunarg1-5/+43
Change-Id: Icb6c30a81743cf5854fd7ecc974d87e814be856d