Commit Graph

253 Commits

Author SHA1 Message Date
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
bors[bot]
1f87f9773d Merge #252
252: Typo r=grovesNL a=maghoff

Remove extra word

Co-authored-by: Magnus Hoff <maghoff@gmail.com>
2020-04-11 12:59:28 +00:00
Magnus Hoff
5bee0f7abf Typo
Remove extra word
2020-04-11 13:09:45 +02:00
Igor Shaposhnik
c1695a5a37 Migrate CI to GitHub Actions 2020-04-10 10:59:21 -04:00
bors[bot]
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
bors[bot]
0c4298b5d9 Merge #245
245: Check `cargo doc` in CI r=kvark a=hecrj

This PR makes CI run `cargo doc` using the latest nightly.

It is currently panicking here:

6dee5f1126/src/librustdoc/passes/mod.rs (L411)

I thought it was an incorrect link causing it, but the issue seems to persist even after fixing the link.

__Update__: Issue opened upstream by @grovesNL (https://github.com/rust-lang/rust/issues/70874).

Co-authored-by: Héctor Ramón Jiménez <hector0193@gmail.com>
2020-04-09 04:18:15 +00:00
Héctor Ramón Jiménez
0f2bc33b7f Fix RenderPass::set_vertex_buffer doc link 2020-04-09 06:07:20 +02:00
Héctor Ramón Jiménez
11a63e4e9d Check cargo doc in CI 2020-04-09 06:07:17 +02:00
Joshua Groves
64b765947a Derive Default for CommandEncoderDescriptor 2020-04-09 00:55:45 -02:30
bors[bot]
efe44f616c Merge #241
241: Version bump to 0.5 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-06 13:55:34 +00:00
Dzmitry Malyshau
e50af60cc0 Version bump to 0.5 wgpu-v0.5.0 2020-04-06 09:10:28 -04:00
bors[bot]
0751806044 Merge #236
236: Update to wgpu-core with Option<Id> r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-05 03:33:29 +00:00
Dzmitry Malyshau
0f71647c1a Update to wgpu-core with Option<Id> 2020-04-04 23:32:37 -04:00
bors[bot]
e198d638fd Merge #234
234: Implement Send and Sync for BufferReadMapping and BufferWriteMapping r=kvark a=Healthire



Co-authored-by: William Lundstedt <walundstedt@gmail.com>
2020-04-03 13:03:47 +00:00
William Lundstedt
4c85a733ec Implement Send and Sync for BufferReadMapping and BufferWriteMapping 2020-04-03 14:59:09 +02:00
bors[bot]
2003e6be13 Merge #232
232: Update to latest wgpu, duplicate RequestAdapterOptions r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-02 04:30:05 +00:00
Dzmitry Malyshau
b93e942b58 Update to latest wgpu, duplicate RequestAdapterOptions 2020-04-02 00:29:24 -04:00
Dzmitry Malyshau
02f7ac9c02 Change NDC Y axis 2020-03-30 09:36:36 -04:00
Joshua Groves
0e7fc8282d Default to MSVC on Windows 2020-03-30 07:58:06 -04:00
Joshua Groves
31e80d99b3 Update to latest wgpu 2020-03-30 07:58:06 -04:00
Joshua Groves
b917a60abd Avoid array indexing in hello-triangle 2020-03-30 07:58:06 -04:00
Lucas Kent
d08f837624 Move multithreaded_compute.rs into hello-compute tests (#223)
Setup hello-compute tests to run during `cargo test`
2020-03-29 19:55:39 -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
bors[bot]
6fd4bf27b6 Merge #214
214: Rewrite GpuFuture to avoid blocking and to use less space r=kvark a=lachlansneff

Since `GpuFuture` doesn't blocking wait for the mapping to resolve anymore, we need to poll the device for it to actually work. ~~I haven't added that to the `hello-compute` example, so it doesn't work anymore.~~

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-03-27 04:18:29 +00: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
bors[bot]
5f24202f7e Merge #213
213: Cleanup user-interface around async buffer mapping r=grovesNL a=lachlansneff

This PR cleans up the interface for asynchronous buffer mapping a little. It turns `map_read` and `map_write` into `async` functions (instead of returning `impl Future<...>`). It also adds a standin error type and removes some confusing type aliases.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-03-27 00:12:20 +00:00
bors[bot]
fee7800fb4 Merge #219
219: Update Zerocopy to 0.3 r=kvark a=cwfitzgerald

In an effort to eliminate duplicate dependencies, especially on the proc-macro/syn stack, this updates zerocopy 0.2 (using syn 0.6) to zerocopy 0.3 (using syn 1). There appears to be no real api changes based on my skimming of the docs. Things compile on my windows machine, and hopefully it will pass on mac and linux.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-03-26 17:58:55 +00:00
Connor Fitzgerald
ce10a47de8 Update zerocopy to 0.3 2020-03-26 13:22:44 -04:00
Lachlan Sneff
12fcdb6671 Cleanup user-interface around async buffer mapping 2020-03-23 00:07:54 -04:00
bors[bot]
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
bors[bot]
aeab013546 Merge #212
212: Improve BufferCopyView documentation r=kvark a=rukai

groves suggested that the alignment/multiple requirements are not implemented yet.
So I changed the documentation to reflect that.
Ideally we would change the examples to demonstrate how to work around this requirement, but I think its best to wait until we know for certain that this IS a requirement, currently the WebGPU spec does not have this as a requirement.

Additionally it seems like every example except for the skybox example failed to follow this part of the WebGPU spec.
"Note: rowsPerImage must be zero for copies with a copySize.depth of 1, and must be greater than zero otherwise."
So I fixed those examples and documented the requirement on the field.

Co-authored-by: Rukai <rubickent@gmail.com>
2020-03-22 19:02:48 +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
bors[bot]
04db8c973c Merge #208
208: Remove lifetime from SwapChainOutput r=kvark a=lachlansneff

The pr removes the lifetime from `SwapChainOutput`. It's not clear to me if the lifetime is necessary for soundness reasons, so let me know if so.

Resolves #207 

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-03-20 20:25:04 +00: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
bors[bot]
82c8f343fe Merge #204
204: Return futures from request adapter/request device r=kvark a=grovesNL

Relevant to #175

Backporting some parts of #193 for async request adapter and async request device.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 22:56:43 +00:00
Joshua Groves
b3e4253df1 Return futures from request adapter/request device 2020-03-16 16:35:51 -02:30
bors[bot]
6238e85f5c Merge #203
203: Update winit r=kvark a=grovesNL

Use the latest version of winit (0.22)

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 14:34:26 +00:00
bors[bot]
a1ffa74308 Merge #202
202: Remove `Hash` for ID types r=kvark a=grovesNL

Reverts some of the `Hash` derives added in #200 because we don't have a good way to support `Hash` for JavaScript objects (for the web backend) at the moment. JavaScript objects don't have a unique identifier that we can use for `Hash`, so any solution here would probably mean adding our own map of JS object<->unique ID.

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-16 13:59:17 +00:00
Joshua Groves
761def1989 Fix typo in readme 2020-03-16 09:31:35 -02:30
Joshua Groves
65b79112ed Update winit 2020-03-16 09:26:51 -02:30
Joshua Groves
d1371dbe37 Remove Hash for ID types 2020-03-16 08:53:51 -02:30
bors[bot]
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
bors[bot]
76ffea3172 Merge #201
201: Add note that `slot` refers to the index in RenderPipelineDescriptor r=kvark a=aloucks

Add note that `slot` refers to the index in `RenderPipelineDescriptor::vertex_buffers`

Also fixed intra-doc links for `set_vertex_buffer`.

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-15 23:04:27 +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
bors[bot]
9a67ce1e64 Merge #197
197: Update for the latest spec changes r=grovesNL a=kvark

Blocked on https://github.com/gfx-rs/wgpu/pull/518

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-03-15 18:41:29 +00: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