aboutsummaryrefslogtreecommitdiff
path: root/demos/cube.c
AgeCommit message (Collapse)Author
2017-12-15demos: GH1054, make cube shaders inlinePetr Kraus
2017-12-01demos: Fix barrier settings for texture in cube demosKarl Schultz
Change-Id: Ibaa3901daa7a632022b67e53dd34f79be594ded1
2017-11-02demos: Clarify cube --present_mode optionMike Schuchardt
Change-Id: Ie53724c3612eb5bb9adfbb826149ef87916f0d84
2017-10-10demos: Use correct type for alphaMode in display surfaceWladimir J. van der Laan
alphaMode in VkDisplaySurfaceCreateInfoKHR is VkDisplayPlaneAlphaFlagBitsKHR, not VkCompositeAlphaFlagBitsKHR.
2017-08-16android: Updates for NDK r15Cody Northrop
Removes app_dummy from apps that use native activity. For more details refer to: https://github.com/android-ndk/ndk/issues/381
2017-08-14demos: Add compositeAlphaFlags fix to cube.cTony Barbour
Change-Id: Id19d11e909ffc21c4aa6a419b071ba53594ae94f
2017-07-28demos: Fix cube to use correct pipeline stage for barrierTony Barbour
Change-Id: Ia85e0acc67694d859077044ad24b13b0ad834811
2017-07-14demos: Clang-format Wayland and cube.cpp refactorJoey Bzdek
Change-Id: I73dac6489e41a94fc53a1c7942888a3a6479a805
2017-07-14demos: Add Wayland input handling to cubeJoey Bzdek
Change-Id: I314ad9bc3e297da93f4d5c1d44289c9cca3a8fde
2017-06-29demos: Use do-while instead of clunky whileTony Barbour
When acquiring swapchain images Change-Id: I8c502e06490f73fc5c9cd8057cd12869a66ea942
2017-06-20demos: Destroy instance after closing Xlib connectionKarl Schultz
In the cube demos, destroy the instance after closing the display system connection. It is possible for the driver to register callback functions with a library like Xlib. If the driver is unloaded when Xlib calls those callback functions, a segfault results. Fixes #1894 Change-Id: Ieb25a00f727c4ac05ff24b41c3582b293abf4b95
2017-06-14demos: Modify correct uniform buffer for next frameTony Barbour
Change-Id: I78b8f5ef63fb2c14a3ce431f3e6f6a809e65972f
2017-06-12demos: Remove swapchain layer from demosMark Lobodzinski
Change-Id: I8628686d3caad6bed2261431776ac9a55d0c076f
2017-06-02demos: Fix fence sync after new throttling schemeTony Barbour
f06ab9 cube: Throttle rendering rather than presentation didn't remove the AMD workaround and didn't consider the VK_ERROR_OUT_OF_DATE_KHR path through resize. Change-Id: Ib29bffb5b3c2a82456ad734424af3a9348e897c5
2017-05-02cube: Throttle rendering rather than presentationDamien Leone
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-03demos: Remove DbgMsgs from incremental_present extIan Elliott
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 Elliott
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 Elliott
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 Elliott
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 Barbour
Addresses GH #1048 Change-Id: Ie94796bcd13dc506e1b97c483763df9023567ac6
2017-03-16build: Fix potentially uninitialized VS2015 warningJamie Madill
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 Barbour
Change-Id: I44e3654ee8d2f1b127284ae5f66ca75cb9ff54a7
2017-03-15demos:Add cube option --validate-checks-disabledTobin Ehlis
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 Barbour
Change-Id: I6ec4465d52db8f3b6d41a13d3238957a41a6ea1f
2017-02-22demos: Use device local heap for depthJeremy Hayes
Fix GH 116: Cube demo does not allocate depth buffer in device local heap. Change-Id: Ic368bc039fc555f0d8739b0aeb6648237a6fcc5c
2017-02-16demos: Remove image layer referencesMark Lobodzinski
Change-Id: I937f1387ca6d4405cbceea12d66e97985d367bbd
2017-02-15demos: Support cube on iOS and macOS via MoltenVKBill Hollings
2017-02-02cube: Error handling improvementsRobert Morell
- 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 Barbour
Change-Id: Idb2991972bdd91c3e48ad5d796de4b31d7138c98
2017-01-31cube: Add direct to display supportDamien Leone
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-27build: Enable declaration hiding warning on WindowsKarl Schultz
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 Lobodzinski
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 Lobodzinski
Bring all source files in the repo up to date with consistent coding style/standard. Change-Id: Iceedbc17109974d3a0437fc4995441c9ad7e0c23
2017-01-13demos: Add uniform buffer per swapchain image to cubeTony Barbour
Change-Id: I290ed2a8f72303c58a52cace3c9d640cb3264def
2017-01-13demos: Cube quit ignoring NULL fence errorsTony Barbour
Change-Id: I2cc5c49b53a19716096ac912120286f03f7d6f91
2017-01-13demos: Cube updated to use triple bufferingTony Barbour
Change-Id: I2ae1cb03ec98ee8f31c6103ed3fc8f1f8edc4a2c
2017-01-05demos: Make spacebar pause work in cube demo (Linux).Karl Schultz
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
2016-12-09Demos: Add Mir warnings and placeholdersTony Barbour
Change-Id: I7e7ca30bd1452a216213c02a7aa29ce8829b2974
2016-12-09Demos: Remove simultaneuos xlib and xcb support from cube*Tony Barbour
Change-Id: I2f28dc3e21fc10ae96dde2dbfc7f3025efd9c2f0
2016-11-21demos: Set attachment description flag bits in cubeTony Barbour
Fixes a cubepp crash running on AMD Change-Id: Ie8ef8625a2e8a8a416bcbfe4a62871fef5e07f71
2016-11-15demos: Enable building combinations of xcb and xlibTony Barbour
Change-Id: I055c12e8c93d05db747239df46611386eb8b8278
2016-11-11demos: Call DeviceWaitIdle before DestroyDeviceTony Barbour
Complying with best practice from Vulkan Programming Guide page 31 - Shutting Down Cleanly Change-Id: I19640071d26f765ffc0a2f5e5fc4d60920395e0b
2016-10-28demos: Make present mode a command line optionTony Barbour
rather than a compile time decision Change-Id: Ia13400f03d1881ca3d923f47f76b068a19670435
2016-10-28demos: Move staging texture to demo structTony Barbour
Get rid of flush in staging code where it's probably unexpected, considering it doesn't begin another command buffer, and then wait until the expected flush to free staging texture resources Change-Id: I80945c3f002a7efe212608895b91ccf0934fe6f9
2016-10-28demos: Move command buffer creation out of layout utilTony Barbour
Create, begin, end, and submit the setup command buffer all from the same routine Change-Id: I1ea93e14e930dc3330f722fe212cd8f66555f618
2016-10-21demos: Add src and dst stages to set_image_layoutTony Barbour
Change-Id: I70e70b8085cc1196b5ffb69283c158ea8bd7ec1b
2016-10-20demos: Fix access masks when cube uses staging bufferTony Barbour
Change-Id: I89655f8224c3543d9c57f2cf7bd55b2c2a21c09f
2016-10-18demos: Fix misspellingMike Weiblen
Change-Id: I044619fb70b0a77dcbcdfe7c72dc8915119239a3
2016-10-18demos: Cube barrier changes from GH #1033Tony Barbour
Change-Id: Ic68f9cd722474dc74957625c23c0f801f4b3852c
2016-10-11cube.c: Remove excess tests from presentation fencesszdarkhack
Instead of using a bool array and both checking and writing to it every frame for no reason, just create the presentation fences with the VK_FENCE_CREATE_SIGNALED_BIT flag.