Commit Graph
84 Commits
Author SHA1 Message Date
Joshua Groves e1eaa6ca26 Add web backend 2020-04-18 01:04:28 -02:30
StarToaster 40a19ebe66 Removed zerocopy and replaced it with bytemuck. 2020-04-17 10:07:24 -04:00
Dzmitry Malyshau 1678a267cb Update wgpu for texture descriptor changes 2020-04-14 01:13:47 -04:00
bors[bot]andLachlan Sneff 1c1dc8c573 Merge #254
254: Specify expected structure for draw_indirect and draw_indexed_indirect r=kvark a=lachlansneff

~~Based on https://www.khronos.org/opengl/wiki/Vertex_Rendering#Indirect_rendering.~~ Turns out the opengl docs are wrong. Based on https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkDrawIndirectCommand.html.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-04-12 16:14:15 +00:00
Lachlan Sneff 0025ca0d34 Fix documentation based on vulkan docs 2020-04-12 10:56:15 -04:00
Lachlan Sneff 496d25db69 Specified expected structure for draw_indirect and draw_indexed_indirect 2020-04-11 23:33:31 -04:00
Hackpoetic a6e81dc703 cargo fmt the code and tweak format rules 2020-04-10 22:56:24 -04:00
bors[bot]andJoshua Groves 2ea2572905 Merge #249
249: Derive `Default` for `CommandEncoderDescriptor` r=kvark a=grovesNL

