Commit Graph
8897 Commits
Author SHA1 Message Date
bors[bot]andDzmitry Malyshau 17e8c6f1f2 [rs] 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 ebe7c27e8c [rs] Update to wgpu-core with Option<Id> 2020-04-04 23:32:37 -04:00
bors[bot]andDzmitry Malyshau 902a0ebca3 Merge #546
546: NonZero internal Id representation r=grovesNL a=kvark

Fixes  #544
Based on #545 
Blocked by https://github.com/eqrion/cbindgen/issues/500

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-04 23:43:53 +00:00
Dzmitry Malyshau f07943f2d8 Use NonZeroU64 for Id 2020-04-04 19:43:16 -04:00
bors[bot]andWilliam Lundstedt 5b6754eecb [rs] 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 87f2f3658d [rs] Implement Send and Sync for BufferReadMapping and BufferWriteMapping 2020-04-03 14:59:09 +02:00
bors[bot]andKunal Mohan 09beda1942 Merge #547
547: Add BufferMapState r=kvark a=kunalmohan

WIP for issue #395 

Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
2020-04-03 03:50:22 +00:00
Kunal Mohan fb1c448aa9 Add BufferMapState enum
fix #395
Add BufferMapState enum to track the state of buffer
mapping and store any mapping details in case one is
pending.
2020-04-03 07:55:23 +05:30
bors[bot]andDzmitry Malyshau 8452a76854 [rs] 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 0f279c54bc [rs] Update to latest wgpu, duplicate RequestAdapterOptions 2020-04-02 00:29:24 -04:00
bors[bot]andDzmitry Malyshau 05ba7a50b4 Merge #545
545: Check surface compatibility r=grovesNL a=kvark

Addresses https://github.com/gfx-rs/wgpu-rs/issues/224
Follows the proposal of https://github.com/webgpu-native/webgpu-headers/pull/39

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-31 04:02:24 +00:00
Dzmitry Malyshau f3eee020e6 Check surface compatibility 2020-03-30 23:31:24 -04:00
Dzmitry Malyshau 7ff7eb2f22 [rs] Change NDC Y axis 2020-03-30 09:36:36 -04:00
Joshua Groves 2ebde4bb9d [rs] Default to MSVC on Windows 2020-03-30 07:58:06 -04:00
Joshua Groves 3ad0453ad9 [rs] Update to latest wgpu 2020-03-30 07:58:06 -04:00
Joshua Groves 652c7242fb [rs] Avoid array indexing in hello-triangle 2020-03-30 07:58:06 -04:00
Lucas Kent ef1e47216e [rs] 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
Timo de Kort 1a1f6a47b0 add support for ConstantComposite 2020-03-28 14:58:45 -04:00
aloucks 66243f12c9 [rs] 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]andHeroesGrave 306554600a Merge #540
540: Add serialization to more types r=kvark a=HeroesGrave

With these changes, pretty much everything in wgpu-types can be serialized with the exception of BufferDescriptor, CommandEncoderDescriptor, and TextureDescriptor which contain a `*const c_char`.

Options for dealing with those:
- Leave these types as not de/serializable
- Skip when serializing, deserialize as nullptr
- Serialize as a string, deserialize as nullptr

AFAICT there's not really a way to allow a full roundtrip for these fields because nul-terminated strings don't play nicely with serde. Maybe it could serialize as a byte array?

Co-authored-by: HeroesGrave <heroesgrave@gmail.com>
2020-03-28 14:44:08 +00:00
HeroesGrave 1702a54c5c Add Undefined variant to CompareFunction 2020-03-28 16:20:47 +13:00
bors[bot]andJoshua Groves fcd8bce6f7 Merge #541
541: Move more types to wgpu-types r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-28 02:14:06 +00:00
Joshua Groves f3bb6eb230 Move more types to wgpu-types 2020-03-27 23:26:17 -02:30
HeroesGrave 98e18c5ac8 Add serialization to more types 2020-03-28 13:49:09 +13:00
bors[bot]andDzmitry Malyshau 6d7eca94be Merge #539
539: Parking lot update to 0.10 r=kvark a=kvark

