Commit graph

203 commits

Author SHA1 Message Date
Steve Wooster
cb2d94c3c7 Only scan memory_type_count memory types in examples
The example code originally checked all 32 memory types even if the
instance returned fewer memory types.
2020-10-29 12:17:08 -07:00
Steve Wooster
61476184e0
Simplify example memory selection ()
According to specs for Device Memory (section 10.2), memory types are
topologically sorted by their property flags so the two-pass memory
type selection is unnecessary.

Co-authored-by: Steve Wooster <s.f.m.wooster@gmail.com>
2020-10-19 12:11:57 +02:00
Steve Wooster
5d5fc57746 Simplify example surface format selection
According to specs for vkGetPhysicalDeviceSurfaceFormatsKHR(), at least
one surface format must be returned, and returned formats must not be
VK_FORMAT_UNDEFINED.
2020-10-14 16:58:55 -07:00
Sebastian Aaltonen
64d1705730
Optimized example fences. Waited immediately. Now waits before reuse (next frame) ()
* Optimized example fences. Waited immediately. Now waits before reuse (next frame).

* rust fmt + clippy warning silenced

* Add comments for record_submit_commandbuffer

Co-authored-by: Sebastian Aaltonen <sebastian.aaltonen@unity3d.com>
Co-authored-by: Maik Klein <maikklein@googlemail.com>
2020-10-03 00:08:42 +02:00
Adrien Bennadji
df504f8121 Update example to use ash-window 2020-09-04 14:05:16 -07:00
zedrian
ac4d046d4b
Added VK_EXT_tooling_info extension support ()
* Added `VK_EXT_tooling_info` extension support.

* Formatting applied.

* cargo-clippy suggestions satisfied.

* cargo-clippy suggestions satisfied.
2020-07-02 12:10:05 +02:00
Maik Klein
4d6bb3949d
Fix clippy lints for 1.43 () 2020-05-10 13:42:07 +02:00
Brian Merchant
93238e093b Use DebugUtils instead of DebugReport in example. 2020-04-29 12:20:54 -07:00
Friz64
da5de66ba4
Switch to VK_LAYER_KHRONOS_validation () 2020-04-19 19:12:43 +02:00
Maik Klein
c32f0dd739 Clippy lints for 1.42 2020-03-15 00:55:26 +01:00
Jonathan Plotner
c105d2842c fix build errors for examples on osx () 2020-01-26 09:29:52 +01:00
Maik Klein
855068323d
Address all the clippy lints ()
* Fix literals in vk.rs

* Address all the other clippy lints in ash

* Module level clippy lint

* More lints

* Make hashmaps generic for clippy

* Remove unused macro import
2019-10-20 17:18:40 +02:00
Benjamin Saunders
4e8090f0bb Replace version macros with const fns 2019-10-05 11:16:35 -07:00
maik
13398b0127 Avoid allocation for spirv shaders 2019-06-23 12:34:47 +02:00
Aaron Loucks
1b75f9eb5d Fix shader and texture data loading in examples
Load the example shader and texture files with `include_bytes!` so
that they can be run from the root project directory. Previously,
`cargn run --bin <EXAMPLE>` could only be run from the `examples`
directory.
2019-06-08 01:17:56 -04:00
bors[bot]
6d7e4bf120 Merge
215: Replace mem::uninitialized with mem::zeroed r=MaikKlein a=aloucks

Fixes 

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2019-06-01 20:43:14 +00:00
Aaron Loucks
1ba1d46eb2 Update generator and examples to edition 2018 2019-05-25 15:34:18 -04:00
Aaron Loucks
bd69ab969c Replace mem::uninitialized with mem::zeroed
Fixes 
2019-05-25 15:13:17 -04:00
unknownue
9a6afac6ea Fix black screen for examples on macOS platform 2019-05-20 21:28:38 +08:00
Mac O'Brien
9139ebfd95 Formatting pass 2019-05-18 16:09:12 -05:00
Mac O'Brien
90d7218bda Return VkResult from get_physical_device_surface_support
Fixes 
2019-05-18 15:56:26 -05:00
Maik Klein
4c1c8aa648 Remove mut 2019-03-04 10:16:56 +01:00
Maik Klein
04dbf20371 Transform the ptr chain sample into a test case 2019-03-04 09:56:53 +01:00
Maik Klein
3de2ca9a22 Implement ExtendsXXX for all builders as well 2019-02-28 10:59:46 +01:00
Maik Klein
4f7ca180f6 Implement push_next 2019-02-28 10:59:46 +01:00
Maik Klein
c46a41e1d2 Replace ExtensionChain with a simple iterator 2019-02-28 10:59:46 +01:00
Maik Klein
6d72bb547d Implement extension chaining 2019-02-28 10:59:46 +01:00
Maik Klein
813e6a836e Reformat 2018-12-09 22:24:11 +01:00
Maik Klein
0b68c25801 Address validation error 2018-12-09 22:13:08 +01:00
colin
f0251c157a inlining slices when on Device methods 2018-12-09 14:33:21 -06:00
colin
5422a8032d again, added use std::ptr; to lib.rs 2018-12-09 13:52:03 -06:00
colin
9fcd93b7b2 rust fmt 2018-12-09 13:41:23 -06:00
colin
752fc1f1ee missed some premature .build() calls! 2018-12-09 13:35:48 -06:00
colin
ca651f07cb rustfmt 2018-12-09 08:01:13 -06:00
colin
bb54ae4c5a refactored to use util::read_spv 2018-12-09 08:00:55 -06:00
colin
59dfc6e216 Merge branch 'master' into issue-142 2018-12-09 07:47:29 -06:00
Benjamin Saunders
06b9599e16 Update to latest rustfmt 2018-12-08 15:42:13 -08:00
colin
31880de8ab refactored examples 2018-12-07 13:00:27 -06:00
colin
962f1ba830 reformatting via rust fmt 2018-12-07 12:52:52 -06:00
colin
5dfd07098c refactored texture example to use defaults and builders 2018-12-07 12:50:46 -06:00
colin
0a16b5bd9b refactored triangle to use builders and defaults 2018-12-07 12:41:51 -06:00
colin
cc21817445 attempt to detect endianness in bytes_to_u32_vec 2018-12-07 12:38:20 -06:00
colin
8c2424c836 refactored examples/src/lib.rs to use builders 2018-12-07 12:38:20 -06:00
colin
cf60417ecc added bytes_to_u32_vec function using byteorder crate 2018-12-07 12:35:06 -06:00
colin
6f4259ee36 Merge branch 'master' of https://github.com/MaikKlein/ash into issue-142 2018-12-07 12:26:21 -06:00
colin
4858f4bceb fixed logic error in bytes_to_u32_vec 2018-12-06 13:40:25 -06:00
colin
2bb85a8d50 fixed logic bug in bytes_to_u32_vec 2018-12-06 13:38:44 -06:00
colin
046989ad75 reformatted with fmt 2018-12-06 13:18:37 -06:00
colin
2855192145 added std::ptr back in import to satisfy build checks 2018-12-06 12:58:31 -06:00
colin
dbbdc8c3c2 using builders and defaults in triangle example 2018-12-06 09:33:22 -06:00