Fixes #243

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-04-09 13:29:16 +00:00
Héctor Ramón Jiménez 0f2bc33b7f Fix RenderPass::set_vertex_buffer doc link 2020-04-09 06:07:20 +02:00
Joshua Groves 64b765947a Derive Default for CommandEncoderDescriptor 2020-04-09 00:55:45 -02:30
Dzmitry Malyshau 0f71647c1a Update to wgpu-core with Option<Id> 2020-04-04 23:32:37 -04:00
William Lundstedt 4c85a733ec Implement Send and Sync for BufferReadMapping and BufferWriteMapping 2020-04-03 14:59:09 +02:00
Dzmitry Malyshau b93e942b58 Update to latest wgpu, duplicate RequestAdapterOptions 2020-04-02 00:29:24 -04:00
Joshua Groves 31e80d99b3 Update to latest wgpu 2020-03-30 07:58:06 -04:00
aloucks d91b78bdfb Add VertexStateDescriptor (#221)
The vertex state properties are now bundled in the VertexStateDescriptor
which matches the spec.

Fixes #220
2020-03-28 10:45:18 -04:00
Lachlan Sneff ea6bcd03e2 Rewrite GpuFuture to avoid blocking and to use less space
Remove odd patching matching

Replace std::sync::Mutex with spin::Mutex in GpuFuture

Reduce GpuFuture usage to one explicit allocation instead of two

Fix examples to poll the device in the background when using map_read or map_write

Remove device.poll from GpuFuture::poll and document future invariants

Massively simplify examples

Use Arc::clone(...) instead of arc.clone()

Switch println to log::info
2020-03-27 00:16:35 -04:00
Lachlan Sneff 12fcdb6671 Cleanup user-interface around async buffer mapping 2020-03-23 00:07:54 -04:00
bors[bot]andAaron Loucks 7b15e24eae Merge #210
210: Update WGPU deps to rev 08e8d406c1 r=kvark a=aloucks

I also moved the `path` chunks in `Cargo.toml` to a single `[patch]` section so that it's one block to commment/uncomment for local development. 

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-23 01:03:33 +00:00
Rukai 111f6c4f75 Improve BufferCopyView documentation 2020-03-22 23:24:43 +11:00
Aaron Loucks 277505e9c9 Update WGPU deps to rev 08e8d406c1 2020-03-20 21:48:25 -04:00
Lachlan Sneff dcccbd8107 Note that get_next_texture will error if a previous output is still alive. 2020-03-20 14:34:17 -04:00
Lachlan Sneff 4618852f88 Remove lifetime from SwapChainOutput 2020-03-19 11:43:38 -04:00
Joshua Groves b3e4253df1 Return futures from request adapter/request device 2020-03-16 16:35:51 -02:30
Joshua Groves d1371dbe37 Remove Hash for ID types 2020-03-16 08:53:51 -02:30
bors[bot]andmitchmindtree a96a5faa24 Merge #200
200: Derive `Hash` and `PartialEq` for unique identifier wrapper types r=kvark a=mitchmindtree

This is particularly useful downstream for distinguishing between
instances of these types.

I was unsure about `Device` as I noticed it has a `Temp` field that
looks like it might eventually store some non-PartialEq/Hash-friendly
fields.

Let me know if you'd like me to add a derive for `Device` or if there
are any issues with those I have updated.

Co-authored-by: mitchmindtree <mitchell.nordine@gmail.com>
2020-03-15 23:18:13 +00:00
Aaron Loucks 2425312660 Add note that slot refers to the index in RenderPipelineDescriptor::vertex_buffers
Also fixed intra-doc links for `set_vertex_buffer`.
2020-03-15 15:38:31 -04:00
mitchmindtree cf5fcc4037 Derive Hash and PartialEq for unique identifier wrapper types
This is particularly useful downstream for distinguishing between
instances of these types.

I was unsure about `Device` as I noticed it has a `Temp` field that
looks like it might eventually store some non-PartialEq/Hash-friendly
fields.

Let me know if you'd like me to add a derive for `Device` or if there
are any issues with those I have updated.
2020-03-15 18:43:16 +01:00
Dzmitry Malyshau d842432d17 Update for the latest spec changes 2020-03-15 11:25:06 -04:00
Aaron Loucks 89fda33142 Reexport Backend and DeviceType from wgpu-core
These types are exposed on the `AdaptorInfo` struct.
2020-03-04 22:22:26 -05:00
daxpedda a9c7a0f5ef Expose enumerate_adapters. 2020-02-26 16:35:31 +01:00
Dzmitry Malyshau 9f129baef3 Fix vertex_attr_macro self invocation paths 2020-02-20 13:10:14 -05:00
Diggory Hardy dca51ce676 Add vertex_attr_array macro 2020-02-20 09:32:38 +00:00
Dzmitry Malyshau 17214fe986 wgpu update with DynamicOffset 2020-02-16 21:49:56 -05:00
Dzmitry Malyshau db8109f566 Enforce life times of render pass attachments 2020-01-31 13:18:46 +01:00
Dzmitry Malyshau a192f31aad Reduce Rust requirements for Pin usage 2020-01-23 20:01:01 -05:00
Dzmitry Malyshau c4be01cb9c Update wgpu-core 2020-01-23 19:14:16 -05:00
Dzmitry Malyshau 25584eb263 Enforce lifetimes of resource dependencies of passes 2020-01-15 11:06:19 -05:00
Dzmitry Malyshau 46bd6db78a Update to wgpu version with raw passes 2020-01-15 11:06:19 -05:00
Dzmitry Malyshau 064a387a52 Update wgpu dependency 2020-01-13 12:45:52 -05:00
Layl 45426eef9c Change Queue::submit to take &self 2019-12-31 16:24:49 +01:00
Layl e3aa2d23a3 Mark CommandEncoder as !Send !Sync 2019-12-28 18:38:30 +01:00
Dzmitry Malyshau ae7cdfc094 Export BIND_BUFFER_ALIGNMENT 2019-11-22 15:50:01 -05:00
Tristam MacDonald cc32408fa2 prototype of async/await for buffer mapping 2019-11-21 21:42:22 -08:00
Jacob Greenfield 0227c08ac8 Satisfy clippy 2019-11-21 20:35:19 -05:00
Jacob Greenfield be4e62ccc9 Use u8 slices for buffer mapping 2019-11-21 20:34:39 -05:00
Jacob Greenfield 88e8269182 cargo fmt 2019-11-21 00:20:28 -05:00
Dzmitry Malyshau 3609e52bfd Fix generic bounds on buffer mapping 2019-11-20 21:25:46 -05:00
Cormac O'Brien 05e697831a Use count rather than size in map_read/write_async
Fixes #124
2019-11-20 04:29:09 -06:00
Dzmitry Malyshau b40bb71679 Wholesome update for the git master of wgpu-native 2019-11-19 20:58:32 -05:00
Anton Lazarev dd23e8f015 Handle error case for SwapChain::get_next_texture 2019-11-05 14:46:25 -08:00