That allows us to remove some of the duplicated dependencies.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-27 14:43:21 +00:00
Dzmitry Malyshau 4b69b4257f Parking lot update to 0.10 2020-03-27 10:42:18 -04:00
bors[bot]andConnor Fitzgerald caf7be0d73 Merge #536
536: Update Support Platforms Table to Have a Key r=kvark a=cwfitzgerald

Closes #531 

I have added wording that I believe is accurate, but if there is better wording, feel free to propose it.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-03-27 13:43:26 +00:00
Connor Fitzgerald 43618e4101 Update Support Platforms table to have a key 2020-03-27 02:59:39 -04:00
bors[bot]andDzmitry Malyshau 2f00710832 Merge #537
537: Port to gfx-extras and gfx-hal-0.5 r=kvark a=kvark

blocked on publishing gfx-extras

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-27 04:54:40 +00:00
Dzmitry Malyshau 2e9610e8c9 Request NDC_Y_FLIP feature 2020-03-27 00:54:01 -04:00
Dzmitry Malyshau 8aeeb8e318 Port to gfx-extras and gfx-hal-0.5 2020-03-27 00:54:01 -04:00
bors[bot]andLachlan Sneff 49bcef0516 [rs] 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 d4b59f8e2e [rs] 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]andLachlan Sneff 8d8f68418b Merge #538
538: Unbox unnecessarily boxed function r=kvark a=lachlansneff

Internally, the async buffer mapping callbacks were unnecessarily boxed. This was pretty easy to fix.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-03-27 03:07:34 +00:00
Lachlan Sneff bcd7744c5b Unbox unnecessarily boxed function 2020-03-26 22:38:50 -04:00
bors[bot]andAaron Loucks 86981d9a80 Merge #528
528: Add buffer debug labels r=kvark a=aloucks

Related #404 

@kvark Is this what you had in mind? The webgpu headers have labels on all the descriptor structs and I didn't see any specific functions for altering/adding labels after creation. I'll add the rest if this looks good to you. 

I also went looking for [command buffer marker support](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/chap41.html#debugging-command-buffer-markers) in [gfx-hal](https://docs.rs/gfx-hal/0.4.1/gfx_hal/command/trait.CommandBuffer.html) so that I could add [group labels and markers](https://gpuweb.github.io/gpuweb/#dom-gpuprogrammablepassencoder-pushdebuggroup).  Is this functionality absent in `hal` or did I miss it?





Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-27 00:27:52 +00:00
Aaron Loucks d64670aab1 Use ptr::null for default label 2020-03-26 20:26:03 -04:00
bors[bot]andLachlan Sneff 25f70dc78a [rs] 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]andConnor Fitzgerald 82583e3749 [rs] 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 7deefae6d9 [rs] Update zerocopy to 0.3 2020-03-26 13:22:44 -04:00
Aaron Loucks fdcf9e7067 Add inital debug labels
- bind group
- bind group layout
- command encoder
- texture
2020-03-24 19:43:11 -04:00
Aaron Loucks 2700d1cc15 Add buffer debug labels 2020-03-24 19:38:07 -04:00
aloucks e39aaa9cb3 Implement PartialEq, Eq, and Hash for more types (#535) 2020-03-24 19:29:18 -04:00
Dzmitry Malyshau 5e2f200223 Track GPU use of compute and render pipelines (#534) 2020-03-24 19:28:26 -04:00
Dzmitry Malyshau 0a30cf4b46 Recycled identity management (#533) 2020-03-24 19:18:42 -04:00
Dzmitry Malyshau 272e423a5c Improve shutdown cleanup (#532) 2020-03-24 18:03:25 -04:00
Gabriel Majeri f09f87bb25 Use NonZeroU32 for handle index 2020-03-23 10:31:50 -04:00
Gabriel Majeri 47d7536f35 Format src/arena.rs 2020-03-23 10:31:50 -04:00
Lachlan Sneff cc4e837792 [rs] Cleanup user-interface around async buffer mapping 2020-03-23 00:07:54 -04:00
bors[bot]andAaron Loucks 0fa4f114c8 [rs] 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