Commit Graph

276 Commits

Author SHA1 Message Date
Joshua Groves
9952801e2f Add labels to mapped descriptors where possible 2020-04-18 01:04:28 -02:30
Joshua Groves
d1197c0c2e Fix some remaining TODOs in the web backend 2020-04-18 01:04:28 -02:30
Joshua Groves
643481ed81 Expose more functions on the web backend 2020-04-18 01:04:28 -02:30
Joshua Groves
f0ab842d6e Combine wasm_main/main and add console_log 2020-04-18 01:04:28 -02:30
Joshua Groves
349f992a7a Switch event loop back to ControlFlow::Poll 2020-04-18 01:04:28 -02:30
Joshua Groves
95c69a192c Allow describe example to run on the web 2020-04-18 01:04:28 -02:30
Joshua Groves
8ee80efe59 Get shadow mostly working
Some of the implementation is still missing in Canary
2020-04-18 01:04:28 -02:30
Joshua Groves
bf49c1a4f1 Update to latest winit and wasm-bindgen 2020-04-18 01:04:28 -02:30
Joshua Groves
b34c0af749 Only expose adapter info on native 2020-04-18 01:04:28 -02:30
Joshua Groves
a6473b52b9 Get capture mostly working
`File::create` isn't available on wasm, so we can't actually write the
output image anywhere unless we target something else as the file
system (e.g. local storage)
2020-04-18 01:04:28 -02:30
Joshua Groves
76d5855fdc Get mipmap mostly working
Subresource tracking for mip levels isn't available in Canary yet, so
we can't verify that the web example output matches native
2020-04-18 01:04:28 -02:30
Joshua Groves
2829bd3f00 Get skybox working 2020-04-18 01:04:28 -02:30
Joshua Groves
7a6fab83c4 Get cube working 2020-04-18 01:04:28 -02:30
Joshua Groves
2ea9e01e5c Get boids working 2020-04-18 01:04:28 -02:30
Joshua Groves
e1eaa6ca26 Add web backend 2020-04-18 01:04:28 -02:30
bors[bot]
764e6b8ca4 Merge #259
259: Remove zerocopy and replace with bytemuck. r=kvark a=StarArawn

fixes #146 

I've removed `zerocopy` from the examples and replaced it with `bytemuck`. I ran all of the examples/tests and everything ran great in vulkan on my windows box.

Co-authored-by: StarToaster <startoaster23@gmail.com>
2020-04-17 14:11:30 +00:00
StarToaster
40a19ebe66 Removed zerocopy and replaced it with bytemuck. 2020-04-17 10:07:24 -04:00
bors[bot]
bc547947ce Merge #256
256: Update wgpu for texture descriptor changes r=grovesNL a=kvark

Updates for https://github.com/gfx-rs/wgpu/pull/577
Detaches us from crates-io dependency (again).

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 11:30:02 +00:00
Dzmitry Malyshau
1678a267cb Update wgpu for texture descriptor changes 2020-04-14 01:13:47 -04:00
bors[bot]
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
bors[bot]
5f211a0de5 Merge #251
251: cargo fmt the code and tweak format rules r=kvark a=chao-mu

Ran cargo fmt after removing rules per @kvark, two of which were because they needed nightly to run.

Co-authored-by: Hackpoetic <chao-mu@hackpoetic.com>
2020-04-12 12:24:30 +00: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
Hackpoetic
b81be14348 add missing rust format config 2020-04-11 00:05:18 -04:00
Hackpoetic
a6e81dc703 cargo fmt the code and tweak format rules 2020-04-10 22:56:24 -04: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