aboutsummaryrefslogtreecommitdiff
path: root/demos/cube.cpp
AgeCommit message (Collapse)Author
2017-06-12demos: Remove swapchain layer from demosMark Lobodzinski
Change-Id: I8628686d3caad6bed2261431776ac9a55d0c076f
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-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-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-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-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
2017-01-04build: Cleanup warnings when compiling with clangKarl Schultz
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-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-23build: Fix cube.cpp build issues for WaylandKarl Schultz
Fixes #1190 Change-Id: Iefb03b803b049a1634ae2075178afbd3dee691bd
2016-11-21demos: Set attachment description flag bits in cubeTony Barbour
Fixes a cubepp crash running on AMD Change-Id: Ie8ef8625a2e8a8a416bcbfe4a62871fef5e07f71
2016-11-18demos: fix validation errorJeremy Hayes
Change-Id: Idd89d98bf8932c07df2c1452f27d2f3002fb2d8a
2016-11-18demos: call DeviceWaitIdle before DestroyDeviceJeremy Hayes
Change-Id: Ic5819027b706e8c5d66ae78d0d0da1133c16085b
2016-11-18demos: make present mode a command line optionJeremy Hayes
Change-Id: I0dedd685225f5aecaba968ba81da487e5d05da26
2016-11-18demos: move staging texture to demo structJeremy Hayes
Change-Id: I8b0319d0f0bab8aba6c41e8fa324f0a9f7128baf
2016-11-18demos: move cmd bfr creation out of layout utilJeremy Hayes
Change-Id: I01c4f59497f4ac22f2a96bda535c7965d34156d8
2016-11-15demos: Enable building combinations of xcb and xlibTony Barbour
Change-Id: I055c12e8c93d05db747239df46611386eb8b8278
2016-11-08demos: fix cubepp fence creationJeremy Hayes
Change-Id: I8019075d3ba7e44cfaf78f6b242cc2e4a8b6505f
2016-10-27demos: Add src and dst stages to set_image_layoutJeremy Hayes
Change-Id: I97ba1643e17bb97faa868123f5ef6e6f140a9b13
2016-10-27demos: Fix access masks when cube uses staging bfrJeremy Hayes
Change-Id: I78f9c5ecb36edbd2515f7ef2a889519e45707ea8
2016-10-27demos: Cube barrier changes from GH #1033Jeremy Hayes
Change-Id: Ib6638235ccf006e962ea3bacac82fdc1a75e08e4
2016-10-27cube.cpp: Remove excess tests from present fencesJeremy Hayes
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. Change-Id: Icfa630a821bade51439ecbc6edddd4973d7bd4ed
2016-10-17demos: fix cubepp on wayland errorsJeremy Hayes
Change-Id: I74fe07d170ee0e403357a018554ac9d6c754b6b5
2016-10-10demos: Fix Windows build warnringsMark Lobodzinski
Change-Id: I733704e8904a77aa9071565cfc1d18b23b1c0c1c
2016-10-09demos: fix uninitialized variableJeremy Hayes
Change-Id: If980d3a8d765185148cff0b037cb64e637ae8a75
2016-10-09demos: fix uninitialized variableJeremy Hayes
Change-Id: I1aa51806a82398fb03cfb81ae23782882d1e07ae
2016-10-09demos: clang-format cube.cppJeremy Hayes
Change-Id: I5f55446eb6f3c312b6cc012733b7f4e454ac73ba
2016-10-09demos: add cube cpp sampleJeremy Hayes
Demonstrate how to use vulkan.hpp. Change-Id: Ia5ef4f55d45219aec607ae04efdb64c6ebbc9578