Commit graph

1065 commits

Author SHA1 Message Date
Maik Klein 74ac8f3ac4 Add event function 2019-01-10 22:28:59 +01:00
bors[bot] a9b5b731c7 Merge #173
173: Address validation error r=MaikKlein a=MaikKlein



Co-authored-by: Maik Klein <maikklein@googlemail.com>
2018-12-09 21:30:49 +00: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
bors[bot] 25df12f1ce Merge #169
169: Issue 142 r=MaikKlein a=coolmedium

Hey here is an attempt to address #142 .  

I have used builders in cases where a builder method accepts a structure that sets more than one struct field (e.g. fields like `x_count` and `p_to_some_x`).  Otherwise I have usually used `.. Default::default()` when doing so would save typing. 

If there is a preferred way to approach this I'm happy to make any changes.

Also, for creating shader modules I have added `examples::bytes_to_u32_vec` to convert the current shader code into a format suitable for passing to the `vk::ShaderModuleCreateInfo::code`.  It  uses `std::mem::transmute` and is based on the code for `u32::from_ne_bytes` in nightly. I have only tested this on Linux. 



Co-authored-by: colin <colin@coolmedium.games>
2018-12-09 21:02:11 +00: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
bors[bot] 91e6eed93a Merge #172
172: Builder: fix &'a [c_void] to &'a [8u] r=MaikKlein a=MatusT

Fix https://github.com/MaikKlein/ash/issues/155. There is a lot of noise because I already used 1.0.0 stable version of rustfmt. 

Probably merge the https://github.com/MaikKlein/ash/pull/171 first and I'll rebase then.

Co-authored-by: Matus Talcik <matus.talcik@outlook>
2018-12-09 11:08:42 +00:00
Matus Talcik 6497e2f58c Builder: fix [c_void] 2018-12-09 11:52:28 +01:00
bors[bot] 43eabee68a Merge #170
170: SPIR-V reading helper r=MaikKlein a=Ralith

SPIR-V is defined in terms of 4-byte words and does not have a defined endianness, and compiler and target endianness may differ. Furthermore, Vulkan seems to require SPIR-V supplied to the implementation to be 4-byte-aligned. As a result, reading SPIR-V in a safe and portable fashion is error-prone.

So far we have largely shied away from including nontrivial helper code in ash, but arguably most portable code using ash will want this function. Do we want to break precedent? Or should we introduce a separate, optional, utility crate for code that doesn't directly wrap some part of Vulkan?

Co-authored-by: Benjamin Saunders <ben.e.saunders@gmail.com>
2018-12-09 08:19:02 +00:00
Maik Klein 813c33d3d1 Don't build tmp branches 2018-12-09 09:11:19 +01:00
Maik Klein 7800cc5efc Add bors 2018-12-09 09:05:32 +01:00
Maik Klein 65040ecbea
Merge pull request #171 from Ralith/reformat
Update to latest rustfmt
2018-12-09 08:48:43 +01:00
Benjamin Saunders 06b9599e16 Update to latest rustfmt 2018-12-08 15:42:13 -08:00
Benjamin Saunders 4546b26736 SPIR-V reading helper 2018-12-07 17:46:49 -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
colin bac3a5bc21 using builders and Defaults in texture example 2018-12-06 08:58:12 -06:00
Maik Klein 60e3efd552
Merge pull request #168 from Ralith/misc
Expose destroy_event, fix an argument name
2018-12-06 09:23:29 +01:00
Benjamin Saunders c3e53a8317 Fix begin_command_buffer argument naming 2018-12-05 22:42:45 -08:00
Benjamin Saunders b9702a2e14 DeviceV1_0::destroy_event 2018-12-05 22:42:05 -08:00
Maik Klein a0588c399a
Merge pull request #167 from MaikKlein/vendor-names
Move extensions into vendor specific modules
2018-12-05 15:16:52 +01:00
Maik Klein 911f7545b9 Fix imports for win and mac 2018-12-04 21:55:51 +01:00
Maik Klein ab7f960ae8 Remove all vendor tags from the fns 2018-12-04 21:25:42 +01:00
Maik Klein fad6f51aae Move extensions into vendor specific modules 2018-12-04 21:25:42 +01:00
Maik Klein 8d676002ea
Merge pull request #166 from zakorgy/get-pipeline-cache
Add get_pipeline_cache_data
2018-12-04 20:47:01 +01:00
Zakor Gyula fa830166fc Add get_pipeline_cache_data 2018-12-04 16:37:09 +01:00
Maik Klein c1dc88e199
Merge pull request #164 from Ralith/next-fix
Fix builder next methods
2018-12-01 09:17:12 +01:00
Benjamin Saunders c0b7d91faf Don't generate extension traits for inextensible structs 2018-11-30 18:13:54 -08:00
Benjamin Saunders fc1625e81c Fix extension trait implementations, tweak naming
These were being implemented for the trait object of the extension
struct's own extension trait, instead of the extension struct itself.
2018-11-30 18:12:16 -08:00
Maik Klein bcaa563c5b Bump version 2018-11-22 22:11:22 +01:00
Maik Klein 1661cb88d0
Merge pull request #146 from MatusT/builder-next
Builder next
2018-11-22 22:05:52 +01:00
Matus Talcik 1be701f853 Builder: next pattern 2018-11-22 21:54:05 +01:00
Maik Klein 55c592e67d
Merge pull request #162 from MaikKlein/meshshader
Add NvMeshShader
2018-11-22 21:06:56 +01:00