aboutsummaryrefslogtreecommitdiff
path: root/demos/cube.cpp
AgeCommit message (Collapse)Author
2017-12-15demos: GH1054, make cube shaders inlinePetr Kraus
2017-12-12build: Clear some compiler warningsPetr Kraus
- remove unnecessary ";" after function definitions and namespaces - fix wrong type match in printf for handle types - convert some left-overs to `HandleToUint64`
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-24header: Update to version 1.0.64 of the Vulkan hdrMark Lobodzinski
- updated vulkan.h - updated vk.xml - updated Win/Lin json files - updated vk_validation_error_messages.h - updated vk_validation_error_database.txt - updated vulkan.hpp - updated vuid_mapping.py - updated cube.cpp for vulkan-hpp changes Change-Id: I79971c3b54feb1fdad5ea2257e4b1b4c6f9e3c3b
2017-10-10demos: Update cube.cpp DISPLAY_KHR codeWladimir J. van der Laan
The physical display rendering code didn't compile due to drift in `vulcan.hpp`. Update for these changes. Tested on i.MX8M / Vivante GC7000L.
2017-08-14demos: cube.cpp - iterating over compositeAlphaFlagsgwizdz
Error in for loop condition Change-Id: I8c775f961a6c05dd36e7acfdda6e94399365f90d
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-07-14demos: Refactored Demo class in cubeppJoey Bzdek
Moved 'Demo' declaration to near the top of the file to avoid referencing problems. Change-Id: I084231ada5683971baa073f1b761ac214fa02cfd
2017-06-20demos: Add missing breakJeremy Hayes
Treat suboptimal as success. Change-Id: I18f0e8592e212c4d1f99294de24cac945bcdb7c3
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-20demos: Update cubeppJeremy Hayes
Modify correct uniform buffer for next frame. Fix fence sync after new throttling scheme. Select alpha based on capabilities in cube. Add uniform buffer per swapchain image to cube. Cube updated to use triple buffering. Change-Id: Ia929bde0e6c3c2129dc9164a65696af1ee0c0329
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